[FFmpeg-cvslog] is_yuv_planar: remove use of PixFmtInfo

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


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 21 16:11:01 2012 +0100| [0efa240f2bd28b3e9099e4e34c85cdd7062a8086] | committer: Michael Niedermayer

is_yuv_planar: remove use of PixFmtInfo

This fixes the behavior for a few yuva 16bit formats

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

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

 libavcodec/imgconvert.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index c45203e..e79dacc 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -704,13 +704,12 @@ void ff_shrink88(uint8_t *dst, int dst_wrap,
 /* return true if yuv planar */
 static inline int is_yuv_planar(enum AVPixelFormat fmt)
 {
-    const PixFmtInfo         *info = &pix_fmt_info[fmt];
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
     int i;
     int planes[4] = { 0 };
 
-    if (info->color_type != FF_COLOR_YUV &&
-        info->color_type != FF_COLOR_YUV_JPEG)
+    if (     desc->flags & PIX_FMT_RGB
+        || !(desc->flags & PIX_FMT_PLANAR))
         return 0;
 
     /* set the used planes */



More information about the ffmpeg-cvslog mailing list