diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 14:56:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 14:56:52 +0100 |
commit | 3d0411707839d3af1f34e0a8c7c8cbe4dd02b1ba (patch) | |
tree | b8acca47871747e129ca6b33b06ea603fd9c6a9d /libavcodec/error_resilience.c | |
parent | a1cdd1f08e06582c93fe66eacfc7c09e42321115 (diff) | |
parent | cf1e0786ed64e69614760bfb4ecd7adbde8e6094 (diff) | |
download | ffmpeg-3d0411707839d3af1f34e0a8c7c8cbe4dd02b1ba.tar.gz |
Merge commit 'cf1e0786ed64e69614760bfb4ecd7adbde8e6094'
* commit 'cf1e0786ed64e69614760bfb4ecd7adbde8e6094':
error_resilience: move the MECmpContext initialization into ER code
Conflicts:
libavcodec/error_resilience.c
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 2a4de4343a..4fa7bc4e21 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -30,6 +30,7 @@ #include "libavutil/internal.h" #include "avcodec.h" #include "error_resilience.h" +#include "me_cmp.h" #include "mpegutils.h" #include "mpegvideo.h" #include "rectangle.h" @@ -736,12 +737,12 @@ static int is_intra_more_likely(ERContext *s) } else { ff_thread_await_progress(s->last_pic.tf, mb_y, 0); } - is_intra_likely += s->mecc->sad[0](NULL, last_mb_ptr, mb_ptr, - linesize[0], 16); + is_intra_likely += s->mecc.sad[0](NULL, last_mb_ptr, mb_ptr, + linesize[0], 16); // FIXME need await_progress() here - is_intra_likely -= s->mecc->sad[0](NULL, last_mb_ptr, - last_mb_ptr + linesize[0] * 16, - linesize[0], 16); + is_intra_likely -= s->mecc.sad[0](NULL, last_mb_ptr, + last_mb_ptr + linesize[0] * 16, + linesize[0], 16); } else { if (IS_INTRA(s->cur_pic.mb_type[mb_xy])) is_intra_likely++; @@ -759,6 +760,11 @@ void ff_er_frame_start(ERContext *s) if (!s->avctx->error_concealment) return; + if (!s->mecc_inited) { + ff_me_cmp_init(&s->mecc, s->avctx); + s->mecc_inited = 1; + } + memset(s->error_status_table, ER_MB_ERROR | VP_START | ER_MB_END, s->mb_stride * s->mb_height * sizeof(uint8_t)); s->error_count = 3 * s->mb_num; |