digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   CQ vs. CQ_VBR ... VERY INTERESTING... (http://www.digitalfaq.com/archives/avisynth/1910-cq-vs-cqvbr.html)

black prince 12-30-2002 04:00 PM

@Kwag,

Well I tried avs with Blockbuster dither and without. I used "avscompare" just
to have a visual look. For starters dither added about 6MB to the
test file. The script without dither looked better than the one with it.
I'm not sure what it's suppose to do to picture quality, but it reduced
colour richiness, gave the picture a hazy apperance, and almost
appeared like a smoother filter. Maybe settings need further tweaking.

Converted KVCDx3 CQ_VBR to CQ using the GOP 1-12-2-1-24 and the KVCD
Notch (Beta-2) Q-Matrix. It's the "Bomb" as hip hoppers would save or
"PHAT". File size has decreased so CQ was set higher. This may
be the best combination for 1 or 2 CD's with better picture quality
than (if that were possible) 704x480 resolution. I viewed 704x480
vs 528x480 with "avscompare" at the same CQ of 70 and there was
no doubt that 528x480 is superior with a smaller file to boot. :D

-black prince

SansGrip 12-30-2002 04:02 PM

Quote:

Originally Posted by kwag
Hey SansGrip :!: Tick, Tick, Tick, Tick :lol:

heheh sorry, real world intervened for a while (grocery shopping, etc.). I've finished all the old matrix samples, all the CQ_VBR new matrix samples, 352x240 CQ new, and 352x480 CQ new. Now I'm doing 528x480 CQ new and then all that remains is 704x480 CQ new.

After that I'll post basic stats (file sizes, quality settings etc.) and will start my visual comparisons...

:)

SansGrip 12-30-2002 04:03 PM

Quote:

Originally Posted by black prince
For starters dither added about 6MB to the
test file.

That's an awful lot. What settings are you using?

muaddib 12-30-2002 04:04 PM

Quote:

Originally Posted by kwag
Hey SansGrip :!: Tick, Tick, Tick, Tick :lol:

Are the results 8O or are they :P :x :twisted:

-kwag

Yeah man!
That's the most expected answer... CQ_VBR with Blockbuster or CQ without Blockbuster?
Which will give a better encode? I mean, by now, which will give more viewing pleasure? :?: :roll:

SansGrip 12-30-2002 04:09 PM

Quote:

Originally Posted by kwag
DON'T USE WMP :!:

You can use WMP if you install the Ligos MPEG decoder DirectShow filter. It'll rescale to 4:3 like WinDVD does.

black prince 12-30-2002 04:12 PM

@SansGrip,

SansGrip wrote:
Quote:

That's an awful lot. What settings are you using?
LegalClip()
LanczosResize(672,448)
FluxSmooth()
Blockbuster(method="dither", detail_min=1, detail_max=10, variance=1)
AddBorders(16,16,16,16)
LegalClip()
Sampler()


Got dither settings from Kwag:

Without dither test file size for CQ 50 704x480 = 21,896,415
With dither test file size for CQ 50 704x480 = 27,158,387

-black prince

SansGrip 12-30-2002 04:32 PM

Quote:

Originally Posted by black prince
Blockbuster(method="dither", detail_min=1, detail_max=10, variance=1)

These settings shouldn't produce such a huge increase in file size. Are you sure the presence/absence of Blockbuster is the only variable?

Quote:

Without dither test file size for CQ 50 704x480 = 21,896,415
With dither test file size for CQ 50 704x480 = 27,158,387
Very strange. Try with variance=0.7.

SansGrip 12-30-2002 04:40 PM

All samples are 11.4mb, new GOP, min bit rate 400. CQ_VBR mode has a dither variance of 1, CQ mode with no dither.

Old matrix

352x240 CQ 100
352x240 CQ_VBR 54
352x480 CQ 78.85
352x480 CQ_VBR 15.6
528x480 CQ 69.95
528x480 CQ_VBR 9.3
704x480 CQ 56.8
704x480 CQ_VBR 6.4

