From 68f593b48433842f3407586679fe07f3e5199ab9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 21 Jan 2003 17:34:12 +0000 Subject: 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 --- libavcodec/dv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavcodec/dv.c') diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 404f018..f312c02 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -195,7 +195,7 @@ static void dv_decode_ac(DVVideoDecodeContext *s, v, partial_bit_count, (mb->partial_bit_buffer << l)); #endif /* try to read the codeword */ - init_get_bits(&gb1, buf, 4); + init_get_bits(&gb1, buf, 4*8); { OPEN_READER(re1, &gb1); UPDATE_CACHE(re1, &gb1); @@ -333,7 +333,7 @@ static inline void dv_decode_video_segment(DVVideoDecodeContext *s, block = block1; for(j = 0;j < 6; j++) { /* NOTE: size is not important here */ - init_get_bits(&s->gb, buf_ptr, 14); + init_get_bits(&s->gb, buf_ptr, 14*8); /* get the dc */ dc = get_bits(&s->gb, 9); @@ -382,7 +382,7 @@ static inline void dv_decode_video_segment(DVVideoDecodeContext *s, #endif block = block1; mb = mb1; - init_get_bits(&s->gb, mb_bit_buffer, 80); + init_get_bits(&s->gb, mb_bit_buffer, 80*8); for(j = 0;j < 6; j++) { if (!mb->eob_reached && s->gb.index < mb_bit_count) { dv_decode_ac(s, mb, block, mb_bit_count); @@ -421,7 +421,7 @@ static inline void dv_decode_video_segment(DVVideoDecodeContext *s, #endif block = &s->block[0][0]; mb = mb_data; - init_get_bits(&s->gb, vs_bit_buffer, 5 * 80); + init_get_bits(&s->gb, vs_bit_buffer, 5 * 80*8); for(mb_index = 0; mb_index < 5; mb_index++) { for(j = 0;j < 6; j++) { if (!mb->eob_reached) { @@ -501,7 +501,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, const UINT16 *mb_pos_ptr; /* parse id */ - init_get_bits(&s->gb, buf, buf_size); + init_get_bits(&s->gb, buf, buf_size*8); sct = get_bits(&s->gb, 3); if (sct != 0) return -1; -- cgit v1.1