diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2011-11-28 00:31:52 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2011-12-13 16:20:58 +0100 |
commit | 63ccd466873b0863d466f5846a305eb908fe3b80 (patch) | |
tree | 621431453b05ed6dab391e13ec28ad8ca4e33e33 /libavcodec/vc1dec.c | |
parent | 5bf2ac2b37ae17df7f2bd541801bec8c049b8d2c (diff) | |
download | ffmpeg-63ccd466873b0863d466f5846a305eb908fe3b80.tar.gz |
lavc: introduce ER_MB_END and ER_MB_ERROR
Simplify a little error resilience calls
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index d28a8b7375..fd67feb116 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_AC_END|ER_DC_END|ER_MV_END)); + ff_er_add_slice(s, 0, 0, s->mb_x, s->mb_y, ER_MB_END); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", get_bits_count(&s->gb), v->bits); return; @@ -4563,7 +4563,7 @@ static void vc1_decode_i_blocks(VC1Context *v) } if (v->s.loop_filter) ff_draw_horiz_band(s, (s->mb_height - 1) * 16, 16); - ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, (ER_AC_END|ER_DC_END|ER_MV_END)); + ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, ER_MB_END); } /** Decode blocks of I-frame for advanced profile @@ -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_AC_END|ER_DC_END|ER_MV_END)); + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_END); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", get_bits_count(&s->gb), v->bits); return; @@ -4698,7 +4698,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) if (v->s.loop_filter) ff_draw_horiz_band(s, (s->end_mb_y-1)*16, 16); ff_er_add_slice(s, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, - (s->end_mb_y << v->field_mode) - 1, (ER_AC_END|ER_DC_END|ER_MV_END)); + (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } static void vc1_decode_p_blocks(VC1Context *v) @@ -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_AC_END|ER_DC_END|ER_MV_END)); + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_END); 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; @@ -4773,7 +4773,7 @@ static void vc1_decode_p_blocks(VC1Context *v) if (s->end_mb_y >= s->start_mb_y) ff_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); ff_er_add_slice(s, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, - (s->end_mb_y << v->field_mode) - 1, (ER_AC_END|ER_DC_END|ER_MV_END)); + (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } static void vc1_decode_b_blocks(VC1Context *v) @@ -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_AC_END|ER_DC_END|ER_MV_END)); + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_END); 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; @@ -4834,14 +4834,14 @@ static void vc1_decode_b_blocks(VC1Context *v) if (v->s.loop_filter) ff_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); ff_er_add_slice(s, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, - (s->end_mb_y << v->field_mode) - 1, (ER_AC_END|ER_DC_END|ER_MV_END)); + (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } static void vc1_decode_skip_blocks(VC1Context *v) { MpegEncContext *s = &v->s; - ff_er_add_slice(s, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, (ER_AC_END|ER_DC_END|ER_MV_END)); + ff_er_add_slice(s, 0, s->start_mb_y, s->mb_width - 1, s->end_mb_y - 1, ER_MB_END); s->first_slice_line = 1; for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) { s->mb_x = 0; |