Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd April 2004, 14:39   #1  |  Link
violao
Registered User
 
Join Date: Feb 2004
Posts: 252
ConvertToYV12

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?
violao is offline   Reply With Quote
Old 23rd April 2004, 14:49   #2  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
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")
Wilbert is offline   Reply With Quote
Old 23rd April 2004, 15:14   #3  |  Link
violao
Registered User
 
Join Date: Feb 2004
Posts: 252
Quote:
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?
violao is offline   Reply With Quote
Old 23rd April 2004, 15:20   #4  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
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.

Last edited by Wilbert; 23rd April 2004 at 15:23.
Wilbert is offline   Reply With Quote
Old 23rd April 2004, 15:32   #5  |  Link
violao
Registered User
 
Join Date: Feb 2004
Posts: 252
Quote:
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.
violao is offline   Reply With Quote
Old 23rd April 2004, 16:12   #6  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
I assume that 0-255 YUY2 gives you 0-255 YV12
Ok, I checked it. This is true.
Wilbert is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.