Displaying 1 result from an estimated 1 matches for "clampshorttobyte".
2005 Jun 22
1
Questions about efficiency.
...har)175 * nV ) >> 7);
register signed short g = (signed short)nY - (signed short)( ( (unsigned char)89 * nV + (unsigned char)43 * nU ) >> 7);
register signed short b = (signed short)nY + (signed short)( ( (unsigned char)222 * nU ) >> 7);
frame[index + 0] = ClampShortToByte(r);
frame[index + 1] = ClampShortToByte(g);
frame[index + 2] = ClampShortToByte(b);
frame[index + 3] = 255;
This code is carried out the order of 5-7 milliseconds that is much better, but all the same is insufficiently fast.
Optimization I see the further in application MMX...