diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-01-09 18:33:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-01-09 18:33:21 +0000 |
commit | c46eeae2a80dfe0046c15b542e8b9a2c78f19bf7 (patch) | |
tree | 8c0378f0ae122dd5fcd3b101f7b55d0d233188f2 /libavcodec/utils.c | |
parent | aa11ce6568a190b7c843c57bcbc8f5e1785af99b (diff) | |
download | ffmpeg-c46eeae2a80dfe0046c15b542e8b9a2c78f19bf7.tar.gz |
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
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 670803b6a5..f583cd284e 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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 " |