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 <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33396>
(cherry picked from commit c28702c35a)
This commit is contained in:
David Rosca 2025-02-04 18:50:51 +01:00 committed by Eric Engestrom
parent cef16493a8
commit 326ea58650
2 changed files with 3 additions and 1 deletions

View file

@ -194,7 +194,7 @@
"description": "frontends/vdpau: Set H264 chroma_format_idc",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -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;