Quantcast CQ vs. CQ_VBR ... Very Interesting... - Page 9 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #161  
12-29-2002, 10:43 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hey Kwag,

Sorry about Divx. Seems jorel was the one to malign Divx.

-black prince
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
  #162  
12-29-2002, 11:02 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hey guys, I like DivX too . The compression techniques used on it are beyond MPEG-1 and MPEG-2. It's just that it's not as handy as MPEG-1 or MPEG-2, because not every (Only one!) DVD player can play them. Only the "KISS" DVD player supports MPEG-4, and they're probably having a hard time trying to keep up with firmware patches and upgrades to support every MPEG-4 combination out there and keep the users happy

-kwag
Reply With Quote
  #163  
12-29-2002, 11:09 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by SansGrip
At the moment for me it's looking like CQ mode is better for high resolutions, provided by "better" you mean "less Gibbs" and not "fewer blocks". Perhaps the reason we're getting less Gibbs is because it's essentially ignoring that Blockbuster noise we're adding, and so can spend a lot more bits on the high-freq components?
Yes, you're right, and I have the same results too . That's why I mentioned earlier about TMPEG ignoring some low frequency components in CQ mode, and that's why the effect with Blockbuster is very effective with CQ_VBR but not on CQ.
Quote:

It is somewhat discouraging that I see great improvements in low-freq quantization using my matrices providing I use Blockbuster, but no improvement (or even a reduction in quality) when not using it. This seems to make CQ mode much more unpredictable than CQ_VBR.
So maybe CQ_VBR is the way to go, by dedicating more time and optimize the matrix, instead of going CQ
Maybe we can get the best result at every resolution with CQ_VBR after all of this is optimized

-kwag
Reply With Quote
  #164  
12-29-2002, 11:45 AM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
So maybe CQ_VBR is the way to go, by dedicating more time and optimize the matrix, instead of going CQ
I think the main problem is that it seems not possible to get no visible DCT blocks and no Gibbs. Here are my thoughts:

* DCT blocks are much less visible at 704x480, so no Blockbuster should be needed
* Below that resolution blockiness starts to become a distraction (at least to me)
* CQ mode cannot be used in conjunction with Blockbuster without a specially tuned Q matrix that isn't suitable for any other use
* CQ_VBR mode can be used with or without Blockbuster using the same Q matrix

My thinking, then, is that the 704x480 template should use CQ mode and no Blockbuster for the best quality. All lower resolutions should use CQ_VBR with Blockbuster variance 0-2 (depending on the movie).

This may mean a difference Q matrix for the 704x480 template than the others, but that's not such a big deal.
Reply With Quote
  #165  
12-29-2002, 12:14 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by SansGrip
I think the main problem is that it seems not possible to get no visible DCT blocks and no Gibbs. Here are my thoughts:

* DCT blocks are much less visible at 704x480, so no Blockbuster should be needed
* Below that resolution blockiness starts to become a distraction (at least to me)
* CQ mode cannot be used in conjunction with Blockbuster without a specially tuned Q matrix that isn't suitable for any other use
* CQ_VBR mode can be used with or without Blockbuster using the same Q matrix

My thinking, then, is that the 704x480 template should use CQ mode and no Blockbuster for the best quality. All lower resolutions should use CQ_VBR with Blockbuster variance 0-2 (depending on the movie).
Maybe even 528x480 still can use CQ How would you see that
Quote:

This may mean a difference Q matrix for the 704x480 template than the others, but that's not such a big deal.
Hopefully we can consolidate to a single matrix. That would make things easier
I do see a clear improvement with the mods. on the low frequency area of the matrix. And as you say, DCT blocks will probably never be completely eliminated, but I see a smoother blend on DCT blocks even at 704x480, which help the overall visual experience on the picture. It would be nice to be able to have an "MPEG spectrum analyzer" to analyze a difficult dark scene full of DCT blocks, as this would give us an accurate picture of the exact problematic area, and we would have the exact frequency domain to work on that specific matrix area. That would be cool, instead of shooting in the dark

-kwag
Reply With Quote
  #166  
12-29-2002, 12:19 PM
jamesp jamesp is offline
Free Member
 
Join Date: Jul 2002
Location: Chelmsford, UK
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by SansGrip
Quote:
Originally Posted by kwag
So maybe CQ_VBR is the way to go, by dedicating more time and optimize the matrix, instead of going CQ
I think the main problem is that it seems not possible to get no visible DCT blocks and no Gibbs. Here are my thoughts:

* DCT blocks are much less visible at 704x480, so no Blockbuster should be needed
* Below that resolution blockiness starts to become a distraction (at least to me)
* CQ mode cannot be used in conjunction with Blockbuster without a specially tuned Q matrix that isn't suitable for any other use
* CQ_VBR mode can be used with or without Blockbuster using the same Q matrix

My thinking, then, is that the 704x480 template should use CQ mode and no Blockbuster for the best quality. All lower resolutions should use CQ_VBR with Blockbuster variance 0-2 (depending on the movie).

This may mean a difference Q matrix for the 704x480 template than the others, but that's not such a big deal.
Sansgrip,

