Mercurial > libavcodec.hg
changeset 2237:d43321e67acd libavcodec
(non)interlaced huffyuv patch by (Loren Merritt <lorenm at u dot washington dot edu>)
author | michael |
---|---|
date | Fri, 17 Sep 2004 10:57:57 +0000 |
parents | b0102ea621dd |
children | 7fdb3361925a |
files | huffyuv.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/huffyuv.c Thu Sep 16 19:05:22 2004 +0000 +++ b/huffyuv.c Fri Sep 17 10:57:57 2004 +0000 @@ -409,7 +409,10 @@ 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 @@ 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 @@ 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;