From deee2fb52d4ae0fe2a0cf1698a200ab02e3a9741 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 24 Feb 2025 14:40:00 +0100 Subject: [PATCH] avcodec/proresdec: Reuse permutation The ProresDSPContext already contains the idct_permutation. Signed-off-by: Andreas Rheinhardt --- libavcodec/proresdec.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index 18cfc25279..01caa611a0 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -133,7 +133,6 @@ static void unpack_alpha_12(GetBitContext *gb, uint16_t *dst, int num_coeffs, static av_cold int decode_init(AVCodecContext *avctx) { ProresContext *ctx = avctx->priv_data; - uint8_t idct_permutation[64]; avctx->bits_per_raw_sample = 10; @@ -173,11 +172,10 @@ static av_cold int decode_init(AVCodecContext *avctx) ff_blockdsp_init(&ctx->bdsp); ff_proresdsp_init(&ctx->prodsp, avctx->bits_per_raw_sample); - ff_init_scantable_permutation(idct_permutation, - ctx->prodsp.idct_permutation_type); - - ff_permute_scantable(ctx->progressive_scan, ff_prores_progressive_scan, idct_permutation); - ff_permute_scantable(ctx->interlaced_scan, ff_prores_interlaced_scan, idct_permutation); + ff_permute_scantable(ctx->progressive_scan, ff_prores_progressive_scan, + ctx->prodsp.idct_permutation); + ff_permute_scantable(ctx->interlaced_scan, ff_prores_interlaced_scan, + ctx->prodsp.idct_permutation); ctx->pix_fmt = AV_PIX_FMT_NONE;