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)

SansGrip 01-08-2003 10:59 AM

Quote:

Originally Posted by kwag
Where are the extra bits coming from :?: I agree with you. I don't know 8O

Of course it could simply be a case of better bit allocation. We won't know until we test more ;).

kwag 01-08-2003 11:04 AM

Quote:

Originally Posted by Boulder
Kwag, you've created another monster :twisted:

I did a quick-and-dirty test, and *drum roll*

CQ_VBR file size increased when B frames set to 1 (CQ_VBR value 17,3)

It went from 11,712 to 13219.

CQ file size decreased when B frames set to 1 (CQ value 60)

It went from 6,547 to 6,231.

Uh oh. Looks like this will be another chaotic TMPGEnc test session for you lads.

YEAH :!: , and there are also less DCT blocks shown and less artifacts (Gibbs) :jawdrop:

I'm running two more tests now without sampler to see what the end file size is. Maybe this was the ticket to optimize CQ mode :idea:

-kwag

kwag 01-08-2003 11:33 AM

I just finished two 5 minute encodes with both GOP's The visual difference, at least to me, is remarkable. 8O
The file size for GOP 1-12-2-1-24 was 24,338KB and for 1-12-1-1-24 was 24,339KB :mrgreen: 1KB difference :mrgreen:

Now I'm running the same test on another 5 minute section. The lobby scene 8)
I'll edit this post.

Running second test ...... Done!,

File size for 1-12-2-1-24 is 42,066KB
File size for 1-12-1-1-24 is 42,487KB

This was on the lobby scene which is a very active high action part. That's 421KB larger for the 1-12-1-1-24. Not that much, considering a 5 minute clip full of action, and the quality difference is just worth it 8O :D

Now, to encode the complete movie, again :x


-kwag

SansGrip 01-08-2003 11:50 AM

Quote:

Originally Posted by kwag
GOP 1-12-2-1-34

Please tell me you mean 1-12-2-1-24.... ;)

kwag 01-08-2003 11:52 AM

Quote:

Originally Posted by SansGrip
Quote:

Originally Posted by kwag
GOP 1-12-2-1-34

Please tell me you mean 1-12-2-1-24.... ;)

Sorry :!: , I'm too excited :mrgreen:
Yes, it's 1-12-2-1-24

Edit: I just edited the post

-kwag

kwag 01-08-2003 01:03 PM

Quote:

Originally Posted by SansGrip
@kwag

I ran the artifact test and the problem I highlighted is indeed gone when I use 8 as a minimum. That said, now I see similar artifacts in the left-hand side of the frame.

Using a lot of 8s in a frame has never worked for me -- while theoretically it should give best quality, if you single-step through the frames you'll see serious degeneration in the P- and B- frames...

Hi SansGrip,

Could you run just one more test with the 1-12-1-1-24 and the BETA-1 matrix, and see if the artifacts are still there :?:
I just want to be sure that it's really the values below 8, or the GOP combination. Maybe with the IBP GOP the artifacts won't appear :!:

-kwag

SansGrip 01-08-2003 01:24 PM

Quote:

Originally Posted by kwag
Could you run just one more test with the 1-12-1-1-24 and the BETA-1 matrix, and see if the artifacts are still there :?:

Yep, I can do that in a minute. I'm running some tests on the new GOP at the moment :).

Boulder 01-08-2003 01:49 PM

I hope you guys get the new GOP and CQ optimizations done soon..I've got lots to encode - the Star Trek reruns began today :lol: I don't want to encode the series with lower quality if there's a new, great improvement coming just 'round the corner :wink:

kwag 01-08-2003 04:20 PM

SansGrip,

I look like this :teeth:, waiting on your result before the :sun: goes down :mrgreen:

SansGrip 01-08-2003 05:26 PM

Quote:

Originally Posted by kwag
I look like this :teeth:, waiting on your result before the :sun: goes down :mrgreen:

heheh I'm getting there -- had to fix a FluxSmooth bug (new release on my site) and various other things. I hope to redo the artifacts test with the new GOP either shortly or after supper.

I've been doing some tests with the new GOP, CQ and CQ_VBR. Here's my verdict:

CQ_VBR mode is better for shorter movies (say, 90mins at 528x480 or 120mins at 352x480, or whatever) where you can afford to use Blockbuster. It really does improve the picture quality significantly wrt blockiness. Personally, I would even drop the audio down a notch to get less blockiness, but that's just me :).

CQ mode is better when you have a borderline case for a particular resolution. Since it quantizes low frequencies much more aggressively, it can spend more bits on higher-frequency stuff and thus you see reduced Gibbs etc. and an overall nicer quality. Unfortunately, you do get blockiness. That seems to be unavoidable with this mode.

As far as the new GOP goes, it definitely reduces CQ mode blocks noticibly. Perhaps it's stealing some bits back into low-freq areas from high-freq areas, because I see no detrimental effects from the change. Hence I give it a thumbs up for CQ :). It doesn't have much effect on CQ_VBR mode, though, other than a significant increase in file size (2 CQ_VBR levels). It gets a thumbs down for CQ_VBR mode ;).

And that... is my final answer :mrgreen:.

SansGrip 01-08-2003 06:01 PM

@kwag

