diff mbox series

[FFmpeg-devel,16/22] avcodec/mimic: Only keep what is used from ScanTable

Message ID AS8P250MB07442A9D4B22DFE5D4947E568F2A9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Superseded
Headers show
Series [FFmpeg-devel,01/22] configure: Add idctdsp dependency to codecs that need it | 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. 20, 2022, 8:45 a.m. UTC
Namely ScanTable.permutated.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mimic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 74eaa7d043..153bd061f5 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -56,7 +56,7 @@  typedef struct MimicContext {
     DECLARE_ALIGNED(32, int16_t, dct_block)[64];
 
     GetBitContext   gb;
-    ScanTable       scantable;
+    uint8_t         scantable[64];
     BlockDSPContext bdsp;
     BswapDSPContext bbdsp;
     HpelDSPContext  hdsp;
@@ -137,7 +137,7 @@  static av_cold int mimic_decode_init(AVCodecContext *avctx)
     ff_bswapdsp_init(&ctx->bbdsp);
     ff_hpeldsp_init(&ctx->hdsp, avctx->flags);
     ff_idctdsp_init(&ctx->idsp, avctx);
-    ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable, col_zag);
+    ff_permute_scantable(ctx->scantable, col_zag, ctx->idsp.idct_permutation);
 
     for (i = 0; i < FF_ARRAY_ELEMS(ctx->frames); i++) {
         ctx->frames[i].f = av_frame_alloc();
@@ -250,7 +250,7 @@  static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale)
         else /* TODO Use >> 10 instead of / 1001 */
             coeff = (coeff * qscale) / 1001;
 
-        block[ctx->scantable.permutated[pos]] = coeff;
+        block[ctx->scantable[pos]] = coeff;
     }
 
     return 0;