diff mbox series

[FFmpeg-devel,09/20] avcodec/snow: Move initializing MotionEstContext to snowenc.c

Message ID AS8P250MB0744852253587D93742E23F78F209@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 28ac2279adb860ea8b90d3073603912bf3eb6a83
Headers show
Series [FFmpeg-devel,1/8] configure: Remove dependencies of inexistant rtjpeg decoder | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 10, 2022, 3:12 a.m. UTC
Only used by the encoder.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 configure            | 2 +-
 libavcodec/snow.c    | 2 --
 libavcodec/snowenc.c | 2 ++
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Michael Niedermayer Oct. 10, 2022, 4:14 p.m. UTC | #1
On Mon, Oct 10, 2022 at 05:12:59AM +0200, Andreas Rheinhardt wrote:
> Only used by the encoder.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  configure            | 2 +-
>  libavcodec/snow.c    | 2 --
>  libavcodec/snowenc.c | 2 ++
>  3 files changed, 3 insertions(+), 3 deletions(-)

LGTM

thx

[...]
diff mbox series

Patch

diff --git a/configure b/configure
index b16a46cab8..f3fd91f592 100755
--- a/configure
+++ b/configure
@@ -2946,7 +2946,7 @@  screenpresso_decoder_deps="zlib"
 shorten_decoder_select="bswapdsp"
 sipr_decoder_select="lsp"
 smvjpeg_decoder_select="mjpeg_decoder"
-snow_decoder_select="dwt h264qpel hpeldsp me_cmp rangecoder videodsp"
+snow_decoder_select="dwt h264qpel hpeldsp 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 aa15fccc42..cde09902c3 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -23,7 +23,6 @@ 
 #include "avcodec.h"
 #include "decode.h"
 #include "encode.h"
-#include "me_cmp.h"
 #include "snow_dwt.h"
 #include "snow.h"
 #include "snowdata.h"
@@ -434,7 +433,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_me_cmp_init(&s->mecc, avctx);
     ff_hpeldsp_init(&s->hdsp, avctx->flags);
     ff_videodsp_init(&s->vdsp, 8);
     ff_dwt_init(&s->dwt);
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index c5ff50639e..ea0d4fc27f 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -26,6 +26,7 @@ 
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "encode.h"
+#include "me_cmp.h"
 #include "packet_internal.h"
 #include "snow_dwt.h"
 #include "snow.h"
@@ -66,6 +67,7 @@  static av_cold int encode_init(AVCodecContext *avctx)
     if ((ret = ff_snow_common_init(avctx)) < 0) {
         return ret;
     }
+    ff_me_cmp_init(&s->mecc, avctx);
     ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
 
     ff_snow_alloc_blocks(s);