diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-01-21 17:34:12 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-01-21 17:34:12 +0000 |
commit | 68f593b48433842f3407586679fe07f3e5199ab9 (patch) | |
tree | d4630fb579685c92841ecf5b78d3cc47456d07d1 /libavcodec/huffyuv.c | |
parent | fe50f38577887ea8e1a66a95503a97438e2d768f (diff) | |
download | ffmpeg-68f593b48433842f3407586679fe07f3e5199ab9.tar.gz |
GetBitContext.size is allways multiplied by 8 -> use size_in_bits to avoid useless *8 in a few inner loops
Originally committed as revision 1486 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r-- | libavcodec/huffyuv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 31801a32d5..cff642d11c 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -271,7 +271,7 @@ static int read_huffman_tables(HYuvContext *s, uint8_t *src, int length){ GetBitContext gb; int i; - init_get_bits(&gb, src, length); + init_get_bits(&gb, src, length*8); for(i=0; i<3; i++){ read_len_table(s->len[i], &gb); @@ -295,9 +295,9 @@ static int read_old_huffman_tables(HYuvContext *s){ GetBitContext gb; int i; - init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)); + init_get_bits(&gb, classic_shift_luma, sizeof(classic_shift_luma)*8); read_len_table(s->len[0], &gb); - init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)); + init_get_bits(&gb, classic_shift_chroma, sizeof(classic_shift_chroma)*8); read_len_table(s->len[1], &gb); for(i=0; i<256; i++) s->bits[0][i] = classic_add_luma [i]; @@ -680,7 +680,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8 bswap_buf((uint32_t*)s->bitstream_buffer, (uint32_t*)buf, buf_size/4); - init_get_bits(&s->gb, s->bitstream_buffer, buf_size); + init_get_bits(&s->gb, s->bitstream_buffer, buf_size*8); p->reference= 0; if(avctx->get_buffer(avctx, p) < 0){ |