Quantcast Avisynth: is there a Filter for Increasing Compression Even More? - Page 4 - digitalFAQ.com Forums [Archives]
  #61  
08-04-2003, 10:47 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
So it's just a supposition ? But it's not that is said in the pop-up help (balloon). The balloon said exactly this : "Then Y Mpeg range is 8-235 (and the help talk about 16-235 !), not 0-255". I don't see there any evidence of rescaling. So ? Did you make yourself any check or do you just take this out of your brain ?
I can't imagine that it wouldn't have this scaling option. But I performed some tests.

I took a blankclip:

blankclip(color=$0000f0,pixel_type="yuy2")

coloryuv(analyze=true) # gives the values: YUV = 39, 234, 111

Then I made the following script as source (conversion to RGB24 done by AviSynth itself):

blankclip(color=$0000f0,pixel_type="yuy2")
ConvertToRGB24

I made two mpeg1 clips with TMPGEnc: bc_def.mpg without the option "output YUV as Basic YCbCr and not CCIR601" checked (which is the default). Importing (as YUY2) and analyzing in AviSynth gives:

DirectShowSource("e:\temp\test\bc_def.mpg",fps=25)
coloryuv(analyze=true) # YUV = 40, 233, 111


conclusion: clip is untouched. The second clip is with the option "output YUV as Basic YCbCr and not CCIR601" checked. Importing (as YUY2) and analyzing in AviSynth gives:

DirectShowSource("e:\temp\test\bc_ycbcr.mpg",fps=2 5)
coloryuv(analyze=true) # YUV = 27, 248, 108


conclusion: the values are changed. Some math:

The inversion of y = x/255*( 235-8 )+8 gave the incorrect values! So I used:

y = x/255*(235-16) + 16 [(0,255)->(16,235)]

The inverse is given by

x = 255/(235-16)*y - 16*255/(235-16) [(16,235)->(0,255)]

y = 39 (luma of blankclip) results indeed in y = 26.8 = 27.

conclusion: the scaling (16,235)->(0,255) is performed when the option "output YUV as Basic YCbCr and not CCIR601" is checked.

btw, I see that I misread Jorel:
Quote:
Unchecked (the defautl) = same effect than Limiter().
I'm very sorry. I will perform some tests, to see whether this is true.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #62  
08-05-2003, 04:45 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Wilbert
I took a blankclip:

blankclip(color=$0000f0,pixel_type="yuy2")

coloryuv(analyze=true) # gives the values: YUV = 39, 234, 111
Great, you find a way to do the check ! I search for it yesterday but never found how to do that

Quote:
conclusion: the scaling (16,235)->(0,255) is performed when the option "output YUV as Basic YCbCr and not CCIR601" is checked.
That's a great info. I'm glad to never have the option checked

Quote:
btw, I see that I misread Jorel
In fact, that's me that told this.

Quote:
I'm very sorry. I will perform some tests, to see whether this is true.
I'll do also (now that I have a way to perform it )
Reply With Quote
  #63  
08-05-2003, 10:20 AM
bman bman is offline
Free Member
 
Join Date: Apr 2002
Posts: 356
Thanks: 0
Thanked 0 Times in 0 Posts
Hi all !
Great results Willbert !
I suspected that "output YUV as Basic YCbCr and not CCIR601" option checked is performing scale conversion but didn't find way to prove that .
After this one we have to find what is wrong (in some movies ) with colors when black turns to be dark blue or green . This problem is mentioned many times in KVCD forum but NOONE could solve this problem .
Even if we check "output YUV as Basic YCbCr and not CCIR601" option colors become more natural but still there is some visual difference .
I suppose that they are using some kind of filter for color scale conversion that doesn't affect DVD MPEG2 stream but after encoding with TMPG color lose right values .
That will be great If we could find how exectly prevent this unwanted effect .
bman
Reply With Quote
  #64  
08-05-2003, 03:40 PM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
@Dialhot,

I did some more tests:

# source:
# blankclip(color=$000010, pixel_type="yuy2") # YUV = 18, 135, 127
# ConvertToRGB24

I opened this script in TMPGEnc and checked "output YUV as Basic YCbCr and not CCIR601", resulting in bc2_ycbcr.mpg. It has YUV values: 2, 136, 127 (I did it this way, because I don't know how to make this in AviSynth):

# DirectShowSource("e:\temp\test\bc2_ycbcr.mpg",fps= 25)
# coloryuv(analyze=true) # YUV = 2, 136, 127
# ConvertToRGB24

For some strange reason TMPGEnc crashes with the script above, so I loaded bc2_ycbcr.mpg directly in TMPGEnc. Now I unchecked "output YUV as Basic YCbCr and not CCIR601" and encoded to bc2_ccir601.mpg. I made the following script:

DirectShowSource("e:\temp\test\bc2_ccir601.mpg",fp s=25)
coloryuv(analyze=true) # YUV = 16, 128, 128

My conclusion is that all YUV values with Y<16 is clamped to (Y,U,V)=(16,128,12 when leaving "output YUV as Basic YCbCr and not CCIR601" unchecked.

I guess all values with Y>235 are clamped to (Y,U,V)=(235,128,12, but I didn't check this.

Conclusion: Jorel is correct!
Reply With Quote
  #65  
08-05-2003, 03:46 PM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
After this one we have to find what is wrong (in some movies ) with colors when black turns to be dark blue or green . This problem is mentioned many times in KVCD forum but NOONE could solve this problem.
Could you give some links, and also upload a short vob where this problem occurs?
Reply With Quote
  #66  
08-05-2003, 03:58 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Wilbert
Conclusion: Jorel is correct!
That is not Jorel that told you that, that's me

So as I told a long time ago, bye bye limiter in the scripts, is useless

Thank you Wilbert for having done all these tests.
Reply With Quote
  #67  
08-05-2003, 04:40 PM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
That is not Jorel that told you that, that's me
I see, sorry

Quote:
So as I told a long time ago, bye bye limiter in the scripts, is useless
Of course we are only talking about TMPGEnc here ...
Reply With Quote
  #68  
08-05-2003, 04:42 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Of course. I don't do any encodign with other tool.
Reply With Quote
  #69  
08-08-2003, 07:23 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
Quote:
Originally Posted by Wilbert
Conclusion: Jorel is correct!
That is not Jorel that told you that, that's me

So as I told a long time ago, bye bye limiter in the scripts, is useless
But if were going to try another encoder like CCE then we should keep Limiter() in to help with the black background blocks, Right?
Reply With Quote
  #70  
08-08-2003, 08:04 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Don't know, I never used CCE. Accordingly to the CCE-faq at doom, it has a luminance level option. Maybe someone can do the same two tests (as I did above) to see what this option does?
Reply With Quote
  #71  
08-08-2003, 08:39 AM
Holomatrix Holomatrix is offline
Free Member
 
Join Date: Aug 2002
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, CCE has this luminance level 16 to 235 or 0 to 255. I think by default it is at 0 to 255. Now I need to read again on what the two differences do
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: New compression filters? tengo6dedos Avisynth Scripting 17 04-27-2008 02:56 PM
Increasing brightness using avisynth? khusru Avisynth Scripting 7 02-23-2004 07:44 AM
Avisynth: Good compression? muhali3 Avisynth Scripting 10 10-14-2003 05:18 PM
Avisynth: MergeChroma to gain Compression? Jellygoose Avisynth Scripting 94 03-24-2003 02:27 AM
Avisynth: Increasing compression through preprocessing SansGrip Avisynth Scripting 67 01-29-2003 11:00 AM

Thread Tools



 
All times are GMT -5. The time now is 06:55 AM  —  vBulletin © Jelsoft Enterprises Ltd