mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-05 21:55:37 +01:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user