diff mbox series

[FFmpeg-devel,v2,15/24] avcodec/mdec: Only keep what is used from ScanTable

Message ID AS8P250MB0744B0470FB8CB9889BEAEBF8F2D9@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 60c3516941af42e1acc38f40a7c64a148cee2147
Headers show
Series [FFmpeg-devel,v2,01/24] 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. 21, 2022, 8:12 p.m. UTC
Namely ScanTable.permutated.

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

Patch

diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index f27cf84122..a1f85aa0cf 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -44,7 +44,7 @@  typedef struct MDECContext {
     BswapDSPContext bbdsp;
     IDCTDSPContext idsp;
     GetBitContext gb;
-    ScanTable scantable;
+    uint8_t permutated_scantable[64];
     int version;
     int qscale;
     int last_dc[3];
@@ -64,7 +64,7 @@  static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n)
     int level, diff, i, j, run;
     int component;
     RLTable *rl = &ff_rl_mpeg1;
-    uint8_t * const scantable = a->scantable.permutated;
+    const uint8_t *const scantable = a->permutated_scantable;
     const uint16_t *quant_matrix = a->quant_matrix;
     const int qscale = a->qscale;
 
@@ -223,8 +223,8 @@  static av_cold int decode_init(AVCodecContext *avctx)
     ff_bswapdsp_init(&a->bbdsp);
     ff_idctdsp_init(&a->idsp, avctx);
     ff_mpeg12_init_vlcs();
-    ff_init_scantable(a->idsp.idct_permutation, &a->scantable,
-                      ff_zigzag_direct);
+    ff_permute_scantable(a->permutated_scantable, ff_zigzag_direct,
+                         a->idsp.idct_permutation);
 
     avctx->pix_fmt  = AV_PIX_FMT_YUVJ420P;
     avctx->color_range = AVCOL_RANGE_JPEG;