frontends/va: Disable color conversion for luma-only source formats

Fixes Y8_400 -> RGB conversion.

Cc: mesa-stable
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32919>
This commit is contained in:
David Rosca 2025-01-07 10:24:58 +01:00 committed by Marge Bot
parent 375e301837
commit 24d69bdfe9

View file

@ -185,6 +185,9 @@ static void vlVaSetProcParameters(vlVaDriver *drv,
color_standard = VL_CSC_COLOR_STANDARD_BT_709_REV;
}
if (util_format_get_nr_components(src->buffer->buffer_format) == 1)
color_standard = VL_CSC_COLOR_STANDARD_IDENTITY;
vl_csc_get_matrix(color_standard, NULL, dst->full_range, &drv->csc);
vl_compositor_set_csc_matrix(&drv->cstate, &drv->csc, 1.0f, 0.0f);