diff mbox series

[FFmpeg-devel,30/35] avcodec/proresenc_anatoliy: rework encode_ac_coeffs() prototype

Message ID 20231211014429.1841681-31-u@pkh.me
State Accepted
Commit 29fd3f75feddae08ef1d73d6edfcbaf0c4c8aba0
Headers show
Series [FFmpeg-devel,01/35] avcodec/proresenc_kostya: remove an unnecessary parenthesis level in MAKE_CODE() macro | expand

Commit Message

Clément Bœsch Dec. 11, 2023, 1:35 a.m. UTC
This makes the prototype closer to the function of the same name in
proresenc_kostya.
---
 libavcodec/proresenc_anatoliy.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Stefano Sabatini Dec. 24, 2023, 10:26 a.m. UTC | #1
On date Monday 2023-12-11 02:35:31 +0100, Clément Bœsch wrote:
> This makes the prototype closer to the function of the same name in
> proresenc_kostya.
> ---
>  libavcodec/proresenc_anatoliy.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

LGTM.
diff mbox series

Patch

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 88c6d47ab7..57324a3b27 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -282,8 +282,9 @@  static void encode_dcs(PutBitContext *pb, int16_t *blocks,
     }
 }
 
-static void encode_ac_coeffs(PutBitContext *pb,
-        int16_t *in, int blocks_per_slice, int *qmat, const uint8_t ff_prores_scan[64])
+static void encode_acs(PutBitContext *pb, int16_t *blocks,
+                       int blocks_per_slice,
+                       int *qmat, const uint8_t ff_prores_scan[64])
 {
     int prev_run = 4;
     int prev_level = 2;
@@ -292,7 +293,7 @@  static void encode_ac_coeffs(PutBitContext *pb,
     for (i = 1; i < 64; i++) {
         int indp = ff_prores_scan[i];
         for (j = 0; j < blocks_per_slice; j++) {
-            int val = (in[(j << 6) + indp]) / qmat[indp];
+            int val = (blocks[(j << 6) + indp]) / qmat[indp];
             if (val) {
                 encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 15)], run);
 
@@ -378,7 +379,7 @@  static int encode_slice_plane(int16_t *blocks, int mb_count, uint8_t *buf, unsig
     init_put_bits(&pb, buf, buf_size);
 
     encode_dcs(&pb, blocks, blocks_per_slice, qmat[0]);
-    encode_ac_coeffs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
+    encode_acs(&pb, blocks, blocks_per_slice, qmat, ff_prores_scan);
 
     flush_put_bits(&pb);
     return put_bits_ptr(&pb) - pb.buf;