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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th October 2003, 16:53   #1  |  Link
Bordo32
Registered User
 
Join Date: Jan 2003
Posts: 62
ColorBars() luminance levels

I am using a ColorBars(720, 480) to test some luminance level settings.
What is the luma level of the bottom right corner black quadrate
and the most black part in the picture, a tiny black vertical strip?
It seems to me that they are 29 and 22 respectively. Is this correct?
I mean when the ColorBars are in RGB or converted to YUY2 but not expanded to 0-255 in the photo editor software or some other video editing tolls which use RGB for processing.
Bordo32 is offline   Reply With Quote
Old 15th October 2003, 22:59   #2  |  Link
Bordo32
Registered User
 
Join Date: Jan 2003
Posts: 62
No one knows what the black level suppose to be in a clip generated by the ColorBars()?

I would appreciate for your help.
Bordo32 is offline   Reply With Quote
Old 16th October 2003, 14:49   #3  |  Link
Bordo32
Registered User
 
Join Date: Jan 2003
Posts: 62
Never mind, I'v found it.
Bordo32 is offline   Reply With Quote
Old 16th October 2003, 15:04   #4  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
What was it (for future reference) ?
regards
Simon
Si is offline   Reply With Quote
Old 16th October 2003, 19:08   #5  |  Link
Bordo32
Registered User
 
Join Date: Jan 2003
Posts: 62
Until it is in RGB24, as originally generated by Avisynth, the bottom right corner black quadrate’s luma = 16 and the most black part in the picture is a tiny black vertical strip, he’s luma = 7.
When it is converted in Avisynth to YUY2 or YV12 a luminance range is compressed by ratio "0-255 to 16-235". They will become approx. 30 and 22 respectively. It is clearly seen by running a as script:

ColorBars(720, 480)
ConvertToYUY2()
ColorYUV(analyze=true)
ConvertToYV12()
Histogram()

If an avs file above (with the last three lines deleted) will be opened in RGB-required software, a luma range will be expanded back to 0-255, those two black areas will have levels 16 and 7 respectively.
Buy using ColorBars() I’ve found that in CCE encoder "Luminance Level 16-235" CHECKED is the correct setting for DV avi material if it comes in to CCE as RGB color space-based.
Bordo32 is offline   Reply With Quote
Old 17th October 2003, 00:05   #6  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
I'm a bit confused (nothing unusual there then )

Colorbars generates RGB. Each colours range is normally 0 - 255

Avisynth's normal YUV range is 16-235 (for Y, 16-240 for U and V) so any RGB source will be converted to a Y range 16-235 (unless the conversion is broken)

So how can any Y value of any part of the colorbars be less than 16 when thinking/using Avisynth ?

regards
Simon
Si is offline   Reply With Quote
Old 17th October 2003, 13:10   #7  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
don't fear, it's not <16

When you are in RGB and R=G=B=0 you cannot say this is luma=0 (because you still are in RGB)

And Histogram and ColorYUV are YUV-only-functions.

The only point is that CCE/TMPG can be told which Y range to use when CREATING YUV THEMSELVES:
0-255 (will make "superwhite" and "superblack" areas)
16-235 (as AviSynth and CCIR601)

ProCoder (at least 1.0xx) will always use 0-255, so you have to do a pseudo-conversion 0-255 > 16-235 in RGB before.
WarpEnterprises is offline   Reply With Quote
Old 17th October 2003, 19:44   #8  |  Link
Bordo32
Registered User
 
Join Date: Jan 2003
Posts: 62
@WarpEnterprises, thanks for correcting. When I was saying about RGB color-space luma = 16, luma = 7 I meant RGB(16,16,16) and RGB(7,7,7).
I totally agree with all your notes.

The only thing about encoder, if a clip comes into CCE as YUY2 you cannot tell CCE which Y range to use. CCE will not change luminance range. It will take everything in 0-255 range and will create mpg with the luma 0-255. You need take care about not having nothing below 16 and above 235 before it comes into the encoder, if it needs to comply with CCIR 601.
The bad thing is that DV avi’s (at least from MiniDV tape) usually have some over-ranges.
If it will be directly imported into RGB color-space- required editing software, a luma will be expanded to 0-255 range. All those over-ranges which have some valid info will be cut-off. It needs to be corrected before it gets into the encoder.

Last edited by Bordo32; 17th October 2003 at 20:01.
Bordo32 is offline   Reply With Quote
Old 17th October 2003, 20:27   #9  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Quote:
The bad thing is that DV avi’s (at least from MiniDV tape) usually have some over-ranges.
What are "over-ranges"

AFAIK DV is REC-601 compliant so the Y values range from 16-235.

regards
Simon
Si is offline   Reply With Quote
Old 17th October 2003, 21:47   #10  |  Link
morsa
the dumbest
 
Join Date: Oct 2002
Location: Malvinas
Posts: 494
Not always, most DV cameras in fact record values between 0-255, but they always reproduce 16-235 through analog.These values below 16 and above 235 are called superblack and superwhite.
morsa is offline   Reply With Quote
Old 17th October 2003, 22:27   #11  |  Link
Si
Simply me
 
Si's Avatar
 
Join Date: Aug 2002
Location: Lancashire, England
Posts: 610
Just re-read Adam Wilts DV-FAQ and I see what's meant by over-ranges now

Ta

regards
Simon
Si is offline   Reply With Quote
Old 17th October 2003, 22:38   #12  |  Link
Bordo32
Registered User
 
Join Date: Jan 2003
Posts: 62
MiniDV camcorders do not handle 16-235 luma range accurately enough.
If DV avi file will go into RGB color-space editing software, Vegas Video for example, YUY2 will be converted to RGB and the luma will be expanded to RGB 0-255 range. YUY2 to RGB conversion will be performed by the ratio "16-235 to 0-255". Some valuable info below 16 and above 235 will be lost.
A luminance levels need to be corrected, in Avisynth for example, before an avi gets into the RGB color-space.
Bordo32 is offline   Reply With Quote
Old 20th October 2003, 13:23   #13  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
you mean that there are DV-AVIs with Y-ranges <16 / >235?
Would you mind sending me 2-3 frames for testing purposes?
WarpEnterprises 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 13:39.


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