[FFmpeg-devel] [PATCH 19/22] avcodec/speedhq: Only keep what is used from ScanTable
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Oct 20 11:45:37 EEST 2022
Namely ScanTable.permutated.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/speedhq.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index 6dbba02776..c9bb2e8418 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -54,7 +54,7 @@ typedef struct SHQContext {
AVCodecContext *avctx;
BlockDSPContext bdsp;
IDCTDSPContext idsp;
- ScanTable intra_scantable;
+ uint8_t intra_scantable[64];
int quant_matrix[64];
enum { SHQ_SUBSAMPLING_420, SHQ_SUBSAMPLING_422, SHQ_SUBSAMPLING_444 }
subsampling;
@@ -223,7 +223,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin
static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int last_dc[4], int component, uint8_t *dest, int linesize)
{
const int *quant_matrix = s->quant_matrix;
- const uint8_t *scantable = s->intra_scantable.permutated;
+ const uint8_t *scantable = s->intra_scantable;
LOCAL_ALIGNED_32(int16_t, block, [64]);
int dc_offset;
@@ -667,7 +667,8 @@ static av_cold int speedhq_decode_init(AVCodecContext *avctx)
ff_blockdsp_init(&s->bdsp);
ff_idctdsp_init(&s->idsp, avctx);
- ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
+ ff_permute_scantable(s->intra_scantable, ff_zigzag_direct,
+ s->idsp.idct_permutation);
switch (avctx->codec_tag) {
case MKTAG('S', 'H', 'Q', '0'):
--
2.34.1
More information about the ffmpeg-devel
mailing list