diff mbox series

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

Message ID AS8P250MB0744FD78BE0127942DE76FC98F2A9@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/g2meet.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 4367af3dc0..7c1f8325c4 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -120,7 +120,7 @@  typedef struct ePICContext {
 typedef struct JPGContext {
     BlockDSPContext bdsp;
     IDCTDSPContext idsp;
-    ScanTable  scantable;
+    uint8_t    scantable[64];
 
     VLC        dc_vlc[2], ac_vlc[2];
     int        prev_dc[3];
@@ -182,8 +182,8 @@  static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c)
 
     ff_blockdsp_init(&c->bdsp);
     ff_idctdsp_init(&c->idsp, avctx);
-    ff_init_scantable(c->idsp.idct_permutation, &c->scantable,
-                      ff_zigzag_direct);
+    ff_permute_scantable(c->scantable, ff_zigzag_direct,
+                         c->idsp.idct_permutation);
 
     return 0;
 }
@@ -251,7 +251,7 @@  static int jpg_decode_block(JPGContext *c, GetBitContext *gb,
 
             val                                 = get_xbits(gb, nbits);
             val                                *= qmat[ff_zigzag_direct[pos]];
-            block[c->scantable.permutated[pos]] = val;
+            block[c->scantable[pos]] = val;
         }
     }
     return 0;