Previous 199869 Revisions Next

r33093 Friday 31st October, 2014 at 19:36:13 UTC by Wilbert Pol
tia.c: Prevent Nans. (nw)
[src/mame/video]tia.c

trunk/src/mame/video/tia.c
r241604r241605
269269         double G = Y - 0.272 * I - 0.647 * Q;
270270         double B = Y - 1.106 * I + 1.703 * Q;
271271
272         R = pow(R, 0.9) / pow(1, 0.9);
273         G = pow(G, 0.9) / pow(1, 0.9);
274         B = pow(B, 0.9) / pow(1, 0.9);
275
276272         if (R < 0) R = 0;
277273         if (G < 0) G = 0;
278274         if (B < 0) B = 0;
279275
276         R = pow(R, 0.9);
277         G = pow(G, 0.9);
278         B = pow(B, 0.9);
279
280280         if (R > 1) R = 1;
281281         if (G > 1) G = 1;
282282         if (B > 1) B = 1;
r241604r241605
328328         double G = Y - 0.344 * U - 0.714 * V;
329329         double B = Y + 1.770 * U;
330330
331         R = pow(R, 1.2) / pow(1, 1.2);
332         G = pow(G, 1.2) / pow(1, 1.2);
333         B = pow(B, 1.2) / pow(1, 1.2);
334
335331         if (R < 0) R = 0;
336332         if (G < 0) G = 0;
337333         if (B < 0) B = 0;
338334
335         R = pow(R, 1.2);
336         G = pow(G, 1.2);
337         B = pow(B, 1.2);
338
339339         if (R > 1) R = 1;
340340         if (G > 1) G = 1;
341341         if (B > 1) B = 1;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team