[FFmpeg-cvslog] avcodec/mjpegenc_common: do not ignore the color_range field
Michael Niedermayer
git at videolan.org
Mon Aug 10 17:49:45 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Aug 10 17:35:31 2015 +0200| [b26497f8242464fc5118326e5d5e0ec5a4146797] | committer: Michael Niedermayer
avcodec/mjpegenc_common: do not ignore the color_range field
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b26497f8242464fc5118326e5d5e0ec5a4146797
---
libavcodec/mjpegenc_common.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index 2fccae3..64e1425 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -145,9 +145,10 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
AV_WB16(ptr, size);
}
- if (avctx->pix_fmt == AV_PIX_FMT_YUV420P ||
- avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
- avctx->pix_fmt == AV_PIX_FMT_YUV444P) {
+ if (((avctx->pix_fmt == AV_PIX_FMT_YUV420P ||
+ avctx->pix_fmt == AV_PIX_FMT_YUV422P ||
+ avctx->pix_fmt == AV_PIX_FMT_YUV444P) && avctx->color_range != AVCOL_RANGE_JPEG)
+ || avctx->color_range == AVCOL_RANGE_MPEG) {
put_marker(p, COM);
flush_put_bits(p);
ptr = put_bits_ptr(p);
More information about the ffmpeg-cvslog
mailing list