Mercurial > libavcodec.hg
changeset 7931:fd6c05a225aa libavcodec
Simplify pix_fmt_id instead of listing a subset of non-simplified ones.
author | michael |
---|---|
date | Sat, 27 Sep 2008 01:59:50 +0000 |
parents | fae5e74eef1b |
children | 7729da3e4866 |
files | mjpegdec.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mjpegdec.c Sat Sep 27 01:50:57 2008 +0000 +++ b/mjpegdec.c Sat Sep 27 01:59:50 2008 +0000 @@ -289,8 +289,12 @@ (s->h_count[2] << 12) | (s->v_count[2] << 8) | (s->h_count[3] << 4) | s->v_count[3]; av_log(s->avctx, AV_LOG_DEBUG, "pix fmt id %x\n", pix_fmt_id); + if(!(pix_fmt_id & 0x10101010)) + pix_fmt_id-= (pix_fmt_id & 0xF0F0F0F0)>>1; + if(!(pix_fmt_id & 0x01010101)) + pix_fmt_id-= (pix_fmt_id & 0x0F0F0F0F)>>1; + switch(pix_fmt_id){ - case 0x22222200: case 0x11111100: if(s->rgb){ s->avctx->pix_fmt = PIX_FMT_RGB32; @@ -306,7 +310,6 @@ s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV440P : PIX_FMT_YUVJ440P; break; case 0x21111100: - case 0x22121200: s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV422P : PIX_FMT_YUVJ422P; break; case 0x22111100: