This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 8cf5b8b0b335ba8d524a14542027c3593e6d3bfe
Author:     Lynne <[email protected]>
AuthorDate: Wed Sep 9 01:34:55 2026 +0900
Commit:     Lynne <[email protected]>
CommitDate: Sun Sep 20 16:45:55 2026 +0900

    vulkan_prores: undo quant matrix permutation
    
    The quantization matrix gets immediately permuted for the assembly.
    But the Vulkan decoder uses it in regular standard order.
---
 libavcodec/vulkan_prores.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/libavcodec/vulkan_prores.c b/libavcodec/vulkan_prores.c
index e082aff0ce..ff4185fb79 100644
--- a/libavcodec/vulkan_prores.c
+++ b/libavcodec/vulkan_prores.c
@@ -194,10 +194,18 @@ static int vk_prores_end_frame(AVCodecContext *avctx)
         .bottom_field     = pr->first_field ^ (pr->frame_type == 1),
     };
 
-    memcpy(metadata->mapped_mem + pp->qmat_off,
-           pr->qmat_luma,   sizeof(pr->qmat_luma));
-    memcpy(metadata->mapped_mem + pp->qmat_off + sizeof(pr->qmat_luma),
-           pr->qmat_chroma, sizeof(pr->qmat_chroma));
+    /* The decoder permutes the quantization matrices to match the layout
+     * expected by its IDCT (transposed on x86), undo it here. */
+    {
+        uint8_t *qmat_luma   = metadata->mapped_mem + pp->qmat_off;
+        uint8_t *qmat_chroma = qmat_luma + sizeof(pr->qmat_luma);
+        const uint8_t *perm  = pr->prodsp.idct_permutation;
+
+        for (i = 0; i < 64; i++) {
+            qmat_luma  [perm[i]] = pr->qmat_luma  [i];
+            qmat_chroma[perm[i]] = pr->qmat_chroma[i];
+        }
+    }
 
     FFVkExecContext *exec = ff_vk_exec_get(&ctx->s, &ctx->exec_pool);
     err = ff_vk_exec_start(&ctx->s, exec);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to