summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-20 05:48:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-24 00:47:07 +0200
commitec2b07db79dbbd58329bf5ec19ecf867b21a38b7 (patch)
tree4a2ff727219ee45e4e126c4e9af1214882be38ee
parent9f64b067580105afa82dc04fa3b985c20ef17971 (diff)
avcodec/intrax8: Only keep what is used from ScanTable
Namely ScanTable.permutated. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/intrax8.c15
-rw-r--r--libavcodec/intrax8.h3
2 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index f88baf8daf..d6668338fb 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -25,6 +25,7 @@
#include "libavutil/thread.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "idctdsp.h"
#include "msmpeg4data.h"
#include "intrax8huf.h"
#include "intrax8.h"
@@ -576,7 +577,7 @@ static int x8_decode_intra_mb(IntraX8Context *const w, const int chroma)
x8_select_ac_table(w, ac_mode);
/* scantable_selector[12] = { 0, 2, 0, 1, 1, 1, 0, 2, 2, 0, 1, 2 }; <-
* -> 10'01' 00'10' 10'00' 01'01' 01'00' 10'00 => 0x928548 */
- scantable = w->scantable[(0x928548 >> (2 * w->orient)) & 3].permutated;
+ scantable = w->permutated_scantable[(0x928548 >> (2 * w->orient)) & 3];
pos = 0;
do {
n++;
@@ -714,12 +715,12 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
ff_init_scantable_permutation(w->idct_permutation,
w->wdsp.idct_perm);
- ff_init_scantable(w->idct_permutation, &w->scantable[0],
- ff_wmv1_scantable[0]);
- ff_init_scantable(w->idct_permutation, &w->scantable[1],
- ff_wmv1_scantable[2]);
- ff_init_scantable(w->idct_permutation, &w->scantable[2],
- ff_wmv1_scantable[3]);
+ ff_permute_scantable(w->permutated_scantable[0], ff_wmv1_scantable[0],
+ w->idct_permutation);
+ ff_permute_scantable(w->permutated_scantable[1], ff_wmv1_scantable[2],
+ w->idct_permutation);
+ ff_permute_scantable(w->permutated_scantable[2], ff_wmv1_scantable[3],
+ w->idct_permutation);
ff_intrax8dsp_init(&w->dsp);
ff_blockdsp_init(&w->bdsp);
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index 9ef2fc3dd3..8e22361f1f 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -21,7 +21,6 @@
#include "blockdsp.h"
#include "get_bits.h"
-#include "idctdsp.h"
#include "intrax8dsp.h"
#include "wmv2dsp.h"
#include "mpegpicture.h"
@@ -35,7 +34,7 @@ typedef struct IntraX8Context {
// set by ff_intrax8_common_init
uint8_t *prediction_table; // 2 * (mb_w * 2)
- ScanTable scantable[3];
+ uint8_t permutated_scantable[3][64];
WMV2DSPContext wdsp;
uint8_t idct_permutation[64];
AVCodecContext *avctx;