Mercurial > libavcodec.hg
changeset 10666:7127645ee791 libavcodec
Lossless jpeg expects and uses BGRA not RGB32 (this probably caused a problem on
big endian)
author | michael |
---|---|
date | Thu, 10 Dec 2009 18:14:26 +0000 |
parents | 6cebfebeb18f |
children | 26f4a5a07f7e |
files | mjpegdec.c mjpegenc.c |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mjpegdec.c Thu Dec 10 18:07:35 2009 +0000 +++ b/mjpegdec.c Thu Dec 10 18:14:26 2009 +0000 @@ -301,7 +301,7 @@ 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);
--- a/mjpegenc.c Thu Dec 10 18:07:35 2009 +0000 +++ b/mjpegenc.c Thu Dec 10 18:14:26 2009 +0000 @@ -211,7 +211,7 @@ } 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 */