[FFmpeg-devel] [PATCH v2 10/69] avcodec/wmv2: Move initializing abt_scantables to the decoder
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Feb 1 15:06:07 EET 2022
They are not used by the encoder at all.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/wmv2.c | 6 ------
libavcodec/wmv2dec.c | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c
index fd64a0938f..57e1267782 100644
--- a/libavcodec/wmv2.c
+++ b/libavcodec/wmv2.c
@@ -20,11 +20,9 @@
#include "avcodec.h"
#include "idctdsp.h"
-#include "mpegutils.h"
#include "mpegvideo.h"
#include "msmpeg4data.h"
#include "wmv2.h"
-#include "wmv2data.h"
av_cold void ff_wmv2_common_init(Wmv2Context *w)
@@ -36,10 +34,6 @@ av_cold void ff_wmv2_common_init(Wmv2Context *w)
s->idsp.perm_type = w->wdsp.idct_perm;
ff_init_scantable_permutation(s->idsp.idct_permutation,
w->wdsp.idct_perm);
- ff_init_scantable(s->idsp.idct_permutation, &w->abt_scantable[0],
- ff_wmv2_scantableA);
- ff_init_scantable(s->idsp.idct_permutation, &w->abt_scantable[1],
- ff_wmv2_scantableB);
ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable,
ff_wmv1_scantable[1]);
ff_init_scantable(s->idsp.idct_permutation, &s->intra_h_scantable,
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 7518088b6a..dd0e2683f5 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -29,6 +29,7 @@
#include "msmpeg4data.h"
#include "simple_idct.h"
#include "wmv2.h"
+#include "wmv2data.h"
static void wmv2_add_block(Wmv2Context *w, int16_t *block1,
@@ -537,12 +538,17 @@ int ff_wmv2_decode_mb(MpegEncContext *s, int16_t block[6][64])
static av_cold int wmv2_decode_init(AVCodecContext *avctx)
{
Wmv2Context *const w = avctx->priv_data;
+ MpegEncContext *const s = &w->s;
int ret;
if ((ret = ff_msmpeg4_decode_init(avctx)) < 0)
return ret;
ff_wmv2_common_init(w);
+ ff_init_scantable(s->idsp.idct_permutation, &w->abt_scantable[0],
+ ff_wmv2_scantableA);
+ ff_init_scantable(s->idsp.idct_permutation, &w->abt_scantable[1],
+ ff_wmv2_scantableB);
return ff_intrax8_common_init(avctx, &w->x8, &w->s.idsp,
w->s.block, w->s.block_last_index,
--
2.32.0
More information about the ffmpeg-devel
mailing list