diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 21:46:28 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-16 21:54:56 +0400 |
commit | 1fad547cefb4d2f3ed3d764b547ee16cf399e477 (patch) | |
tree | e0c261a8eb1823e1ab9235d1ff7c66a8058a247c /libavcodec/h263dec.c | |
parent | 2bac1535db970e981e90306d64f2252be4c9fd63 (diff) | |
parent | 54974c62982ae827becdbdb9b620b7ba75d079a0 (diff) |
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/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index d5dc152623..898016c885 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -194,7 +194,7 @@ static int decode_slice(MpegEncContext *s){ /* per-row end of slice checks */ if(s->msmpeg4_version){ if(s->resync_mb_y + s->slice_height == s->mb_y){ - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); + ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return 0; } @@ -235,7 +235,7 @@ static int decode_slice(MpegEncContext *s){ if(s->loop_filter) ff_h263_loop_filter(s); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); + ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); s->padding_bug_score--; @@ -248,11 +248,11 @@ static int decode_slice(MpegEncContext *s){ return 0; }else if(ret==SLICE_NOEND){ av_log(s->avctx, AV_LOG_ERROR, "Slice mismatch at MB: %d\n", xy); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x+1, s->mb_y, ER_MB_END&part_mask); + ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y, s->mb_x+1, s->mb_y, ER_MB_END&part_mask); return AVERROR_INVALIDDATA; } av_log(s->avctx, AV_LOG_ERROR, "Error at MB: %d\n", xy); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR&part_mask); + ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR&part_mask); return AVERROR_INVALIDDATA; } @@ -331,7 +331,7 @@ static int decode_slice(MpegEncContext *s){ else if(left<0){ av_log(s->avctx, AV_LOG_ERROR, "overreading %d bits\n", -left); }else - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); + ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return 0; } @@ -340,7 +340,7 @@ static int decode_slice(MpegEncContext *s){ get_bits_left(&s->gb), show_bits(&s->gb, 24), s->padding_bug_score); - ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); + ff_er_add_slice(&s->er, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); return AVERROR_INVALIDDATA; } @@ -666,7 +666,7 @@ retry: return ret; } - ff_er_frame_start(s); + ff_mpeg_er_frame_start(s); //the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type //which is not available before ff_MPV_frame_start() @@ -690,7 +690,7 @@ retry: if(ff_h263_resync(s)<0) break; if (prev_y * s->mb_width + prev_x < s->mb_y * s->mb_width + s->mb_x) - s->error_occurred = 1; + s->er.error_occurred = 1; } if(s->msmpeg4_version<4 && s->h263_pred) @@ -701,7 +701,7 @@ retry: if (s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type==AV_PICTURE_TYPE_I) if(!CONFIG_MSMPEG4_DECODER || ff_msmpeg4_decode_ext_header(s, buf_size) < 0){ - s->error_status_table[s->mb_num-1]= ER_MB_ERROR; + s->er.error_status_table[s->mb_num - 1] = ER_MB_ERROR; } av_assert1(s->bitstream_buffer_size==0); @@ -734,7 +734,7 @@ frame_end: } intrax8_decoded: - ff_er_frame_end(s); + ff_er_frame_end(&s->er); if (avctx->hwaccel) { if ((ret = avctx->hwaccel->end_frame(avctx)) < 0) |