On Feb 22, 2005, at 10:00 AM, IOhannes m zmoelnig wrote:
james tittle wrote:
hiya,
...so, where'd you get these numbers from? Some kind of scaling? Is this all sounding too familiar :-)
oh, and to not forget it: which "numbers" do you mean ? the conversion formula ?
...yeh, the following:
ug=88*u; ub=454*u; vg = 183 * v; vr = 358 * v;
...I've tried to somehow reconcile them with the following conversions (which are what used in effectv and gem2pdp/pdp2gem currently), but quickly find myself feeling dumb...
/* * conversion from YUV to RGB * r = 1.164*(y-16) + 1.596*(v-128); * g = 1.164*(y-16) - 0.813*(v-128) - 0.391*(u-128); * b = 1.164*(y-16) + 2.018*(u-128); * conversion from RGB to YUV * y = 0.257*r + 0.504*g + 0.098*b + 16 * u = -0.148*r - 0.291*g + 0.439*b + 128 * v = 0.439*r - 0.368*g - 0.071*b + 128 */
...so, the whole point of this was so that pdp2gem works with the imageStruct stuff, and then for me to altivec these things...I guess I can just do these equations in altivec without the worry of float conversions...plus altivec saturates for free (I think)!
jamie