jonny
27th July 2004, 15:31
I was searching for the correct way to make this conversion and i've found a couple of slightly different implementations.
Looking at Avisynth source (YUV2RGB function in convert.h) seems to me something like this:
B = (Y - 16) * 255 / 219 + (U - 128) * 2.018
G = (Y - 16) * 255 / 219 - (U - 128) * 0.391 - (V - 128) * 0.813
R = (Y - 16) * 255 / 219 + (V - 128) * 1.596
Is that correct?
(my target is Avisynth YV12 input, RGB output in a window)
tnks!
Looking at Avisynth source (YUV2RGB function in convert.h) seems to me something like this:
B = (Y - 16) * 255 / 219 + (U - 128) * 2.018
G = (Y - 16) * 255 / 219 - (U - 128) * 0.391 - (V - 128) * 0.813
R = (Y - 16) * 255 / 219 + (V - 128) * 1.596
Is that correct?
(my target is Avisynth YV12 input, RGB output in a window)
tnks!