diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 18:46:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 18:54:56 +0100 |
commit | 1fad547cefb4d2f3ed3d764b547ee16cf399e477 (patch) | |
tree | e0c261a8eb1823e1ab9235d1ff7c66a8058a247c /libavcodec/vc1dec.c | |
parent | 2bac1535db970e981e90306d64f2252be4c9fd63 (diff) | |
parent | 54974c62982ae827becdbdb9b620b7ba75d079a0 (diff) | |
download | ffmpeg-1fad547cefb4d2f3ed3d764b547ee16cf399e477.tar.gz |
Merge commit '54974c62982ae827becdbdb9b620b7ba75d079a0'
* commit '54974c62982ae827becdbdb9b620b7ba75d079a0':
error_resilience: decouple ER from MpegEncContext
Conflicts:
libavcodec/error_resilience.c
libavcodec/h263dec.c
libavcodec/h264.c
libavcodec/mpegvideo.c
libavcodec/vc1dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b4e89c6663..e0792ed5ef 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -4447,7 +4447,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_ERROR); + 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); return; @@ -4465,7 +4465,7 @@ static void vc1_decode_i_blocks(VC1Context *v) /* This is intentionally mb_height and not end_mb_y - unlike in advanced * profile, these only differ are when decoding MSS2 rectangles. */ - ff_er_add_slice(s, 0, 0, s->mb_width - 1, s->mb_height - 1, ER_MB_END); + ff_er_add_slice(&s->er, 0, 0, s->mb_width - 1, s->mb_height - 1, ER_MB_END); } /** Decode blocks of I-frame for advanced profile @@ -4575,7 +4575,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_ERROR); + 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); return; @@ -4600,7 +4600,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, + ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } @@ -4652,7 +4652,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_ERROR); + 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); return; @@ -4675,7 +4675,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, + ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } @@ -4721,7 +4721,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_ERROR); + 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); return; @@ -4736,7 +4736,7 @@ 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, + ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } @@ -4744,7 +4744,7 @@ 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_MB_END); + ff_er_add_slice(&s->er, 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; @@ -5643,7 +5643,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, if (v->fcm == ILACE_FRAME && s->pict_type == AV_PICTURE_TYPE_B) goto err; // This codepath is still incomplete thus it is disabled - ff_er_frame_start(s); + ff_mpeg_er_frame_start(s); v->bits = buf_size * 8; v->end_mb_x = s->mb_width; @@ -5733,10 +5733,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, get_bits_count(&s->gb), s->gb.size_in_bits); // if (get_bits_count(&s->gb) > buf_size * 8) // return -1; - if(s->error_occurred && s->pict_type == AV_PICTURE_TYPE_B) + if(s->er.error_occurred && s->pict_type == AV_PICTURE_TYPE_B) goto err; if(!v->field_mode) - ff_er_frame_end(s); + ff_er_frame_end(&s->er); } ff_MPV_frame_end(s); |