[FFmpeg-cvslog] vc1: mark with ER_MB_ERROR bits overconsumption

Luca Barbato git at videolan.org
Tue Dec 13 23:33:45 CET 2011


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Nov 28 00:31:53 2011 +0100| [4f3667ba59750bf7e4c0954394c7c9e164e01c69] | committer: Luca Barbato

vc1: mark with ER_MB_ERROR bits overconsumption

This patch is a generalization of what Michael Niedermayer
fixed in a single case.

The wmv8-drm fate test had been updated accordingly.

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f3667ba59750bf7e4c0954394c7c9e164e01c69
---

 libavcodec/vc1dec.c     |    8 ++++----
 tests/ref/fate/wmv8-drm |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fd67feb..3f84df2 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -4548,7 +4548,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
             if (v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq);
 
             if (get_bits_count(&s->gb) > v->bits) {
-                ff_er_add_slice(s, 0, 0, s->mb_x, s->mb_y, ER_MB_END);
+                ff_er_add_slice(s, 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);
                 return;
@@ -4673,7 +4673,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
 
             if (get_bits_count(&s->gb) > v->bits) {
                 // TODO: may need modification to handle slice coding
-                ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_END);
+                ff_er_add_slice(s, 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);
                 return;
@@ -4749,7 +4749,7 @@ static void vc1_decode_p_blocks(VC1Context *v)
                 vc1_apply_p_loop_filter(v);
             if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) {
                 // TODO: may need modification to handle slice coding
-                ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_END);
+                ff_er_add_slice(s, 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);
                 return;
@@ -4818,7 +4818,7 @@ static void vc1_decode_b_blocks(VC1Context *v)
                 vc1_decode_b_mb(v);
             if (get_bits_count(&s->gb) > v->bits || get_bits_count(&s->gb) < 0) {
                 // TODO: may need modification to handle slice coding
-                ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_END);
+                ff_er_add_slice(s, 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);
                 return;
diff --git a/tests/ref/fate/wmv8-drm b/tests/ref/fate/wmv8-drm
index 57e9aeb..e18309b 100644
--- a/tests/ref/fate/wmv8-drm
+++ b/tests/ref/fate/wmv8-drm
@@ -127,4 +127,4 @@
 0, 472500, 84480, 0x13962590
 0, 476250, 84480, 0xde79482f
 0, 480000, 84480, 0x7d1ca064
-0, 483750, 84480, 0x7e1de54e
+0, 483750, 84480, 0x2676a064



More information about the ffmpeg-cvslog mailing list