|
a1cd2198
|
2023-12-04T11:42:13
|
|
Fix yuv_2_rgb and rgb_2_yuv GLSL function emulation
The color conversions themselves were already correct, but Y was
assumed to be full range, and u,v assumed to be centered on zero.
This change folds the range expansion and chroma bias into the
transforms. In order to accomplish the bias the matrices are extended to
be mat4x3, and the provided color value is extended to a vec4 with w=1.
Various other methods are possible (and potentially more efficient if
the standard is not a constant) but just folding everything into the
matrices is the most straightforward.
Test: atest CtsNativeHardwareTestCases
Bug: b/308437613
Change-Id: I33f797450c9ad9e758100eb8530d86548939f4ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5082558
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|