diff utils.c @ 10832:f20726a6d538 libavcodec

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.
author michael
date Sat, 09 Jan 2010 18:33:21 +0000
parents 90f34aa8fe0a
children bf309c7ce615
line wrap: on
line diff
--- a/utils.c	Sat Jan 09 18:12:06 2010 +0000
+++ b/utils.c	Sat Jan 09 18:33:21 2010 +0000
@@ -1200,6 +1200,12 @@
         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 "