Commit c031feef authored by michael's avatar michael

Lossless jpeg expects and uses BGRA not RGB32 (this probably caused a problem on

big endian)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20789 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1f8c77a8
...@@ -301,7 +301,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) ...@@ -301,7 +301,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
switch(pix_fmt_id){ switch(pix_fmt_id){
case 0x11111100: case 0x11111100:
if(s->rgb){ if(s->rgb){
s->avctx->pix_fmt = PIX_FMT_RGB32; s->avctx->pix_fmt = PIX_FMT_BGRA;
}else }else
s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P; s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P;
assert(s->nb_components==3); assert(s->nb_components==3);
......
...@@ -211,7 +211,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) ...@@ -211,7 +211,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
} }
put_bits(&s->pb, 16, 17); 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 */ put_bits(&s->pb, 8, 9); /* 9 bits/component RCT */
else else
put_bits(&s->pb, 8, 8); /* 8 bits/component */ put_bits(&s->pb, 8, 8); /* 8 bits/component */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment