wiseant
26th March 2008, 22:09
Hi all,
I don't know whether this post should be in "Avisynth Usage" or "Capturing Video" forum, but since I'll be using Avisynth tools I've opted for Avisynth Usage . . .
I'm planning on entering the uncertain waters of Video Color Testing
There seems to be a lot of confusion regarding YUY2, YV12, RGB along with the avisynth tools: ConvertoRGB, ...YUY2, ...YV12, Levels, Limiter, and ColorYUV
What I am looking for is a critque of my method(s)
So in order to make sense of this, my plan is as follows
1. Capture from VHS Tape to .avi using HuffYUV codec in YUY2 640x480 capture format
this will create an interlaced clip
Now will this clip have a maximum color range of 16-235 or 0-255?
I will do two captures in VirtualDub
a) with Extend luma black point and Extend luma white point enabled
range should be 16-235?
b) with Extend luma black point and Extend luma white point disabled
range should be 0-255?
I will use AvsP to preview clips a and b and use a ColorPicker tool to find the whitest whites and blackest blacks and see what values I find
I will keep the YUY2 color space and then evaluate the changes done by Avisynth tools: Levels, Limiter, and ColorYUV as follows:
Levels
re clip a
Levels(16, 1, 235, 0, 255, coring=false)
this should scale from [16,235] to [0,255]
re clip b
Levels(0, 1, 255, 16, 235, coring=false)
this should scale from [0,255] to [16,235]
Limiter
re clip b
Limiter(16, 235, 16, 240)
this should clip pixels under 16 to 16 and over 235 (or 240) to 235 (or 240).
ColorYUV
for clip a
ColorYUV(levels="TV->PC")
this should map the YUV values from (16,235) to PC values (0,255)
for clip b
ColorYUV(levels="PC->TV")
this should map the YUV values from (0,255) to TV values (16,235)
My goal here is to evaluate how consistent the results from each tool are but more importantly, that any values <16 and >235 do in fact get clipped/mapped to 16 and 235 respectively
In some quick tests done previously I noticed that <16 values did get "converted" to 16, but values >235, i.e. 255 did not become 235 but remained at 255
After testing these I plan to do VHS to MPEG-2 using MainConcept Capture program:
capture at 720x480 8000 kbps CBR
from MPEGEncoder_en.pdf October 28, 2005
"Input video is RGB 16-235
Ticking the checkbox Input Video is RGB 16-235, particular black and white values are preserved. During encoding and decoding the RGB color space with R=G=B=16 is used, which corresponds to the color black. Furthermore, the RGB color space with R=G=B=235 is used, which corresponds to the color white. Normally the values for white are R=G=B=0 [typo - should be 255], and for black R=G=B=255 [typo - should be 0]. The specification ITU601R now defines black (Y=16) and white (Y=235), i.e. the real video signal receives values which are "blacker than black" or "whiter than white" (so called super-black and super-white values). These super-black and super-white values get lost in the normal PC RGB 0..255 color space, but they are preserved with the Input video is RGB 16-235 option."
I don't really understand the explanation above - does it mean that MainConcept while capturing/encoding is capturing in RGB color space and encoding in YV12 colorspace, i.e. converting "on-the-fly" from RGB to YV12 - if so, and I want to make a DVD compliant clip for viewing on my TV, by demuxing and then using Muxman, should I enable or disable "Input Values are 16-235"?
clip c "Input Values are 16-235" enabled
clip d "Input Values are 16-235" disabled
Here, clip c should range from 0-255 and clip d from 16-235?
Here however my color space will be YV12 (default MPEG-2 Capture?) although I could capture in 4:2:2. Any comments re problems with YV12 versus YUY2 re capturing. Any comments on the advantages/disadvantages of demuxing 4:2:2 MPEG-2 with DGIndex or ProjectX?
Any suggestions, comments, criticism is appreciated.
TIA
I don't know whether this post should be in "Avisynth Usage" or "Capturing Video" forum, but since I'll be using Avisynth tools I've opted for Avisynth Usage . . .
I'm planning on entering the uncertain waters of Video Color Testing
There seems to be a lot of confusion regarding YUY2, YV12, RGB along with the avisynth tools: ConvertoRGB, ...YUY2, ...YV12, Levels, Limiter, and ColorYUV
What I am looking for is a critque of my method(s)
So in order to make sense of this, my plan is as follows
1. Capture from VHS Tape to .avi using HuffYUV codec in YUY2 640x480 capture format
this will create an interlaced clip
Now will this clip have a maximum color range of 16-235 or 0-255?
I will do two captures in VirtualDub
a) with Extend luma black point and Extend luma white point enabled
range should be 16-235?
b) with Extend luma black point and Extend luma white point disabled
range should be 0-255?
I will use AvsP to preview clips a and b and use a ColorPicker tool to find the whitest whites and blackest blacks and see what values I find
I will keep the YUY2 color space and then evaluate the changes done by Avisynth tools: Levels, Limiter, and ColorYUV as follows:
Levels
re clip a
Levels(16, 1, 235, 0, 255, coring=false)
this should scale from [16,235] to [0,255]
re clip b
Levels(0, 1, 255, 16, 235, coring=false)
this should scale from [0,255] to [16,235]
Limiter
re clip b
Limiter(16, 235, 16, 240)
this should clip pixels under 16 to 16 and over 235 (or 240) to 235 (or 240).
ColorYUV
for clip a
ColorYUV(levels="TV->PC")
this should map the YUV values from (16,235) to PC values (0,255)
for clip b
ColorYUV(levels="PC->TV")
this should map the YUV values from (0,255) to TV values (16,235)
My goal here is to evaluate how consistent the results from each tool are but more importantly, that any values <16 and >235 do in fact get clipped/mapped to 16 and 235 respectively
In some quick tests done previously I noticed that <16 values did get "converted" to 16, but values >235, i.e. 255 did not become 235 but remained at 255
After testing these I plan to do VHS to MPEG-2 using MainConcept Capture program:
capture at 720x480 8000 kbps CBR
from MPEGEncoder_en.pdf October 28, 2005
"Input video is RGB 16-235
Ticking the checkbox Input Video is RGB 16-235, particular black and white values are preserved. During encoding and decoding the RGB color space with R=G=B=16 is used, which corresponds to the color black. Furthermore, the RGB color space with R=G=B=235 is used, which corresponds to the color white. Normally the values for white are R=G=B=0 [typo - should be 255], and for black R=G=B=255 [typo - should be 0]. The specification ITU601R now defines black (Y=16) and white (Y=235), i.e. the real video signal receives values which are "blacker than black" or "whiter than white" (so called super-black and super-white values). These super-black and super-white values get lost in the normal PC RGB 0..255 color space, but they are preserved with the Input video is RGB 16-235 option."
I don't really understand the explanation above - does it mean that MainConcept while capturing/encoding is capturing in RGB color space and encoding in YV12 colorspace, i.e. converting "on-the-fly" from RGB to YV12 - if so, and I want to make a DVD compliant clip for viewing on my TV, by demuxing and then using Muxman, should I enable or disable "Input Values are 16-235"?
clip c "Input Values are 16-235" enabled
clip d "Input Values are 16-235" disabled
Here, clip c should range from 0-255 and clip d from 16-235?
Here however my color space will be YV12 (default MPEG-2 Capture?) although I could capture in 4:2:2. Any comments re problems with YV12 versus YUY2 re capturing. Any comments on the advantages/disadvantages of demuxing 4:2:2 MPEG-2 with DGIndex or ProjectX?
Any suggestions, comments, criticism is appreciated.
TIA