mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
Lossless jpeg expects and uses BGRA not RGB32 (this probably caused a problem on
big endian) Originally committed as revision 20789 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e0b176adff
commit
49b19191bc
@ -301,7 +301,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
||||
switch(pix_fmt_id){
|
||||
case 0x11111100:
|
||||
if(s->rgb){
|
||||
s->avctx->pix_fmt = PIX_FMT_RGB32;
|
||||
s->avctx->pix_fmt = PIX_FMT_BGRA;
|
||||
}else
|
||||
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P;
|
||||
assert(s->nb_components==3);
|
||||
|
@ -211,7 +211,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
|
||||
}
|
||||
|
||||
put_bits(&s->pb, 16, 17);
|
||||
if(lossless && s->avctx->pix_fmt == PIX_FMT_RGB32)
|
||||
if(lossless && s->avctx->pix_fmt == PIX_FMT_BGRA)
|
||||
put_bits(&s->pb, 8, 9); /* 9 bits/component RCT */
|
||||
else
|
||||
put_bits(&s->pb, 8, 8); /* 8 bits/component */
|
||||
|
Loading…
Reference in New Issue
Block a user