Log in

View Full Version : AutoGK - What does quality mean ?


dbl
12th January 2006, 16:24
Ok, this is my first post, but I swear to god I did :search: and I did :readfaq: and I certainly did :readguid: .

However, I've not found anything approaching an answer to my particular question: What does the quality setting in AutoGK mean?

I realise that overall it controls the quality and therefore the resulting filesize of an encode. But I wondered exactly what encoding paramaters are used for a particular setting.

Presumably, quantizers change, and maybe profiles change, and maybe resolutions change??

Is there a rough guide to what the parameters that change are and there (approximate values)?

Hope that's clear, and I really hope this hasn't been asked before.

Thanks,
<dbl>

jggimi
12th January 2006, 16:57
Hello, and welcome to the forum!

"Quality-based" encoding is a fixed-quantizer, variable bitrate encoding, done in a single pass. Size cannot be predetermined, but the output has a constant quality frame by frame.

For much more on encoding options such as this -- even if you're using XviD -- see the original DivX 5 user guide -- the clarity of the explanations is superb. Since they've moved to DivX 6, the link to this old guide is no longer obvious. Try this link:

http://support.divx.com/cgi-bin/divx.cfg/php/enduser/std_adp.php?p_faqid=444&p_created=1081444519&p_sid=nL1sZqZh&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9Mjk0JnBfcHJvZHM9MCZwX2NhdHM9JnBfcHY9JnBfY3Y9JnBfc2VhcmNoX3R5cGU9YW5zd2Vycy5zZWFyY2hfbmwmcF9wYWdlPTEmcF9zZWFyY2hfdGV4dD1kaXZ4IHVzZXIgZ3VpZGU*&p_li=&p_topview=1

dbl
12th January 2006, 18:07
Hmm, that doesn't quite answer my question, but I dare say that's because I didn't phrase it very well in the first place :o .

I'll try it a different way:
Let's say I do two xvid encodes with autogk, one at 75% quality and one at 50% quality. What parameters change in vdub/xvid accordingly, and how are these parameters derived?
From what you say it sounds like the quantizer would be different in a 75% encode than a 50% enode? But is that all that changes?



(Oh, that divx guide is fantastic btw, thanks).

jggimi
12th January 2006, 18:22
But is that all that changes?
Yes. The scale reaches from 100%, Q1 to 0%, Q31. So at 50% its using Q16, and at 75%, Q8.

dbl
12th January 2006, 18:34
Ahh! Who'd have thought it would be so beautifully simple :-).

Thanks jggimi.

Does lead me to another question though, if that's all that changes, what's the compressibility test for? Is that just to choose the target resolution perhaps?

BigDid
12th January 2006, 20:37
...what's the compressibility test for? Is that just to choose the target resolution perhaps?
Resolution and matrix and resizer, retreave the infos in the logs; I don't use SAP compatibility except MTK in rare occasions, so for AGK-XVID encoding 2 passes:

-Best case-
Resolution around 640 width, with quality around or above 70%
Sharp matrix
Lanczos resizer (very sharp, good at keeping details)
I do get very good final quality in this case but I often have to raise the size to stick with these parameters (exemple:go from 900Mb to 1100Mb size for a movie longer than 2 hours)

When not enough bitrate (or size, both are related), AGK will:
- lower the resolution
- change the resizer (softer)
- under 608 width (for 16/9) will change to soft matrix then
- change to soft resizer again (not sure about the step of that one)
- lower the resolution again and again

Only Len0x can confirm the exacts stepping, this is from my memory :)

Did

Edited: Related to AGK-Xvid encoding, 2 passes only ( jggimi's answer below is best suited for general explanation, mine is just recalling my experiences and opinions :D )

jggimi
12th January 2006, 20:46
BigDid replied as I was typing this. My reply covered both "simplicity" of quality based encoding, as well as compressibility testing.

----
Its not quite so beautifully simple. In DivX, for example, you can choose a percentage that gives you a non-integer Q. If I recall correctly -- and I may not -- the codec will average frames using the two neighboring quantizers, but ... it's still considered a constant quantizer encoding.

----

A compressibility test is only used for multipass encoding, when a fixed filesize is expected. Its automatic with AGK for filesize based encodings, and optional -- but highly recommended -- with GK.

The test takes a sampling of frame sequences from the entire content, and does a first pass -- this determines the maximum bitrate possible at that particular resolution. AGK will both pick a resolution and make adjustments to codec settings in order to reach a compression level it considers acceptable.

nixo
13th January 2006, 13:36
----
Its not quite so beautifully simple. In DivX, for example, you can choose a percentage that gives you a non-integer Q. If I recall correctly -- and I may not -- the codec will average frames using the two neighboring quantizers, but ... it's still considered a constant quantizer encoding.
----


Isn't that the same in XviD? I did a test a while ago with AutoGK to find the corresponding quantizer for each percentage, and it came out like this:

75% = Quant 2.67
74% = Quant 2.70
73% = Quant 2.74
72% = Quant 2.78
71% = Quant 2.82
70% = Quant 2.86
69% = Quant 2.90
68% = Quant 2.94
67% = Quant 2.99
66% = Quant 3.03
65% = Quant 3.08
64% = Quant 3.12
63% = Quant 3.17
62% = Quant 3.23
61% = Quant 3.28
60% = Quant 3.33