Those artifacts are still visible with the new GOP and beta-1 :(.

kwag 01-08-2003 07:51 PM

Quote:

Originally Posted by SansGrip
@kwag

Those artifacts are still visible with the new GOP and beta-1 :(.

I can't duplicate what you see 8O . I don't see those artifacts on my encodes. Could it possibly be that the .m1v when it's converted with Huffy CODEC, that you see that effect :?: . As you already know the frame you saw that little red artifact, could you load the .m1v directly with Vdub and check that frame and see if it's still there :?: It seems to me that if the matrix was doing mathematical errors on values below 8, we would see many many artifacts on almost every low lit scene. Not just a single random artifact in a frame :idea: . That's just the way I see it. So on a very very dark screen, we would have spots all over the screen on every matrix "hit" division on error, etc.

Side note: I finished my encode of "The Matrix" with the new GOP, and 8O 8O 8O that's what it looks like :D Final size 666,669KB ( :spook: ) which I had estimated 687. But my Sampler() size was ~11.3MB and the required sample was 11.45MB, so the prediction is right on the ball with this GOP too :)

Edit: I'm using TMPGEnc 2.59 PLUS

-kwag

SansGrip 01-08-2003 08:04 PM

Quote:

Originally Posted by kwag
Could it possibly be that the .m1v when it's converted with Huffy CODEC, that you see that effect :?:

Nope - Huffy is lossless, so it preserves the clip exactly. Besides, I see it in the m1v too :).

Quote:

It seems to me that if the matrix was doing mathematical errors on values below 8, we would see many many artifacts on almost every low lit scene.
Not necessarily, and not only low-lit. It'll happen in very low-frequency areas, and only occasionally (mostly at the top of the active frame, I've found). Think of it this way: the DCT process churns out numbers between 0 and 2040 (or thereabouts). Most of those numbers (0-1530), when divided by 6, produce a value within the valid range of 0-255. It's only when you get numbers larger than 1530 that you'll see overflow.

Not only that, but it could be happening in areas where it's unlikely you'll see it. I have a theory that it requires several of these in the same area to be really visible on casual inspection, perhaps caused by strong vertical or horizontal edges around a very low-frequency area. Or something like that ;).

Quote:

I finished my encode of "The Matrix" with the new GOP, and 8O 8O 8O that's what it looks like :D
Yep, the new GOP is definitely better :).

Just out of interest, take a look through the final encode using VirtualDub (use the brightness/contrast filter to increase the brightness quite a bit) and I think you'll find one of those artifacts with enough looking. I've seen them several times with various sources using the notch matrix.

kwag 01-08-2003 08:22 PM

OK SansGrip, that will be my assignment for the rest of the night. Matrix cleanup and de-artifacting :D

BTW, here's a piece of the full encode on "The Matrix" with the new GOP. It's only about 11 seconds: http://www.kvcd.net/test-newmat-cq-.mpg (No audio) just renamed the .m1v to .mpg so people can play it on WinDVD, etc :wink:

-kwag

SansGrip 01-08-2003 09:05 PM

Quote:

Originally Posted by kwag
BTW, here's a piece of the full encode on "The Matrix" with the new GOP.

Looks really good -- almost as good as the encode I did way back when, on 3 discs :D.

Is that LBR or 352x240-PLUS?

kwag 01-08-2003 09:09 PM

Quote:

Originally Posted by SansGrip
Is that LBR or 352x240-PLUS?

:punch: 528x480 :mrgreen:

SansGrip 01-08-2003 09:21 PM

Quote:

Originally Posted by kwag
:punch: 528x480 :mrgreen:

Stupid ATI File Player shows it at 352x240 :roll:. Let me try again with a proper player ;).

syk2c11 01-08-2003 11:28 PM

Kwag,
In your latest "Matrix" sample, did you use NEW GOP (1-12-1-1-24) with original KVCD matrix or Notch beta-1 matrix? With NEW GOP, do we need blockbuster (noise or dither) at all?

Gaudi 01-08-2003 11:31 PM

Quote:

Originally Posted by SansGrip
Stupid ATI File Player shows it at 352x240 . Let me try again with a proper player .

Give BSPlayer a try. It rocks.
Gaudi

kwag 01-08-2003 11:37 PM

Quote:

Originally Posted by syk2c11
Kwag,
In your latest "Matrix" sample, did you use NEW GOP (1-12-1-1-24) with original KVCD matrix or Notch beta-1 matrix? With NEW GOP, do we need blockbuster (noise or dither) at all?

I used 1-12-1-1-24 ( the new test GOP ) with BETA-1 "notch" matrix and this script:

Code:

LoadPlugin("C:\encoding\MPEG2DEC.dll")
LoadPlugin("C:\encoding\fluxsmooth.dll")
LoadPlugin("C:\encoding\blockbuster.dll")
LoadPlugin("C:\encoding\legalclip.dll")
LoadPlugin("C:\encoding\sampler.dll")

Mpeg2Source("F:\THE_MATRIX_16X9LB_N_AMERICA\VIDEO_TS\test.d2v")
LegalClip()
BilinearResize(496,256,12,62,696,356)
FluxSmooth()
Blockbuster(method="noise", variance=.3, seed=1)
#AddBorders(16,112,16,112)
LegalClip()

#Sampler(length=24)
## MPEG size = ((Total frames/MovieTimeInMinutes)/24) * MPEG sample file size ##

I have mixed feelings about "dither". Today, I got a call from a friend who has a 48" Panasonic HDTV rear screen projection system, and he told me that a movie he did with "dither" set to .4, looks like if you were watching the movie through a "screen". So I guess I have to make more tests with that. Maybe "noise" does indeed look more natural. :roll:

-kwag


All times are GMT -5. The time now is 01:47 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.