Mercurial > libavcodec.hg
diff huffyuv.c @ 7823:4525dcd81357 libavcodec
Bump Major version, this commit is almost just renaming bits_per_sample to
bits_per_coded_sample but that cannot be done seperately.
Patch by Luca Abeni
Also reset the minor version and fix the forgotton change to libfaad.
Note: The API/ABI should not be considered stable yet, there still may
be a change done here or there if some developer has some cleanup ideas and
patches!
author | michael |
---|---|
date | Mon, 08 Sep 2008 14:24:59 +0000 |
parents | 6efb15a24e91 |
children | 61cfb1dcfae5 |
line wrap: on
line diff
--- a/huffyuv.c Mon Sep 08 13:37:12 2008 +0000 +++ b/huffyuv.c Mon Sep 08 14:24:59 2008 +0000 @@ -492,7 +492,7 @@ //if(avctx->extradata) // printf("extradata:%X, extradata_size:%d\n", *(uint32_t*)avctx->extradata, avctx->extradata_size); if(avctx->extradata_size){ - if((avctx->bits_per_sample&7) && avctx->bits_per_sample != 12) + if((avctx->bits_per_coded_sample&7) && avctx->bits_per_coded_sample != 12) s->version=1; // do such files exist at all? else s->version=2; @@ -507,7 +507,7 @@ s->predictor= method&63; s->bitstream_bpp= ((uint8_t*)avctx->extradata)[1]; if(s->bitstream_bpp==0) - s->bitstream_bpp= avctx->bits_per_sample&~7; + s->bitstream_bpp= avctx->bits_per_coded_sample&~7; interlace= (((uint8_t*)avctx->extradata)[2] & 0x30) >> 4; s->interlaced= (interlace==1) ? 1 : (interlace==2) ? 0 : s->interlaced; s->context= ((uint8_t*)avctx->extradata)[2] & 0x40 ? 1 : 0; @@ -515,7 +515,7 @@ if(read_huffman_tables(s, ((uint8_t*)avctx->extradata)+4, avctx->extradata_size) < 0) return -1; }else{ - switch(avctx->bits_per_sample&7){ + switch(avctx->bits_per_coded_sample&7){ case 1: s->predictor= LEFT; s->decorrelate= 0; @@ -526,7 +526,7 @@ break; case 3: s->predictor= PLANE; - s->decorrelate= avctx->bits_per_sample >= 24; + s->decorrelate= avctx->bits_per_coded_sample >= 24; break; case 4: s->predictor= MEDIAN; @@ -537,7 +537,7 @@ s->decorrelate= 0; break; } - s->bitstream_bpp= avctx->bits_per_sample & ~7; + s->bitstream_bpp= avctx->bits_per_coded_sample & ~7; s->context= 0; if(read_old_huffman_tables(s) < 0) @@ -569,7 +569,7 @@ alloc_temp(s); -// av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_sample, s->interlaced); +// av_log(NULL, AV_LOG_DEBUG, "pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced); return 0; } @@ -626,7 +626,7 @@ av_log(avctx, AV_LOG_ERROR, "format not supported\n"); return -1; } - avctx->bits_per_sample= s->bitstream_bpp; + avctx->bits_per_coded_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; @@ -717,7 +717,7 @@ s->stats[i][j]= 0; } -// printf("pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_sample, s->interlaced); +// printf("pred:%d bpp:%d hbpp:%d il:%d\n", s->predictor, s->bitstream_bpp, avctx->bits_per_coded_sample, s->interlaced); alloc_temp(s);