[FFmpeg-cvslog] r22215 - trunk/libavcodec/imgconvert.c

stefano subversion
Fri Mar 5 01:50:13 CET 2010


Author: stefano
Date: Fri Mar  5 01:50:13 2010
New Revision: 22215

Log:
Fix BGR cases missing from depth test in avcodec_get_pix_fmt_loss().

Patch by Janusz Krzysztofik:
<${name initial}${surname less the final "ofik"}@tis.icnet.pl>.

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Fri Mar  5 01:22:40 2010	(r22214)
+++ trunk/libavcodec/imgconvert.c	Fri Mar  5 01:50:13 2010	(r22215)
@@ -777,8 +777,10 @@ int avcodec_get_pix_fmt_loss(enum PixelF
     loss = 0;
     pf = &pix_fmt_info[dst_pix_fmt];
     if (pf->depth < ps->depth ||
-        ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE) &&
-         (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE)))
+        ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE ||
+          dst_pix_fmt == PIX_FMT_BGR555BE || dst_pix_fmt == PIX_FMT_BGR555LE) &&
+         (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE ||
+          src_pix_fmt == PIX_FMT_BGR565BE || src_pix_fmt == PIX_FMT_BGR565LE)))
         loss |= FF_LOSS_DEPTH;
     if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w ||
         dst_desc->log2_chroma_h > src_desc->log2_chroma_h)



More information about the ffmpeg-cvslog mailing list