diff mbox series

[FFmpeg-devel] avcodec/proresenc_ks: Reduce size of blocks array

Message ID 20241028141841.119293-1-geoster3d@gmail.com
State New
Headers show
Series [FFmpeg-devel] avcodec/proresenc_ks: Reduce size of blocks array | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

IndecisiveTurtle Oct. 28, 2024, 2:18 p.m. UTC
Small cleanup, only blocks[0] seems to ever be used
---
 libavcodec/proresenc_kostya.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 226f95f8c6..1a09488cd7 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -229,7 +229,7 @@  typedef struct ProresThreadData {
 
 typedef struct ProresContext {
     AVClass *class;
-    DECLARE_ALIGNED(16, int16_t, blocks)[MAX_PLANES][64 * 4 * MAX_MBS_PER_SLICE];
+    DECLARE_ALIGNED(16, int16_t, blocks)[64 * 4 * MAX_MBS_PER_SLICE];
     DECLARE_ALIGNED(16, uint16_t, emu_buf)[16*16];
     int16_t quants[MAX_STORED_Q][64];
     int16_t quants_chroma[MAX_STORED_Q][64];
@@ -588,22 +588,22 @@  static int encode_slice(AVCodecContext *avctx, const AVFrame *pic,
         if (i < 3) {
             get_slice_data(ctx, src, linesize, xp, yp,
                            pwidth, avctx->height / ctx->pictures_per_frame,
-                           ctx->blocks[0], ctx->emu_buf,
+                           ctx->blocks, ctx->emu_buf,
                            mbs_per_slice, num_cblocks, is_chroma);
             if (!is_chroma) {/* luma quant */
                 encode_slice_plane(ctx, pb, src, linesize,
-                                   mbs_per_slice, ctx->blocks[0],
+                                   mbs_per_slice, ctx->blocks,
                                    num_cblocks, qmat);
             } else { /* chroma plane */
                 encode_slice_plane(ctx, pb, src, linesize,
-                                   mbs_per_slice, ctx->blocks[0],
+                                   mbs_per_slice, ctx->blocks,
                                    num_cblocks, qmat_chroma);
             }
         } else {
             get_alpha_data(ctx, src, linesize, xp, yp,
                            pwidth, avctx->height / ctx->pictures_per_frame,
-                           ctx->blocks[0], mbs_per_slice, ctx->alpha_bits);
-            encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks[0], quant);
+                           ctx->blocks, mbs_per_slice, ctx->alpha_bits);
+            encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks, quant);
         }
         flush_put_bits(pb);
         sizes[i]   = put_bytes_output(pb) - total_size;