aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-11-03 01:17:04 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-11-06 17:41:26 +0100
commitfd0e37f126b3dc2d0c352869cb8e5f568e5906f3 (patch)
treeec7540cd83c051bc604d28603997fb3989590450
parent8fcaa3f2a8496dad3c789115300113a89433ab50 (diff)
downloadffmpeg-fd0e37f126b3dc2d0c352869cb8e5f568e5906f3.tar.gz
avcodec/mpegvideo_enc: Move initializing QpelDSPCtx to mpeg4videoenc.c
It is the only encoder supporting quarter samples. This also allows to remove the qpeldsp dependency from mpegvideo_enc. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rwxr-xr-xconfigure4
-rw-r--r--libavcodec/mpeg4videoenc.c1
-rw-r--r--libavcodec/mpegvideo_enc.c1
3 files changed, 3 insertions, 3 deletions
diff --git a/configure b/configure
index c54dd2dda5..0f3042b8a7 100755
--- a/configure
+++ b/configure
@@ -2754,7 +2754,7 @@ mpegaudio_select="mpegaudiodsp mpegaudioheader"
mpegaudiodsp_select="dct"
mpegvideo_select="blockdsp hpeldsp idctdsp videodsp"
mpegvideodec_select="h264chroma mpegvideo mpeg_er"
-mpegvideoenc_select="aandcttables fdctdsp me_cmp mpegvideo pixblockdsp qpeldsp"
+mpegvideoenc_select="aandcttables fdctdsp me_cmp mpegvideo pixblockdsp"
msmpeg4dec_select="h263_decoder"
msmpeg4enc_select="h263_encoder"
vc1dsp_select="h264chroma qpeldsp startcode"
@@ -2893,7 +2893,7 @@ mpeg1video_encoder_select="mpegvideoenc"
mpeg2video_decoder_select="mpegvideodec"
mpeg2video_encoder_select="mpegvideoenc"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
-mpeg4_encoder_select="h263_encoder"
+mpeg4_encoder_select="h263_encoder qpeldsp"
msa1_decoder_select="mss34dsp"
mscc_decoder_select="inflate_wrapper"
msmpeg4v1_decoder_select="msmpeg4dec"
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 77f960a262..a2a14afbd0 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1287,6 +1287,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
+ ff_qpeldsp_init(&s->qdsp);
if ((ret = ff_mpv_encode_init(avctx)) < 0)
return ret;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 1bcc849782..9b11c5c05a 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -807,7 +807,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
ff_me_cmp_init(&s->mecc, avctx);
ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
ff_pixblockdsp_init(&s->pdsp, avctx);
- ff_qpeldsp_init(&s->qdsp);
if (!(avctx->stats_out = av_mallocz(256)) ||
!FF_ALLOCZ_TYPED_ARRAY(s->q_intra_matrix, 32) ||