gallium/auxiliary/vl: Fix RGB->YCbCr full range matrix

Also rename it to bt_709_rev_full as there already
is bt_709 which is used for YCbCr->RGB.

Fixes: 8a21efce3a ("frontends/va: Add postproc support for converting to full range")

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24238>
This commit is contained in:
David Rosca
2023-07-19 12:10:21 +02:00
committed by Marge Bot
parent 0195e1204b
commit 0bd9ab232b

View File

@@ -137,10 +137,10 @@ static const vl_csc_matrix bt_709_rev = {
{ 0.439f, -0.399f, -0.040f, 0.5f }
};
static const vl_csc_matrix bt_709_full = {
{ 0.0f, 1.0f, 0.0f, 0.0f },
{ 0.0f, -0.5f, 0.5f, 0.5f },
{ 0.5f, -0.5f, 0.0f, 0.5f }
static const vl_csc_matrix bt_709_rev_full = {
{ 0.213f, 0.715f, 0.072f, 0.0f },
{-0.115f, -0.385f, 0.5f, 0.5f },
{ 0.5f, -0.454f, -0.046f, 0.5f }
};
static const vl_csc_matrix identity =
@@ -197,7 +197,7 @@ void vl_csc_get_matrix(enum VL_CSC_COLOR_STANDARD cs,
cstd = &smpte240m;
break;
case VL_CSC_COLOR_STANDARD_BT_709_REV:
memcpy(matrix, full_range ? bt_709_full : bt_709_rev, sizeof(vl_csc_matrix));
memcpy(matrix, full_range ? bt_709_rev_full : bt_709_rev, sizeof(vl_csc_matrix));
return;
case VL_CSC_COLOR_STANDARD_IDENTITY:
default: