From c28702c35a5815dfe97dc661d671f80cb970f62d Mon Sep 17 00:00:00 2001 From: David Rosca Date: Tue, 4 Feb 2025 18:50:51 +0100 Subject: [PATCH] frontends/vdpau: Set H264 chroma_format_idc We don't get the actual value from VDPAU, so hardcode to 4:2:0. Cc: mesa-stable Reviewed-by: Ruijing Dong Part-of: --- src/gallium/frontends/vdpau/decode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/frontends/vdpau/decode.c b/src/gallium/frontends/vdpau/decode.c index 0f63bf8b699..dab27c04833 100644 --- a/src/gallium/frontends/vdpau/decode.c +++ b/src/gallium/frontends/vdpau/decode.c @@ -41,6 +41,7 @@ #define AV1_PRIMARY_REF_NONE AV1_REFS_PER_FRAME #define AV1_SUPERRES_DENOM_MIN 9 #define AV1_SUPERRES_NUM 8 +#define H264_CHROMA_FORMAT_IDC_420 1 /** * Create a VdpDecoder. @@ -362,6 +363,7 @@ vlVdpDecoderRenderH264(struct pipe_h264_picture_desc *picture, VDPAU_MSG(VDPAU_TRACE, "[VDPAU] Decoding H264\n"); + picture->pps->sps->chroma_format_idc = H264_CHROMA_FORMAT_IDC_420; picture->pps->sps->mb_adaptive_frame_field_flag = picture_info->mb_adaptive_frame_field_flag; picture->pps->sps->frame_mbs_only_flag = picture_info->frame_mbs_only_flag; picture->pps->sps->log2_max_frame_num_minus4 = picture_info->log2_max_frame_num_minus4;