summaryrefslogtreecommitdiff
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-28 16:08:52 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-28 16:08:52 +0000
commit83f02883df1936988d54fb0861798e4f906c8655 (patch)
tree150b76a2ee0f276efd11c0c193c6adeef9c71b9c /libavcodec/rawdec.c
parent0de2157fa4117aac26f5b9d3704ecd586356ba3f (diff)
code is ok for 4bpp in mov too, fix 16grey.mov
Originally committed as revision 12273 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 746840a31b..9fbdbb79e1 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -46,6 +46,7 @@ static const PixelFormatTag pixelFormatBpsAVI[] = {
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 @@ static int raw_decode(AVCodecContext *avctx,
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;