[FFmpeg-cvslog] lavc/mjpegdec: Detect more CMYK images.
Carl Eugen Hoyos
git at videolan.org
Mon Aug 17 15:54:30 CEST 2015
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon Aug 17 15:53:41 2015 +0200| [84170d4be053a4c7901965fe1977970b5c5e85e5] | committer: Carl Eugen Hoyos
lavc/mjpegdec: Detect more CMYK images.
Fixes ticket #4772.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=84170d4be053a4c7901965fe1977970b5c5e85e5
---
libavcodec/mjpegdec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 899af4e..039fe0e 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -345,6 +345,12 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
i, h_count[i], v_count[i],
s->component_id[i], s->quant_index[i]);
}
+ if ( nb_components == 4
+ && s->component_id[0] == 'C' - 1
+ && s->component_id[1] == 'M' - 1
+ && s->component_id[2] == 'Y' - 1
+ && s->component_id[3] == 'K' - 1)
+ s->adobe_transform = 0;
if (s->ls && (s->h_max > 1 || s->v_max > 1)) {
avpriv_report_missing_feature(s->avctx, "Subsampling in JPEG-LS");
More information about the ffmpeg-cvslog
mailing list