Commit 66f67cbf93 for ffmpeg

commit 66f67cbf93f9e0e9446781cea9c5ad4df18a9f4b
Author: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date:   Thu Dec 3 07:25:43 2026 +0100

    tests/checkasm/proresdsp: Fix permuting blocks

    When using scantable scan and IDCT permutation perm,
    the decoder (in decode_ac_coeffs()) puts the ith coefficient
    into the array element with index k:=perm[scan[i]], whereas
    the C reference puts it into the one with index j:=scan[i].
    So the relation between the permuted block' and the unpermuted
    one is supposed to be
    block'[perm[j]] = block'[k] = block[j].

    Yet the checkasm test used block'[j] = block[perm[j]]. This worked,
    because all the permutations used up until now are self-inverse,
    but it doesn't work in general.

    Reviewed-by: Marcos Ashton Iglesias <marcosashiglesias@gmail.com>
    Reviewed-by: Kyle Swanson <k@ylo.ph>
    Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

diff --git a/tests/checkasm/proresdsp.c b/tests/checkasm/proresdsp.c
index 72ed24e163..e194a59a69 100644
--- a/tests/checkasm/proresdsp.c
+++ b/tests/checkasm/proresdsp.c
@@ -45,7 +45,7 @@ enum {
 static void permute_block(int16_t *dst, const int16_t *src, const uint8_t *perm)
 {
     for (int i = 0; i < BLOCK_SIZE; i++)
-        dst[i] = src[perm[i]];
+        dst[perm[i]] = src[i];
 }

 static void ref_idct_put_12(uint16_t *dst, ptrdiff_t linesize,