New matrix

352x240 CQ 80.2
352x240 CQ_VBR 36
352x480 CQ 70
352x480 CQ_VBR 15.2
528x480 CQ 56.8
528x480 CQ_VBR 9.25
704x480 CQ 45
704x480 CQ_VBR 6.4

Some interesting results there (e.g. the new matrix causes a much more significant decrease in CQ quality level than CQ_VBR quality level).

I'm going to start the visual comparisons now (unfortunately kwag's DirectShowSource method doesn't work for me, so I'll have to convert to AVI still. It'll take some time ;)).

If anyone is interested in seeing specific samples, I can put them on the web. I was thinking about putting all of them up, but I think 183mb might be a little too much for people to download :D.

apoc 12-30-2002 04:42 PM

I've just encoded a low action scene with old and new matrix (1 mn 10 ) 544x576 :

CQ 58 - KVCD matrix : 7369021 bytes
CQ 58 - KVCD NOTCH beta2 : 9330948 bytes :roll:

The script I used :

LegalClip()
Crop(8, 74, 692, 428)
BilinearResize(512, 320)
FluxSmooth()
AddBorders(16,128,16,128)
LegalClip()

--
apoc

kwag 12-30-2002 05:45 PM

Quote:

Originally Posted by SansGrip

You can use WMP if you install the Ligos MPEG decoder DirectShow filter. It'll rescale to 4:3 like WinDVD does.

AH!, ok, I'll get that :wink:

-kwag

kwag 12-30-2002 05:52 PM

Quote:

Originally Posted by apoc
I've just encoded a low action scene with old and new matrix (1 mn 10 ) 544x576 :

CQ 58 - KVCD matrix : 7369021 bytes
CQ 58 - KVCD NOTCH beta2 : 9330948 bytes :roll:

The script I used :

LegalClip()
Crop(8, 74, 692, 428)
BilinearResize(512, 320)
FluxSmooth()
AddBorders(16,128,16,128)
LegalClip()

--
apoc

That would be about the correct sizes, because you left CQ the same for both matrixes. As SansGrip just mentioned before: "The new matrix causes a much more significant decrease in CQ quality level than CQ_VBR quality level. "

That is for the same reference file size.

-kwag

SansGrip 12-30-2002 06:18 PM

Ok, all 16 samples have now been magically transformed into video-only system streams, then into a .bin file, and are currently residing on a shiny piece of metal-covered plastic in a case on my desk.

As soon as the kids are in bed I'll stick it in my standalone and watch them all on TV. After that, I will know. I hope ;).

I did do some visual compares in VirtualDub and there were some noticible differences between the old and new matrices. Sometimes things looked better with the new matrix, and sometimes with the old. The good news is that on balance I'd say more things looked better with the new matrix than the old...

The bad news is that because of the significant reduction in CQ quality level, fast-motion scenes tended to be quite a bit blockier with the new matrix than with the old. Bear in mind these weren't DCT blocks, they were macroblocks introduced because of insufficient bits to describe the motion.

It's a tough call as to whether the improvements seen with the new matrix outweigh the difference in CQ quality levels and hence the increased occurance of macroblocks.

As for whether CQ_VBR-with-dither is better than CQ-without-dither, when watching on my monitor I'd say that the former is better in all resolutions. However, there's a huge difference between watching on a monitor and watching on a TV, so I'm going to keep my mind open until I can see all the clips on the big screen.

That's the status so far. I hope someone else duplicates at least part of the testing I've done here, otherwise my main concern will be that it's totally a judgement call on my part. I'd rather have input from others as well.

kwag 12-30-2002 06:28 PM

I'm 8 minutes to go on a 11 hour 8O 2-pass VBR encode with the new matrix, and then I'll compare the CQ I did yesterday, also with the new matrix. BTW SansGrip, If you do notice more blocks with the new matrix on high action scenes, then maybe the notch (BETA-1) is the way to go, because that one has the non-intra modified and is basically the original KVCD matrix with the small "notch" modification. The BETA-2 hast all 16's on intra.
I'll also report, hopefully with some screenshots, a couple of samples from the 2-pass and CQ.

-kwag

SansGrip 12-30-2002 06:32 PM

Quote:

Originally Posted by kwag
I'm 8 minutes to go on a 11 hour 8O 2-pass VBR encode with the new matrix, and then I'll compare the CQ I did yesterday, also with the new matrix.

Sounds good -- will be interesting to see if what is theoretically the highest quality mode (2-pass) really matches (or even exceeds 8O) our CQ and prediction :).

Quote:

BTW SansGrip, If you do notice more blocks with the new matrix on high action scenes, then maybe the notch (BETA-1) is the way to go
Ah, you mean make another 8 encodes with beta-1? :mrgreen: hehe yep, I'll do that too. Probably tomorrow, because I've spent far too much time in front of this machine already today ;).

I think the all-16s non-intra-frame matrix is probably the culprit wrt the much larger file sizes. It'll compress much less than the KVCD version.

Quote:

I'll also report, hopefully with some screenshots, a couple of samples from the 2-pass and CQ.
I'm looking forward to that :).

kwag 12-30-2002 06:59 PM

As usual, Murphy strikes again 8O . My 2-pass file size came out to 646,240KB and the CQ size is 690,770KB :x .
The predicted size was correct for CQ, so I screwed up somewhere on the average bit rate calc for 2-Pass. Now I could re-calculate a lower CQ value and encode just some portions for comparison, targeting CQ for the size that the 2-pass came out. But I'm not sure that will be necessary, because the difference in quality is just bizarre 8O I'll let you guys decide if you want me to encode again with CQ, because I think that the difference will just be a little better for 2-pass. Encoding times were 11 hours for 2-pass and ~5 hours for CQ. You decide:

Script used was this:

LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\sampler.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
LoadPlugin("C:\encoding\legalclip.dll")
mpeg2source("K:\K19\VIDEO_TS\k19.d2v")
LegalClip()
LancZosResize(496,336)
FluxSmooth()
Blockbuster(method="dither", detail_min=1, detail_max=10, variance=1)
AddBorders(16,72,16,72)
LegalClip()

Images are blown up to enhance details.

http://www.digitalfaq.com/archives/i.../2002/12/4.png

gonzopdx 12-30-2002 07:48 PM

the 2-pass kinda looks like poo 8O

kwag 12-30-2002 08:29 PM

Quote:

Originally Posted by gonzopdx
the 2-pass kinda looks like poo 8O

I would say more like poopoo :lol:
I'm going to re-encode that portion after I run prediction to target CQ for the same size that the 2-pass came out. Just for curiosity :roll: .
I'll post result in a little while.

-kwag

SansGrip 12-30-2002 08:48 PM

Quote:

Originally Posted by kwag
I would say more like poopoo :lol:

It's certainly poo-esque. Well, that answered that question ;).

Daagar 12-30-2002 09:02 PM

Just for the record, back a few months ago when people were duking it out on vcdhelp.com about how 'kvcd sucked' and '2-pass' was the only way to go, I tried my darnedest to use 2-pass mode and never came up with anything better than what Kwag just showed us. It always came out horrible. Granted, this was before all the kvcd matrixes and file prediciton, but it doesn't look like things have changed!

I converted a 2-disc SVCD file the other night to a 1-disc KVCD (352x480) using the standard CQ/CQ_VBR methods and SansGrip filters and the results were spectacular. I prefer using CQ_VBR because it takes _much_ less effort to narrow down to the correct CQ_VBR value. As others have mentioned, CQ values over 80 skew the prediction formulas quite a bit.

kwag 12-30-2002 09:14 PM

Hi guys :D ,
I created the same CQ sample by lowering the CQ value re-calculated with prediction to target the file size that the 2-pass VBR made. The original CQ value was 53.7 and the new one is 46. Here's the result, still with an advantage for CQ over 2-pass VBR 8)

http://www.digitalfaq.com/archives/i.../2002/12/5.png


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.