Module: Mesa
Branch: main
Commit: 4755276bafe25bd4c7a87db81dd2433bc66b8839
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4755276bafe25bd4c7a87db81dd2433bc66b8839

Author: Benjamin Cheng <[email protected]>
Date:   Thu Aug  3 10:27:34 2023 -0400

anv/video: copy from correct H264 scaling lists

Vulkan defines the scaling lists according to the H264 ITU spec, which
only defines ScalingList8x8[0] and ScalingList8x8[1] for
non-444 formats.

Reviewed-by: Lynne <[email protected]>
Reviewed-by: Hyunjun Ko <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24474>

---

 src/intel/vulkan/genX_video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/genX_video.c b/src/intel/vulkan/genX_video.c
index 29604c82f93..788877ee2ed 100644
--- a/src/intel/vulkan/genX_video.c
+++ b/src/intel/vulkan/genX_video.c
@@ -1048,7 +1048,7 @@ anv_h264_decode_video(struct anv_cmd_buffer *cmd_buffer,
             qm.DWordLength = 16;
             qm.AVC = AVC_8x8_Inter_MATRIX;
             for (unsigned q = 0; q < 64; q++)
-               qm.ForwardQuantizerMatrix[q] = 
pps->pScalingLists->ScalingList8x8[3][q];
+               qm.ForwardQuantizerMatrix[q] = 
pps->pScalingLists->ScalingList8x8[1][q];
          }
       }
    } else if (sps->flags.seq_scaling_matrix_present_flag) {
@@ -1077,7 +1077,7 @@ anv_h264_decode_video(struct anv_cmd_buffer *cmd_buffer,
             qm.DWordLength = 16;
             qm.AVC = AVC_8x8_Inter_MATRIX;
             for (unsigned q = 0; q < 64; q++)
-               qm.ForwardQuantizerMatrix[q] = 
sps->pScalingLists->ScalingList8x8[3][q];
+               qm.ForwardQuantizerMatrix[q] = 
sps->pScalingLists->ScalingList8x8[1][q];
          }
       }
    } else {

Reply via email to