|
|
|
@ -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; |
|
|
|
|