# HG changeset patch # User bcoudurier # Date 1204214932 0 # Node ID 4cf5fde3c99e22d20cc13e067b19599b4ac53b51 # Parent e82ca9167c1f92cf4867e2ba7791692ad44bdf4f code is ok for 4bpp in mov too, fix 16grey.mov diff -r e82ca9167c1f -r 4cf5fde3c99e rawdec.c --- a/rawdec.c Wed Feb 27 20:34:44 2008 +0000 +++ b/rawdec.c Thu Feb 28 16:08:52 2008 +0000 @@ -46,6 +46,7 @@ static const PixelFormatTag pixelFormatBpsMOV[] = { /* FIXME fix swscaler to support those */ /* http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/chapter_4_section_2.html */ + { PIX_FMT_PAL8, 4 }, { PIX_FMT_PAL8, 8 }, { PIX_FMT_BGR555, 16 }, { PIX_FMT_RGB24, 24 }, @@ -106,8 +107,9 @@ frame->interlaced_frame = avctx->coded_frame->interlaced_frame; frame->top_field_first = avctx->coded_frame->top_field_first; - //4bpp raw in avi (yes this is ugly ...) - if(avctx->bits_per_sample == 4 && avctx->pix_fmt==PIX_FMT_PAL8 && !avctx->codec_tag){ + //4bpp raw in avi and mov (yes this is ugly ...) + if(avctx->bits_per_sample == 4 && avctx->pix_fmt==PIX_FMT_PAL8 && + !avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' ')){ int i; for(i=256*2; i+1 < context->length>>1; i++){ context->buffer[2*i+0]= buf[i-256*2]>>4;