Although i've got no evidence on me to prove it, I do feel that even at 544(52x576 I get much better quality using CQ mode and using no blockbuster. To me blockbuster only becomes effective at 352x??? resolutions.

Jim
Reply With Quote
  #167  
12-29-2002, 12:52 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
Maybe even 528x480 still can use CQ How would you see that
I'm going to have to encode the same clip at different resolutions without Blockbuster and watch them on the TV. That's the only way I can tell with any certainty if noise is necessary .

Quote:
I do see a clear improvement with the mods. on the low frequency area of the matrix.
Yep, me too. What's the file size difference with your new matrix? Have you thought of applying similar changes to the non-intraframe matrix too?

Quote:
It would be nice to be able to have an "MPEG spectrum analyzer" to analyze a difficult dark scene full of DCT blocks, as this would give us an accurate picture of the exact problematic area, and we would have the exact frequency domain to work on that specific matrix area.
In theory what would be required is to do a DCT transform on each 8x8 block of the frame and output the DCT table before and after quantization. This way we could look at each block and (theoretically) determine which frequencies are being over-quantized.

This doesn't sound too difficult, but it would be a lot of output through which to wade unless one were testing with very small frame sizes (say, 32x32 in a known problem area).
Reply With Quote
  #168  
12-29-2002, 12:55 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jamesp
Although i've got no evidence on me to prove it, I do feel that even at 544(52x576 I get much better quality using CQ mode and using no blockbuster. To me blockbuster only becomes effective at 352x??? resolutions.
I'll let you know if I agree after lunch and after I run some tests through the TV .
Reply With Quote
  #169  
12-29-2002, 02:18 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by SansGrip
What's the file size difference with your new matrix? Have you thought of applying similar changes to the non-intraframe matrix too?
The file size difference is a little larger with the new matrix. But not much. Even when I correct the CQ value to target the same file size as the original matrix, the result is still less DCT blocks shown and actually less macro blocks and artifacts . Maybe the intra with all 16's is better too, and does a better job on the high frequency end too
I haven't touched the Intra, because I like the results much better with the 16's
BTW: Here's my "compare.avs" script I'm using to test:

Code:
LoadPlugin("C:\encoding\MPEG2DEC.dll")
clip1 = DirectShowsource("k:\test_1.m1v").Subtitle("Default KVCD Matrix") 
clip2 = DirectShowsource("k:\test_2.m1v").Subtitle("KVCD test(2) matrix with 'Notch' filter.") 
StackVertical(clip1, clip2 ) 
Levels(0, 1.5, 255, 16, 255) 
ConvertToRGB()
You'll notice that this way you don't have to save your .m1v files to AVI, as you can see them in Vdub right after your encode. Makes the test cycle much faster

-kwag
Reply With Quote
  #170  
12-29-2002, 02:27 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
Hey Kwag,

Sorry about Divx. Seems jorel was the one to malign Divx.

-black prince

you write:

"I’m just teasing Don’t malign Divx too much. File prediction is now an important
part of the KVCD process, but remember when the idea started with Ozzie’s very long
avs script using Trim, then he cames up with SelectRangeEvery(). You’ll be interested
to know he got it from Divx’s compression test. I believe you are raising the bar for
picture quality for all methods of video backup to reach and that’s what’s important to
me. I used Gknot for some time and created a lot of Divx’s only to be played on my
PC. I wanted more portability in playing movies with the best picture quality possible.
KVCD has not disappointed me and others. You are reaching for picture quality
that could very well become the standard for others to reach, not just Divx. I wish I had skills
like you, SansGrip, and other technical developers, but I know enough to realize what’s
happening at KVCD is very promising."

yes,i'm with you.......

--------------

and i write (with this part quote from Kwag):

You all encourage us to push all this stuff to the limits. And the "NAH" sayers at other sites encourage us to go beyond the standards and over the limits ( which then pushes them to oblivion)

really,really,really!
Kwag,we are with you!

------------

