1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[d3d9] Rename BT.703 to BT.709

Don't know how this typo got introduced.

Thanks to Ryao for finding the matrix and pointing this out.
This commit is contained in:
Joshua Ashton 2020-08-07 20:53:43 +01:00
parent 9f6f6a7979
commit 98c7da805b
2 changed files with 6 additions and 6 deletions

View File

@ -33,12 +33,12 @@ vec4 convertYUV(vec3 yuv) {
return vec4(clamp(value, 0, 1), 1);
}
mat3x3 g_bt703_to_rgb = {
mat3x3 g_bt709_to_rgb = {
{ 1.164, 0, 1.793 },
{ 1.164, -0.213, -0.533 },
{ 1.164, 2.112, 0 }
};
vec4 convertBT_703(vec3 cde) {
return vec4(clamp(cde * g_bt703_to_rgb, 0, 1), 1);
vec4 convertBT_709(vec3 cde) {
return vec4(clamp(cde * g_bt709_to_rgb, 0, 1), 1);
}

View File

@ -49,9 +49,9 @@ void main() {
vec2 uv = fetchUnorm2x8(src, offset) - (128 / 255.0);
// The NV12 format seems to use the BT.703 color space.
vec4 color0 = convertBT_703(vec3(y.x, uv.x, uv.y));
vec4 color1 = convertBT_703(vec3(y.y, uv.x, uv.y));
// The NV12 format seems to use the BT.709 color space.
vec4 color0 = convertBT_709(vec3(y.x, uv.x, uv.y));
vec4 color1 = convertBT_709(vec3(y.y, uv.x, uv.y));
// We write as a macropixel of [2, 1]
// So write out 2 pixels in this run.