Add a function to match a 2 element vector of uint16_t and use it in h263 and svq1

instead of custom and bloated code to find an index into a w/h array.

Originally committed as revision 21113 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2010-01-09 18:33:21 +00:00
parent aa11ce6568
commit c46eeae2a8
6 changed files with 16 additions and 33 deletions

View file

@ -1200,6 +1200,12 @@ int av_parse_video_frame_rate(AVRational *frame_rate, const char *arg)
return 0;
}
int ff_match_2uint16(const uint16_t (*tab)[2], int size, int a, int b){
int i;
for(i=0; i<size && !(tab[i][0]==a && tab[i][1]==b); i++);
return i;
}
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
{
av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your FFmpeg "