[FFmpeg-cvslog] avcodec/wmv2dec: Remove unnecessary ScanTables

Andreas Rheinhardt git at videolan.org
Mon Oct 24 02:41:43 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Oct 20 05:56:44 2022 +0200| [de133d22dabbb1b00382510d1d3f94bea197ba3f] | committer: Andreas Rheinhardt

avcodec/wmv2dec: Remove unnecessary ScanTables

Only ScanTable.scantable is used for the abt_scantables.

Reviewed-by: Peter Ross <pross at xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de133d22dabbb1b00382510d1d3f94bea197ba3f
---

 libavcodec/wmv2dec.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index f638b31cec..a70913134c 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -52,7 +52,6 @@ typedef struct WMV2DecContext {
     int per_mb_rl_bit;
     int skip_type;
 
-    ScanTable abt_scantable[2];
     DECLARE_ALIGNED(32, int16_t, abt_block2)[6][64];
 } WMV2DecContext;
 
@@ -425,9 +424,7 @@ static inline int wmv2_decode_inter_block(WMV2DecContext *w, int16_t *block,
     w->abt_type_table[n] = w->abt_type;
 
     if (w->abt_type) {
-//        const uint8_t *scantable = w->abt_scantable[w->abt_type - 1].permutated;
-        const uint8_t *scantable = w->abt_scantable[w->abt_type - 1].scantable;
-//        const uint8_t *scantable = w->abt_type - 1 ? w->abt_scantable[1].permutated : w->abt_scantable[0].scantable;
+        const uint8_t *scantable = w->abt_type == 1 ? ff_wmv2_scantableA : ff_wmv2_scantableB;
 
         sub_cbp = sub_cbp_table[decode012(&s->gb)];
 
@@ -577,10 +574,6 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
         return ret;
 
     ff_wmv2_common_init(s);
-    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.block, w->s.block_last_index,



More information about the ffmpeg-cvslog mailing list