[FFmpeg-cvslog] r21451 - trunk/libavcodec/mjpegdec.c

cehoyos subversion
Tue Jan 26 11:30:24 CET 2010


Author: cehoyos
Date: Tue Jan 26 11:30:24 2010
New Revision: 21451

Log:
Metasoft MJPEG codec has Cb and Cr swapped, fixes issue 1611.

Modified:
   trunk/libavcodec/mjpegdec.c

Modified: trunk/libavcodec/mjpegdec.c
==============================================================================
--- trunk/libavcodec/mjpegdec.c	Mon Jan 25 14:26:10 2010	(r21450)
+++ trunk/libavcodec/mjpegdec.c	Tue Jan 26 11:30:24 2010	(r21451)
@@ -920,6 +920,10 @@ int ff_mjpeg_decode_sos(MJpegDecodeConte
             av_log(s->avctx, AV_LOG_ERROR, "decode_sos: index(%d) out of components\n", index);
             return -1;
         }
+        /* Metasoft MJPEG codec has Cb and Cr swapped */
+        if (s->avctx->codec_tag == MKTAG('M', 'T', 'S', 'J')
+            && nb_components == 3 && s->nb_components == 3 && i)
+            index = 3 - i;
 
         s->comp_index[i] = index;
 



More information about the ffmpeg-cvslog mailing list