diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-09 00:16:14 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-12 01:31:18 +0300 |
commit | fea90e9438b0eaf529b756585b78c579051f1b38 (patch) | |
tree | 9184cb4db9ee392136009d508d5403676e9a6761 /libavcodec/vc1_block.c | |
parent | 32fb9198360402941e49aa878b9d33737b654f62 (diff) |
libavcodec/vc1: Remove bits variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vc1_block.c')
-rw-r--r-- | libavcodec/vc1_block.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 0ccaf6b022..16542dba3a 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -2632,10 +2632,10 @@ static void vc1_decode_i_blocks(VC1Context *v) if (v->s.loop_filter) ff_vc1_i_loop_filter(v); - if (get_bits_count(&s->gb) > v->bits) { + if (get_bits_left(&s->gb) < 0) { ff_er_add_slice(&s->er, 0, 0, s->mb_x, s->mb_y, ER_MB_ERROR); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", - get_bits_count(&s->gb), v->bits); + get_bits_count(&s->gb), s->gb.size_in_bits); return; } @@ -2778,11 +2778,11 @@ static int vc1_decode_i_blocks_adv(VC1Context *v) if (v->s.loop_filter) ff_vc1_i_loop_filter(v); - if (get_bits_count(&s->gb) > v->bits) { + if (get_bits_left(&s->gb) < 0) { // TODO: may need modification to handle slice coding ff_er_add_slice(&s->er, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", - get_bits_count(&s->gb), v->bits); + get_bits_count(&s->gb), s->gb.size_in_bits); return 0; } inc_blk_idx(v->topleft_blk_idx); @@ -2862,11 +2862,11 @@ static void vc1_decode_p_blocks(VC1Context *v) if (apply_loop_filter) ff_vc1_p_loop_filter(v); } - if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { + if (get_bits_left(&s->gb) < 0 || get_bits_count(&s->gb) < 0) { // TODO: may need modification to handle slice coding ff_er_add_slice(&s->er, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", - get_bits_count(&s->gb), v->bits, s->mb_x, s->mb_y); + get_bits_count(&s->gb), s->gb.size_in_bits, s->mb_x, s->mb_y); return; } inc_blk_idx(v->topleft_blk_idx); @@ -2951,11 +2951,11 @@ static void vc1_decode_b_blocks(VC1Context *v) if (v->s.loop_filter) ff_vc1_i_loop_filter(v); } - if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) { + if (get_bits_left(&s->gb) < 0 || get_bits_count(&s->gb) < 0) { // TODO: may need modification to handle slice coding ff_er_add_slice(&s->er, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", - get_bits_count(&s->gb), v->bits, s->mb_x, s->mb_y); + get_bits_count(&s->gb), s->gb.size_in_bits, s->mb_x, s->mb_y); return; } } |