[FFmpeg-cvslog] imgconvert: add self test code

Michael Niedermayer git at videolan.org
Wed Nov 21 17:11:35 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 21 16:10:42 2012 +0100| [be19e7e3739689f72756da3dd5a68479ebecdcc8] | committer: Michael Niedermayer

imgconvert: add self test code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=be19e7e3739689f72756da3dd5a68479ebecdcc8
---

 libavcodec/Makefile     |    1 +
 libavcodec/imgconvert.c |   15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index e937c4b..0c94af7 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -783,6 +783,7 @@ TESTPROGS = cabac                                                       \
             fft-fixed                                                   \
             golomb                                                      \
             iirfilter                                                   \
+            imgconvert                                                  \
             rangecoder                                                  \
             snowenc                                                     \
 
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 2ba4a6a..c45203e 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -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



More information about the ffmpeg-cvslog mailing list