mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
qcap: Don't clip intermediate values in YUV to RGB conversion code.
This commit is contained in:
parent
e755a96fc8
commit
0537a122c7
@ -68,21 +68,21 @@ void YUV_Init(void) {
|
||||
for (y_ = 0; y_ <= 255; y_++)
|
||||
{
|
||||
y = ((float) 255 / 219) * (y_ - 16);
|
||||
yuv_xy[y_] = ValidRange((int) (y));
|
||||
yuv_xy[y_] = y;
|
||||
}
|
||||
|
||||
for (cb = 0; cb <= 255; cb++)
|
||||
{
|
||||
u = ((float) 255 / 224) * (cb - 128);
|
||||
yuv_gu[cb] = - ValidRange((int) (0.344 * u));
|
||||
yuv_bu[cb] = ValidRange((int) (1.772 * u));
|
||||
yuv_gu[cb] = -0.344 * u;
|
||||
yuv_bu[cb] = 1.772 * u;
|
||||
}
|
||||
|
||||
for (cr = 0; cr <= 255; cr++)
|
||||
{
|
||||
v = ((float) 255 / 224) * (cr - 128);
|
||||
yuv_rv[cr] = ValidRange((int) (1.402 * v));
|
||||
yuv_gv[cr] = - ValidRange((int) (0.714 * v));
|
||||
yuv_rv[cr] = 1.402 * v;
|
||||
yuv_gv[cr] = -0.714 * v;
|
||||
}
|
||||
TRACE("Filled hash table\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user