mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-11 15:40:11 +00:00
Fix divisor for YUV range (#728)
This commit is contained in:
parent
77d3a7e2ab
commit
6607062648
@ -1972,11 +1972,11 @@ color_t make_color_matrix(float Cr, float Cb, const float2 &range_Y, const float
|
|||||||
float Cr_i = 1.0f - Cr;
|
float Cr_i = 1.0f - Cr;
|
||||||
float Cb_i = 1.0f - Cb;
|
float Cb_i = 1.0f - Cb;
|
||||||
|
|
||||||
float shift_y = range_Y[0] / 256.0f;
|
float shift_y = range_Y[0] / 255.0f;
|
||||||
float shift_uv = range_UV[0] / 256.0f;
|
float shift_uv = range_UV[0] / 255.0f;
|
||||||
|
|
||||||
float scale_y = (range_Y[1] - range_Y[0]) / 256.0f;
|
float scale_y = (range_Y[1] - range_Y[0]) / 255.0f;
|
||||||
float scale_uv = (range_UV[1] - range_UV[0]) / 256.0f;
|
float scale_uv = (range_UV[1] - range_UV[0]) / 255.0f;
|
||||||
return {
|
return {
|
||||||
{ Cr, Cg, Cb, 0.0f },
|
{ Cr, Cg, Cb, 0.0f },
|
||||||
{ -(Cr * 0.5f / Cb_i), -(Cg * 0.5f / Cb_i), 0.5f, 0.5f },
|
{ -(Cr * 0.5f / Cb_i), -(Cg * 0.5f / Cb_i), 0.5f, 0.5f },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user