and you again: (:-@

"Seems jorel was the one to malign Divx. "

are you blame me?

where i write something like this? are you and ?

what you talking about????????
Reply With Quote
  #171  
12-29-2002, 03:17 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
The file size difference is a little larger with the new matrix. But not much. Even when I correct the CQ value to target the same file size as the original matrix, the result is still less DCT blocks shown and actually less macro blocks and artifacts .
Sounds very promising .

Quote:
Maybe the intra with all 16's is better too, and does a better job on the high frequency end too

Theoretically, a Q factor of 16 for all frequencies of the P and B frames should cause a significant increase in quality, since it quantizes less than the current KVCD Q matrix. My main concern would be the drop in the compression ratio, but if you say it's not significant then that's fine.

Of course, it is the "standard MPEG" non-intra-frame matrix... but we shouldn't be biased against it just because of that .

Quote:
clip1 = DirectShowsource("k:\test_1.m1v").Subtitle("Defaul t KVCD Matrix")
Good idea! I never even thought of DirectShowSource .

Quote:
You'll notice that this way you don't have to save your .m1v files to AVI, as you can see them in Vdub right after your encode. Makes the test cycle much faster
Yep, that did slow it down a lot .

Now testing with 16s...
Reply With Quote
  #172  
12-29-2002, 04:39 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hey Kwag,

I liked your compare.avs script. Have you or SansGrip tried this
utility "avscompare" to compare the effects of different filters. Here's the link:

http://forum.doom9.org/showthread.ph...ght=avscompare

I'm using it to compare a script with CQ Blockbuster and one without
See what you think.

-black prince
Reply With Quote
  #173  
12-29-2002, 04:47 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
Have you or SansGrip tried this
utility "avscompare" to compare the effects of different filters.
I've not tried it yet but it looks interesting. I'll add it to my ever-growing todo list .

BTW, new version of Blockbuster at my site...
Reply With Quote
  #174  
12-29-2002, 04:48 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hi jorel,

jorel wrote:
Quote:
Hopefully we'll keep optimizing MPEG-1 to a point where we drive DivX nuts
I just figured out what you meant and I owe you an appology
I think you are saying if the picture quality keeps getting better
using KVCD CQ we won't be limited to using Divx on the PC.
I believe we are both in agreement.

-black prince
Reply With Quote
  #175  
12-29-2002, 04:58 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
Hi jorel,

jorel wrote:
Quote:
Hopefully we'll keep optimizing MPEG-1 to a point where we drive DivX nuts
I just figured out what you meant and I owe you an appology
I think you are saying if the picture quality keeps getting better
using KVCD CQ we won't be limited to using Divx on the PC.
I believe we are both in agreement.

-black prince
i quote this part:
"You all encourage us to push all this stuff to the limits. And the "NAH" sayers at other sites encourage us to go beyond the standards and over the limits ( which then pushes them to oblivion )"

Kwag wrote this after me:
"Hopefully we'll keep optimizing MPEG-1 to a point where we drive DivX nuts"

but no problems!
Yes dear friend,"we are both in agreement."

don't need appology,but you "scare me"
Reply With Quote
  #176  
12-29-2002, 08:06 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
Hey Kwag and SansGrip,

You've got to try "avsCompare" It allows you to load up to 4
avs scripts and allows you to switch between. You can enlarge
the frame and save it as bitmap file. You can play each script to
preview. There future enhancements to add subtitles to a bitmap
image, but it can be done in the script now. I compared Temporal
Smoother to FluxSmooth to TemporalSoften in 3 different scripts.
Then I compared different Blockbuster noise variance settings with 4
different scripts. Then I compared BilinearResize to LanczosResize
to BicubicResize. LanczosResize was sharper than BilinearResize
which I already knew, but it was very clear when I enlarge them
both. This is a great tool

-black prince
Reply With Quote
  #177  
12-29-2002, 08:33 PM
gonzopdx gonzopdx is offline
Free Member
 
Join Date: Dec 2002
Location: Corvallis, OR
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
@black prince

where can you get it? i wanty i wanty!
Reply With Quote
  #178  
12-29-2002, 08:40 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@SansGrip,

"avscompare" showed that LanczosResize not only sharpened the
picture, but also enhanced colors. Colors were richer and image
detail was clearer. My question... would this be suitable for CQ
encodes. I realize file size will increase, but since I'm not using
Blockbuster noise and this would really enhance picture quality.
BilinearResize appears to have a more softer look, but probably
increases less. I plan to use 704x480 with CQ for 2 CD's.


-black prince
Reply With Quote
  #179  
12-29-2002, 08:44 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@gonzopdpx,

http://forum.doom9.org/showthread.ph...ght=avscompare

Enjoy

-black prince
Reply With Quote
  #180  
12-29-2002, 08:50 PM
SansGrip SansGrip is offline
Free Member
 
Join Date: Nov 2002
Location: Ontario, Canada
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by black prince
LanczosResize not only sharpened the
picture, but also enhanced colors. Colors were richer and image
detail was clearer.
Yep, that is indeed the case. If you're interested in reading more about it, or want objective proof, check out this post I made last month on Doom9.

In that post I suggested that one should always use Lanczos for its most accurate colour fidelity, and then soften if necessary with a filter designed to do this.

Quote:
My question... would this be suitable for CQ encodes. I realize file size will increase, but since I'm not using Blockbuster noise and this would really enhance picture quality.
The only thing you can do is try it . Burn a CD-RW with the same clip encoded with the same settings using bilinear, bicubic and Lanczos. Watch on a TV and see which you prefer .
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Interesting results with YlevelsS supermule Avisynth Scripting 2 08-06-2006 11:59 PM
Avisynth: Interesting ASharp phenomenon... audioslave Avisynth Scripting 12 10-23-2003 06:36 AM
Interesting info about the Luminance Level in CCE digitalize Video Encoding and Conversion 0 04-28-2003 12:29 PM
A couple of interesting links.. kwag Off-topic Lounge 0 12-31-2002 03:47 PM
KVCD: Interesting poll found kwag Video Encoding and Conversion 2 12-31-2002 02:44 AM




 
All times are GMT -5. The time now is 01:00 PM  —  vBulletin © Jelsoft Enterprises Ltd