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/mpeg12.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/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 5ef4e06280..9c32aa493c 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1467,7 +1467,7 @@ static int mpeg1_decode_picture(AVCodecContext *avctx, MpegEncContext *s = &s1->mpeg_enc_ctx; int ref, f_code; - init_get_bits(&s->gb, buf, buf_size); + init_get_bits(&s->gb, buf, buf_size*8); ref = get_bits(&s->gb, 10); /* temporal ref */ s->pict_type = get_bits(&s->gb, 3); @@ -1619,7 +1619,7 @@ static void mpeg_decode_extension(AVCodecContext *avctx, MpegEncContext *s = &s1->mpeg_enc_ctx; int ext_type; - init_get_bits(&s->gb, buf, buf_size); + init_get_bits(&s->gb, buf, buf_size*8); ext_type = get_bits(&s->gb, 4); switch(ext_type) { @@ -1684,7 +1684,7 @@ static int mpeg_decode_slice(AVCodecContext *avctx, } } - init_get_bits(&s->gb, buf, buf_size); + init_get_bits(&s->gb, buf, buf_size*8); s->qscale = get_qscale(s); /* extra slice info */ @@ -1793,7 +1793,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, int width, height, i, v, j; float aspect; - init_get_bits(&s->gb, buf, buf_size); + init_get_bits(&s->gb, buf, buf_size*8); width = get_bits(&s->gb, 12); height = get_bits(&s->gb, 12); |