Просмотр исходного кода

avcodec/proresdec: Reuse permutation

The ProresDSPContext already contains the idct_permutation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt 2 недель назад
Родитель
Сommit
deee2fb52d
1 измененных файлов с 4 добавлено и 6 удалено
  1. 4 6
      libavcodec/proresdec.c

+ 4 - 6
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;