avcodec/snow: Move initializing MotionEstContext to snowenc.c

Only used by the encoder.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/388/head
Andreas Rheinhardt 2 years ago
parent 2a7ee6dda0
commit 28ac2279ad
  1. 2
      configure
  2. 2
      libavcodec/snow.c
  3. 2
      libavcodec/snowenc.c

2
configure vendored

@ -2946,7 +2946,7 @@ screenpresso_decoder_deps="zlib"
shorten_decoder_select="bswapdsp" shorten_decoder_select="bswapdsp"
sipr_decoder_select="lsp" sipr_decoder_select="lsp"
smvjpeg_decoder_select="mjpeg_decoder" 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" snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder videodsp"
sonic_decoder_select="golomb rangecoder" sonic_decoder_select="golomb rangecoder"
sonic_encoder_select="golomb rangecoder" sonic_encoder_select="golomb rangecoder"

@ -23,7 +23,6 @@
#include "avcodec.h" #include "avcodec.h"
#include "decode.h" #include "decode.h"
#include "encode.h" #include "encode.h"
#include "me_cmp.h"
#include "snow_dwt.h" #include "snow_dwt.h"
#include "snow.h" #include "snow.h"
#include "snowdata.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->max_ref_frames=1; //just make sure it's not an invalid value in case of no initial keyframe
s->spatial_decomposition_count = 1; s->spatial_decomposition_count = 1;
ff_me_cmp_init(&s->mecc, avctx);
ff_hpeldsp_init(&s->hdsp, avctx->flags); ff_hpeldsp_init(&s->hdsp, avctx->flags);
ff_videodsp_init(&s->vdsp, 8); ff_videodsp_init(&s->vdsp, 8);
ff_dwt_init(&s->dwt); ff_dwt_init(&s->dwt);

@ -26,6 +26,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "codec_internal.h" #include "codec_internal.h"
#include "encode.h" #include "encode.h"
#include "me_cmp.h"
#include "packet_internal.h" #include "packet_internal.h"
#include "snow_dwt.h" #include "snow_dwt.h"
#include "snow.h" #include "snow.h"
@ -66,6 +67,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
if ((ret = ff_snow_common_init(avctx)) < 0) { if ((ret = ff_snow_common_init(avctx)) < 0) {
return ret; return ret;
} }
ff_me_cmp_init(&s->mecc, avctx);
ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx); ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
ff_snow_alloc_blocks(s); ff_snow_alloc_blocks(s);

Loading…
Cancel
Save