Adjust hue/angle without affecting luminance of YUV image

570 Views Asked by At

I am writing a VirtualDub plug-in where there's a requirement to change hue/chroma of image without affecting luminance.

Here's some code:

Pixel32 *dst= fa->dst.data;

int U= (*dst>>16) & 0xff;
int Y= (*dst>> 8) & 0xff;
int V= (*dst    ) & 0xff;

Before converting to RGB, I need to adjust the hue of UV by x angle. UV range is between -0.5 and +0.5. Is there a conversion table/formula/already-written-function to adjust, say, hue, by -45 degrees in the colour space?

0

There are 0 best solutions below