multi-texture-format: Use BT709 coefficients in the YUV shader

In order to be consistent with KMS, i.e. avoid noticable color changes when
switching between hardware plane offloading and compositing.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4204>
This commit is contained in:
Robert Mader 2025-01-06 22:25:43 +01:00 committed by Marge Bot
parent 377532f2f5
commit 235086c788
5 changed files with 3 additions and 3 deletions

View File

@ -32,9 +32,9 @@ static const char *shader_global_conversions =
" float Y = 255.0/219.0 * (yuva.x - 16.0/255.0); \n"
" float su = yuva.y - 128.0/255.0; \n"
" float sv = yuva.z - 128.0/255.0; \n"
" res.r = Y + 1.59602678 * sv; \n"
" res.g = Y - 0.39176229 * su - 0.81296764 * sv; \n"
" res.b = Y + 2.01723214 * su; \n"
" res.r = Y + 1.79274107 * sv; \n"
" res.g = Y - 0.21324861 * su - 0.53290933 * sv; \n"
" res.b = Y + 2.11240179 * su; \n"
" res.rgb *= yuva.w; \n"
" res.a = yuva.w; \n"
" return res; \n"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB