aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-02 23:49:11 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-05 13:37:41 +0100
commitdaffed3b173c59d64907747bf3309e98a8974f4e (patch)
treed31ab41c33d0188815603ff62fa575814cb6865b /libavcodec/mjpegenc.c
parent0cdbc4d39394965bd8712395b19160da8f3fe144 (diff)
downloadffmpeg-daffed3b173c59d64907747bf3309e98a8974f4e.tar.gz
ljpegenc: accept bgr24 instead of bgra
The alpha plane is not encoded.
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r--libavcodec/mjpegenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 054cc66a4b..30433c3ff6 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -186,7 +186,7 @@ void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
&chroma_v_shift);
if (avctx->codec->id == AV_CODEC_ID_LJPEG &&
- avctx->pix_fmt == AV_PIX_FMT_BGRA) {
+ avctx->pix_fmt == AV_PIX_FMT_BGR24) {
vsample[0] = hsample[0] =
vsample[1] = hsample[1] =
vsample[2] = hsample[2] = 1;
@@ -212,7 +212,7 @@ void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
}
put_bits(pb, 16, 17);
- if (lossless && avctx->pix_fmt == AV_PIX_FMT_BGRA)
+ if (lossless && avctx->pix_fmt == AV_PIX_FMT_BGR24)
put_bits(pb, 8, 9); /* 9 bits/component RCT */
else
put_bits(pb, 8, 8); /* 8 bits/component */