From cf1e0786ed64e69614760bfb4ecd7adbde8e6094 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 17 Jan 2015 17:16:20 +0100 Subject: error_resilience: move the MECmpContext initialization into ER code Currently, it needs to be initialized by the ER caller (which is currently either a mpegvideo decoder or h264dec). However, since none of those decoders use MECmpContext for anything except ER, it makes more sense to handle it purely inside ER. --- libavcodec/h264.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 684c78fcdc..f9667517d7 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -490,7 +490,6 @@ int ff_h264_context_init(H264Context *h) if (CONFIG_ERROR_RESILIENCE) { /* init ER */ er->avctx = h->avctx; - er->mecc = &h->mecc; er->decode_mb = h264_er_decode_mb; er->opaque = h; er->quarter_sample = 1; @@ -619,8 +618,6 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) h->dequant_coeff_pps = -1; /* needed so that IDCT permutation is known early */ - if (CONFIG_ERROR_RESILIENCE) - ff_me_cmp_init(&h->mecc, h->avctx); ff_videodsp_init(&h->vdsp, 8); memset(h->pps.scaling_matrix4, 16, 6 * 16 * sizeof(uint8_t)); @@ -1231,8 +1228,6 @@ int ff_h264_set_parameter_from_sps(H264Context *h) ff_h264qpel_init(&h->h264qpel, h->sps.bit_depth_luma); ff_h264_pred_init(&h->hpc, h->avctx->codec_id, h->sps.bit_depth_luma, h->sps.chroma_format_idc); - if (CONFIG_ERROR_RESILIENCE) - ff_me_cmp_init(&h->mecc, h->avctx); ff_videodsp_init(&h->vdsp, h->sps.bit_depth_luma); } else { av_log(h->avctx, AV_LOG_ERROR, "Unsupported bit depth %d\n", -- cgit v1.2.3