[FFmpeg-cvslog] avcodec/snow: Move initializing HpelDSPContext to snowenc.c
Andreas Rheinhardt
git at videolan.org
Fri Sep 29 03:03:37 EEST 2023
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Oct 9 06:20:33 2022 +0200| [433925ac4d4a1eb0d2364e81e9f3e51e5d237895] | committer: Andreas Rheinhardt
avcodec/snow: Move initializing HpelDSPContext to snowenc.c
Only used by the encoder.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=433925ac4d4a1eb0d2364e81e9f3e51e5d237895
---
configure | 2 +-
libavcodec/snow.c | 1 -
libavcodec/snowenc.c | 2 ++
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index e1afcaa586..b58dbe37ba 100755
--- a/configure
+++ b/configure
@@ -2979,7 +2979,7 @@ screenpresso_decoder_deps="zlib"
shorten_decoder_select="bswapdsp"
sipr_decoder_select="lsp"
smvjpeg_decoder_select="mjpeg_decoder"
-snow_decoder_select="dwt h264qpel hpeldsp rangecoder videodsp"
+snow_decoder_select="dwt h264qpel rangecoder videodsp"
snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder videodsp"
sonic_decoder_select="golomb rangecoder"
sonic_encoder_select="golomb rangecoder"
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 3bf1e8bdf8..690d8c2ce5 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -401,7 +401,6 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
s->max_ref_frames=1; //just make sure it's not an invalid value in case of no initial keyframe
s->spatial_decomposition_count = 1;
- ff_hpeldsp_init(&s->hdsp, avctx->flags);
ff_videodsp_init(&s->vdsp, 8);
ff_dwt_init(&s->dwt);
ff_h264qpel_init(&s->h264qpel, 8);
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 84a6d1378b..a09f81939d 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -152,6 +152,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->plane[plane_index].fast_mc= 1;
}
+ // Must be before ff_snow_common_init()
+ ff_hpeldsp_init(&s->hdsp, avctx->flags);
if ((ret = ff_snow_common_init(avctx)) < 0) {
return ret;
}
More information about the ffmpeg-cvslog
mailing list