diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-20 05:55:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-24 00:47:12 +0200 |
commit | da93e4fb277789b35e95d1e3fa4cabe8c3daa971 (patch) | |
tree | 19966a87c0ba50960a084e113a08cb50440edb34 | |
parent | 69f46ff586cfb42952f098a94b9bb34bdd706809 (diff) | |
download | ffmpeg-da93e4fb277789b35e95d1e3fa4cabe8c3daa971.tar.gz |
avcodec/speedhqdec: 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/speedhqdec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c index acca437bd5..5378b987dc 100644 --- a/libavcodec/speedhqdec.c +++ b/libavcodec/speedhqdec.c @@ -53,7 +53,7 @@ typedef struct SHQContext { BlockDSPContext bdsp; IDCTDSPContext idsp; - ScanTable intra_scantable; + uint8_t permutated_intra_scantable[64]; int quant_matrix[64]; enum { SHQ_SUBSAMPLING_420, SHQ_SUBSAMPLING_422, SHQ_SUBSAMPLING_444 } subsampling; @@ -137,7 +137,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->permutated_intra_scantable; LOCAL_ALIGNED_32(int16_t, block, [64]); int dc_offset; @@ -581,7 +581,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->permutated_intra_scantable, ff_zigzag_direct, + s->idsp.idct_permutation); switch (avctx->codec_tag) { case MKTAG('S', 'H', 'Q', '0'): |