imgconvert: add self test code
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Nov 2012 15:10:42 +0000 (16:10 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Nov 2012 16:03:31 +0000 (17:03 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/Makefile
libavcodec/imgconvert.c

index e937c4b..0c94af7 100644 (file)
@@ -783,6 +783,7 @@ TESTPROGS = cabac                                                       \
             fft-fixed                                                   \
             golomb                                                      \
             iirfilter                                                   \
+            imgconvert                                                  \
             rangecoder                                                  \
             snowenc                                                     \
 
index 2ba4a6a..c45203e 100644 (file)
@@ -974,3 +974,18 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
     emms_c();
     return 0;
 }
+
+#ifdef TEST
+
+int main(void){
+    int i;
+    for (i=0; i<AV_PIX_FMT_NB*2; i++) {
+        AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(i);
+        if(!desc)
+            continue;
+        av_log(0, AV_LOG_INFO, "pix fmt %s %d\n", desc->name, is_yuv_planar(i));
+    }
+    return 0;
+}
+
+#endif