diff options
author | Loren Merritt <lorenm@u.washington.edu> | 2004-09-17 10:57:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-09-17 10:57:57 +0000 |
commit | ee598f7ba44177deb8e718a5092cb0996edecec6 (patch) | |
tree | ab86425862e573cc253410860b661fa452fc1c18 /libavcodec/huffyuv.c | |
parent | a6a12a8a5c5003b213f3a7b32730ab99e4a0d28d (diff) | |
download | ffmpeg-ee598f7ba44177deb8e718a5092cb0996edecec6.tar.gz |
(non)interlaced huffyuv patch by (Loren Merritt <lorenm at u dot washington dot edu>)
Originally committed as revision 3473 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r-- | libavcodec/huffyuv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index ca00585ad2..ac260f6a1e 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -409,7 +409,10 @@ s->bgr32=1; return -1; } - s->interlaced= height > 288; + if(((uint8_t*)avctx->extradata)[2] & 0x20) + s->interlaced= ((uint8_t*)avctx->extradata)[2] & 0x10 ? 1 : 0; + else + s->interlaced= height > 288; switch(s->bitstream_bpp){ case 12: @@ -497,10 +500,11 @@ static int encode_init(AVCodecContext *avctx) avctx->bits_per_sample= s->bitstream_bpp; s->decorrelate= s->bitstream_bpp >= 24; s->predictor= avctx->prediction_method; + s->interlaced= avctx->flags&CODEC_FLAG_INTERLACED_ME ? 1 : 0; ((uint8_t*)avctx->extradata)[0]= s->predictor; ((uint8_t*)avctx->extradata)[1]= s->bitstream_bpp; - ((uint8_t*)avctx->extradata)[2]= + ((uint8_t*)avctx->extradata)[2]= 0x20 | (s->interlaced ? 0x10 : 0); ((uint8_t*)avctx->extradata)[3]= 0; s->avctx->extradata_size= 4; @@ -546,8 +550,6 @@ static int encode_init(AVCodecContext *avctx) for(j=0; j<256; j++) s->stats[i][j]= 0; - s->interlaced= height > 288; - // printf("pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_sample, s->interlaced); s->picture_number=0; |