wiseant
27th March 2008, 22:06
Hi All,
Hope I have the appropriate forum . . .
Perplexed about all the information I have seen about colour spaces and colour conversion, I decided to do a couple of tests. Using Virtual Dub I captured two 640x480 interlaced clips using HuffYUV in YUY2 color space.
Clip 1 was done with Extend luma black point and Extend luma white point both disabled. This is supposed to create a clip with a colour range of 0 to 255 for viewing on a PC. I named this clip VD-no.luma.avi
Clip 2 was done with Extend luma black point and Extend luma white point both enabled: "Compresses the luminance range of an image so that "superwhite" levels from 0-15 are scaled to within the valid luminance range of 16-235, out of 0-255." This is supposed to create a clip with a color range of 16-235 for viewing on a TV set, i.e. DVD player. I named this clip VD-luma.avi
To analyze these clips I used AvsP (a GUI for Avisynth):
The first thing I did was to use ColorYUV(Analyze=True) which shows the Luma and Chroma values:
This confirmed that the VD-no.luma.avi clip showed values of 0 (black) and 255 (white) and VD-luma.avi showed values of 16 (black) and 231 (white) - so far so good.
[see VD-no.luma.jpg and VD-luma.jpg]
The next thing I tried was ColorYUV(levels="PC->TV") on the VD-no.luma.avi clip. This is supposed to adjust a "PC" clip to a "TV" clip, i.e. change the values <16 to 16 and values >235 to 235 - in effect making the clip suitable for viewing on a TV - this function did not appear to do anything.
[see VD-no.luma-PC-TV.histo.jpg]
Then I tried Levels(0, 1, 255, 16, 235, coring=false) on the VD-no.luma.avi clip - this is supposed to do the same thing as ColorYUV(levels="PC->TV") - this appeared to work:
the lowest value is now 16 instead of 0 and the highest value is now 235 instead of 255:
Levels(0, 1, 255, 16, 235, coring=false)
used this with VD-no.luma.avi
Luma Y / ChromaU / ChromaV
Average 173.29 128.80 127.51
Minimum 16 96 87
Maximum 235 164 141
Loose Minimum 17 122 121
Loose Maximum 223 136 131
compared to VD-no.luma.avi w/o Levels
Luma Y / ChromaU / ChromaV
Average 183.14 128.56 126.83
Minimum 0 89 79
Maximum 255 170 143
Loose Minimum 1 120 119
Loose Maximum 241 137 131
Levels(0, 1, 255, 16, 235, coring=true)
used this with VD-no.luma.avi
Luma Y / ChromaU / ChromaV
Average 173.41 128.80 127.51
Minimum 30 96 87
Maximum 218 164 141
Loose Minimum 30 122 121
Loose Maximum 218 136 131
"Levels also changes the chroma of the clip."
BTW - what does coring=true actually do - the avisynth info is unclear to me . . .
[see VD-no.luma-Levels.cf.jpg]
Then I tried Limiter(16, 235, 16, 240) which is supposed to create a range of values from 16-235 (luma) and 16-240 (chroma) for viewing the clip on a TV - it appeared to do nothing at all.
[see VD-no.luma-Limiter.jpg] - and it appears that the values shown are incorrect . . .
My Observations [possibly incorrect]
If a person is using VirtualDub for captures and they want to view the clip on a TV set, i.e. DVD, MPEG-2, MPEG-4 they should enable both Extend luma black point and Extend luma white point.
If a person has a clip that has a range from 0-255 it will not look OK on a TV set, the range has to be "remapped" to 16-235 - however this appears easier said than done - unless I am missing something here, ColorYUV(levels="PC->TV") and Limiter(16, 235, 16, 240) don't appear to do what they are supposed to do.
Am I missing something here? Why does ColorYUV(levels="PC->TV") and Limiter(16, 235, 16, 240) appear to do nothing . . . and as noted on Avisynth.org: "Levels also changes the chroma of the clip."
TIA
Hope I have the appropriate forum . . .
Perplexed about all the information I have seen about colour spaces and colour conversion, I decided to do a couple of tests. Using Virtual Dub I captured two 640x480 interlaced clips using HuffYUV in YUY2 color space.
Clip 1 was done with Extend luma black point and Extend luma white point both disabled. This is supposed to create a clip with a colour range of 0 to 255 for viewing on a PC. I named this clip VD-no.luma.avi
Clip 2 was done with Extend luma black point and Extend luma white point both enabled: "Compresses the luminance range of an image so that "superwhite" levels from 0-15 are scaled to within the valid luminance range of 16-235, out of 0-255." This is supposed to create a clip with a color range of 16-235 for viewing on a TV set, i.e. DVD player. I named this clip VD-luma.avi
To analyze these clips I used AvsP (a GUI for Avisynth):
The first thing I did was to use ColorYUV(Analyze=True) which shows the Luma and Chroma values:
This confirmed that the VD-no.luma.avi clip showed values of 0 (black) and 255 (white) and VD-luma.avi showed values of 16 (black) and 231 (white) - so far so good.
[see VD-no.luma.jpg and VD-luma.jpg]
The next thing I tried was ColorYUV(levels="PC->TV") on the VD-no.luma.avi clip. This is supposed to adjust a "PC" clip to a "TV" clip, i.e. change the values <16 to 16 and values >235 to 235 - in effect making the clip suitable for viewing on a TV - this function did not appear to do anything.
[see VD-no.luma-PC-TV.histo.jpg]
Then I tried Levels(0, 1, 255, 16, 235, coring=false) on the VD-no.luma.avi clip - this is supposed to do the same thing as ColorYUV(levels="PC->TV") - this appeared to work:
the lowest value is now 16 instead of 0 and the highest value is now 235 instead of 255:
Levels(0, 1, 255, 16, 235, coring=false)
used this with VD-no.luma.avi
Luma Y / ChromaU / ChromaV
Average 173.29 128.80 127.51
Minimum 16 96 87
Maximum 235 164 141
Loose Minimum 17 122 121
Loose Maximum 223 136 131
compared to VD-no.luma.avi w/o Levels
Luma Y / ChromaU / ChromaV
Average 183.14 128.56 126.83
Minimum 0 89 79
Maximum 255 170 143
Loose Minimum 1 120 119
Loose Maximum 241 137 131
Levels(0, 1, 255, 16, 235, coring=true)
used this with VD-no.luma.avi
Luma Y / ChromaU / ChromaV
Average 173.41 128.80 127.51
Minimum 30 96 87
Maximum 218 164 141
Loose Minimum 30 122 121
Loose Maximum 218 136 131
"Levels also changes the chroma of the clip."
BTW - what does coring=true actually do - the avisynth info is unclear to me . . .
[see VD-no.luma-Levels.cf.jpg]
Then I tried Limiter(16, 235, 16, 240) which is supposed to create a range of values from 16-235 (luma) and 16-240 (chroma) for viewing the clip on a TV - it appeared to do nothing at all.
[see VD-no.luma-Limiter.jpg] - and it appears that the values shown are incorrect . . .
My Observations [possibly incorrect]
If a person is using VirtualDub for captures and they want to view the clip on a TV set, i.e. DVD, MPEG-2, MPEG-4 they should enable both Extend luma black point and Extend luma white point.
If a person has a clip that has a range from 0-255 it will not look OK on a TV set, the range has to be "remapped" to 16-235 - however this appears easier said than done - unless I am missing something here, ColorYUV(levels="PC->TV") and Limiter(16, 235, 16, 240) don't appear to do what they are supposed to do.
Am I missing something here? Why does ColorYUV(levels="PC->TV") and Limiter(16, 235, 16, 240) appear to do nothing . . . and as noted on Avisynth.org: "Levels also changes the chroma of the clip."
TIA