View Full Version : ConvertToYV12
violao
23rd April 2004, 14:39
I'm working on a YV12 plugin and need to know the default behavior of ConvertToYV12 filter regarding "PC->TV" levels. The questions are:
Does ConvertToYV12 simply clips 0-16 and 235/240-255 values for luma/chroma or does it scale from 0-255 to 16-235/240 range? In other words does it transform value Y to 16+Y*219/255?
Does it work the same way for clip sources with 0-255 and 16-235 range?
Does it work the same for both RGB and YUV-based clip sources?
Wilbert
23rd April 2004, 14:49
Does ConvertToYV12 simply clips 0-16 and 235/240-255 values for luma/chroma or does it scale from 0-255 to 16-235/240 range? In other words does it transform value Y to 16+Y*219/255?
Does it work the same way for clip sources with 0-255 and 16-235 range?
Yes, it scales from rgb 0-255 to yuv 16-235/240 range (rgb 16-235 is also scaled).
This is also the case the other way around, yuv->rgb. Except here there is the possible to keep the luma range (0-255 yuv -> 0-255 rgb):
ConvertToRGB(clip, "rec709")
violao
23rd April 2004, 15:14
Originally posted by Wilbert
Yes, it scales from rgb 0-255 to yuv 16-235/240 range (rgb 16-235 is also scaled)...
But what about the YUV source, YUY2 for example? Is it also scaled? If YUV source was already 16-235, would it be scaled again?
Wilbert
23rd April 2004, 15:20
You mean YUY2<->YV12. No, that's not scaled.
I assume that 0-255 YUY2 gives you 0-255 YV12, although I'm not 100% certain about that. If no body else answers, you check it by using Blankclip and ColorYUV.
violao
23rd April 2004, 15:32
Originally posted by Wilbert
You mean YUY2<->YV12. No, that's not scaled.
I assume that 0-255 YUY2 gives you 0-255 YV12, although I'm not 100% certain about that. If no body else answers, you check it by using Blankclip and ColorYUV.
Thanks Wilbert.
Wilbert
23rd April 2004, 16:12
I assume that 0-255 YUY2 gives you 0-255 YV12
Ok, I checked it. This is true.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.