mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
frontends/va: Also treat PRI/TRC_RESERVED0 as unspecified
PIPE_VIDEO_VPP_PRI_RESERVED0 and PIPE_VIDEO_VPP_TRC_RESERVED0 have value 0,
and this is what we will get from apps that doesn't set primaries and transfer
characteristics at all.
Fixes: a284bff8ad ("frontends/va: Set color properties when not using explicit color standard")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38892>
This commit is contained in:
parent
081c5bc6a5
commit
1395d806ba
1 changed files with 8 additions and 4 deletions
|
|
@ -659,10 +659,12 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
|||
&vpp.in_transfer_characteristics, &vpp.in_matrix_coefficients);
|
||||
}
|
||||
|
||||
if (vpp.in_color_primaries == PIPE_VIDEO_VPP_PRI_UNSPECIFIED)
|
||||
if (vpp.in_color_primaries == PIPE_VIDEO_VPP_PRI_RESERVED0 ||
|
||||
vpp.in_color_primaries == PIPE_VIDEO_VPP_PRI_UNSPECIFIED)
|
||||
vpp.in_color_primaries = PIPE_VIDEO_VPP_PRI_BT709;
|
||||
|
||||
if (vpp.in_transfer_characteristics == PIPE_VIDEO_VPP_TRC_UNSPECIFIED)
|
||||
if (vpp.in_transfer_characteristics == PIPE_VIDEO_VPP_TRC_RESERVED0 ||
|
||||
vpp.in_transfer_characteristics == PIPE_VIDEO_VPP_TRC_UNSPECIFIED)
|
||||
vpp.in_transfer_characteristics = PIPE_VIDEO_VPP_TRC_GAMMA22;
|
||||
|
||||
if (vpp.in_matrix_coefficients == PIPE_VIDEO_VPP_MCF_UNSPECIFIED ||
|
||||
|
|
@ -706,10 +708,12 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
|
|||
&vpp.out_transfer_characteristics, &vpp.out_matrix_coefficients);
|
||||
}
|
||||
|
||||
if (vpp.out_color_primaries == PIPE_VIDEO_VPP_PRI_UNSPECIFIED)
|
||||
if (vpp.out_color_primaries == PIPE_VIDEO_VPP_PRI_RESERVED0 ||
|
||||
vpp.out_color_primaries == PIPE_VIDEO_VPP_PRI_UNSPECIFIED)
|
||||
vpp.out_color_primaries = PIPE_VIDEO_VPP_PRI_BT709;
|
||||
|
||||
if (vpp.out_transfer_characteristics == PIPE_VIDEO_VPP_TRC_UNSPECIFIED)
|
||||
if (vpp.out_transfer_characteristics == PIPE_VIDEO_VPP_TRC_RESERVED0 ||
|
||||
vpp.out_transfer_characteristics == PIPE_VIDEO_VPP_TRC_UNSPECIFIED)
|
||||
vpp.out_transfer_characteristics = PIPE_VIDEO_VPP_TRC_GAMMA22;
|
||||
|
||||
if (vpp.out_matrix_coefficients == PIPE_VIDEO_VPP_MCF_UNSPECIFIED ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue