From e63b818dbe6060b606ae10eb184859f8b97d2353 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 7 Feb 2014 11:04:24 +0100 Subject: dv: Properly split decoder and encoder initialization --- libavcodec/dvenc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libavcodec/dvenc.c') diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c index 94fb7eaf6f..5b013adf51 100644 --- a/libavcodec/dvenc.c +++ b/libavcodec/dvenc.c @@ -28,6 +28,7 @@ #include "libavutil/pixdesc.h" #include "config.h" #include "avcodec.h" +#include "dsputil.h" #include "internal.h" #include "put_bits.h" #include "dv.h" @@ -36,6 +37,7 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) { DVVideoContext *s = avctx->priv_data; + DSPContext dsp; int ret; s->sys = avpriv_dv_codec_profile(avctx); @@ -58,6 +60,15 @@ static av_cold int dvvideo_encode_init(AVCodecContext *avctx) dv_vlc_map_tableinit(); + ff_dsputil_init(&dsp, avctx); + ff_set_cmp(&dsp, dsp.ildct_cmp, avctx->ildct_cmp); + + s->get_pixels = dsp.get_pixels; + s->ildct_cmp = dsp.ildct_cmp[5]; + + s->fdct[0] = dsp.fdct; + s->fdct[1] = dsp.fdct248; + return ff_dvvideo_init(avctx); } -- cgit v1.2.3