diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-03-26 16:43:57 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-04-10 11:03:53 +0300 |
commit | 85deb51a01f1ecc5ac5faa52ad8ea141c384e23a (patch) | |
tree | f707e4ff915a50aeb149e3abde2178e3485efb4a /libavcodec/h264.c | |
parent | 62844c3fd66940c7747e9b2bb7804e265319f43f (diff) | |
download | ffmpeg-85deb51a01f1ecc5ac5faa52ad8ea141c384e23a.tar.gz |
h264: Only initialize dsputil if error resilience is enabled
It is only used for error resilience. This allows building the
h264 decoder without dsputil, if error resilience is disabled.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 7d7f37601a..4a3d2e7512 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1440,7 +1440,8 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) h->dequant_coeff_pps = -1; /* needed so that IDCT permutation is known early */ - ff_dsputil_init(&h->dsp, h->avctx); + if (CONFIG_ERROR_RESILIENCE) + ff_dsputil_init(&h->dsp, h->avctx); ff_videodsp_init(&h->vdsp, 8); memset(h->pps.scaling_matrix4, 16, 6 * 16 * sizeof(uint8_t)); @@ -2915,7 +2916,8 @@ static int h264_set_parameter_from_sps(H264Context *h) ff_h264_pred_init(&h->hpc, h->avctx->codec_id, h->sps.bit_depth_luma, h->sps.chroma_format_idc); h->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16; - ff_dsputil_init(&h->dsp, h->avctx); + if (CONFIG_ERROR_RESILIENCE) + ff_dsputil_init(&h->dsp, 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", |