radeonsi/vcn: Support BT2020 matrix with EFC

Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37058>
This commit is contained in:
David Rosca 2025-10-14 10:16:18 +02:00 committed by Marge Bot
parent 8b194cb0ac
commit 3e458d06b8
2 changed files with 5 additions and 1 deletions

View file

@ -216,6 +216,7 @@
#define PIPE_H264_MB_SIZE 16
#define RENCODE_COLOR_VOLUME_G22_BT709 0
#define RENCODE_COLOR_VOLUME_G2084_BT2020 514
#define RENCODE_COLOR_RANGE_FULL 0
#define RENCODE_COLOR_RANGE_STUDIO 1

View file

@ -1842,7 +1842,8 @@ static bool radeon_vcn_enc_efc_supported(struct radeon_encoder *enc,
if (vpp->in_color_primaries != vpp->out_color_primaries ||
vpp->in_transfer_characteristics != vpp->out_transfer_characteristics ||
vpp->out_matrix_coefficients != PIPE_VIDEO_VPP_MCF_BT709)
(vpp->out_matrix_coefficients != PIPE_VIDEO_VPP_MCF_BT709 &&
vpp->out_matrix_coefficients != PIPE_VIDEO_VPP_MCF_BT2020_NCL))
return false;
if (vpp->out_chroma_siting & (PIPE_VIDEO_VPP_CHROMA_SITING_VERTICAL_BOTTOM |
@ -1883,6 +1884,8 @@ static uint32_t radeon_vcn_enc_color_volume(enum pipe_video_vpp_matrix_coefficie
switch (coeffs) {
case PIPE_VIDEO_VPP_MCF_BT709:
return RENCODE_COLOR_VOLUME_G22_BT709;
case PIPE_VIDEO_VPP_MCF_BT2020_NCL:
return RENCODE_COLOR_VOLUME_G2084_BT2020;
default:
assert(0);
return 0;