Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 Doom9's Forum Quantizers
 Register FAQ Calendar Search Today's Posts Mark Forums Read

 12th February 2004, 15:22 #1  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 Quantizers Another novice (or newbie) question from me. I have this simple question and, thanks in advance, to the kind people who would answer it. Here goes: 1. What's a quantiser? 2. How does that number actually determine the compression of I frame, P-frame, B-frame? I mean what kind of mathematical equation is used to determine the filesize of the I frame , P frame, B frame? (lower quantiser=good quality, higher quantiser=poor quality?) Sorry if this is a repetition, but time constraints hamper me from searching this forum and using its full potential. If anyone can help me with references to other threads, thanks in advance, for that too.
 12th February 2004, 16:06 #2  |  Link sysKin Registered User     Join Date: Jun 2002 Location: Adelaide, Australia Posts: 1,167 __________________ Visit #xvid or #x264 at irc.freenode.net
 13th February 2004, 16:06 #3  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 Cool Thanx a lot, will look into those...
 13th February 2004, 16:34 #4  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 I seem to get it, I think, although I am more confused than before now. A more simpler explanation would help... Thanks to anyone who replies
 13th February 2004, 16:45 #5  |  Link mf ·     Join Date: Jan 2002 Posts: 1,729 *VERY* simple explanation: the image is converted to detail signals (DCT), and then those signals are divided (coefficient cutting) to make it smaller. The more signal you cut off, the more detail you lose and more artifacts (blocks, ringing aka mosquitoes) you get. The quantizer is the detail removal factor (DivX3/Nandub thus calls quantizers DRF). The higher the quant, the more detail gets cut off, the lower quality.
 13th February 2004, 16:54 #6  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 That makes sense now. So DRF in DivX 3 is Quantizer in XviD. Thanks for the info. By the way, mfToon is amazing, all the animes I have ripped so far look damn good. Although the encoding process is going at 4 FPS!!! damn slow man...
 13th February 2004, 20:57 #7  |  Link crusty Ahhh....Nuts!!     Join Date: May 2002 Location: Holland Posts: 309 http://www.cmlab.csie.ntu.edu.tw/cm...peg/encoder.htm http://www.ece.purdue.edu/~ace/jpeg-tut/jpgquan1.html http://www.mpeg.org/MPEG/MSSG/tm5/Ch7/Ch7.html http://www.acm.org/crossroads/xrds6...aimgcoding.html Damn, I think I'll add those to my FAQ. They're good. Added c3a to my faq : what is a Quantization Matrix? __________________ Core 2 Duo intel, overclocked at something (can't remember what i set it at), about 2 TB in hard storage, nvidia 9800 GT and a pretty old 19tftscreen. Crusty007 at en.Wikipedia.org
 14th February 2004, 07:45 #8  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 In Advanced Options.... Min I frame Quantizer=1 Max I frame Quantizer=31 Min P frame Quantizer=1 Max P frame Quantizer=31 31 gives the worst quality possible, so why let it be 31 when the codec is gonna choose only max quantiser=6 anyways? Thats what I have noticed when I am ripping...
 14th February 2004, 08:26 #9  |  Link Neo Neko Registered User     Join Date: Mar 2002 Location: Kansas City, Missouri Posts: 1,812 It's quite simple really. On slow or static screens the video can be compressed with a quantizer of 31 for some frames with very little real quality loss. But only on relatively long sceens with almost no difference between frames. Like perhaps watching paint dry. __________________ Opensource will not take over the world. But it will sure improve the lives of most of it! _______________________________________________ Inkscape - Scallable Vector Graphics for everyone. The GIMP - Free raster graphics and photo editing software. Planeshift - Free 3D MMORPG. Cause everyone needs some fun.
14th February 2004, 08:26   #10  |  Link
Prettz
easily bamboozled user

Join Date: Sep 2002
Location: Atlanta
Posts: 373
Quote:
 Originally posted by atreya2011 In Advanced Options.... Min I frame Quantizer=1 Max I frame Quantizer=31 Min P frame Quantizer=1 Max P frame Quantizer=31 31 gives the worst quality possible, so why let it be 31 when the codec is gonna choose only max quantiser=6 anyways? Thats what I have noticed when I am ripping...
Well for one thing, imagine if you have a few seconds of solid black in your video. If it uses quant 31, you lose nothing but gain a whole lot of space. I've seen the quant go all the way up to 15 and never noticed a single scene in that video where it looked like it was quantized too high. It's best just to leave the max quantizer alone.

14th February 2004, 08:54   #11  |  Link
sysKin
Registered User

Join Date: Jun 2002
Posts: 1,167
Quote:
 Originally posted by Prettz Well for one thing, imagine if you have a few seconds of solid black in your video. If it uses quant 31, you lose nothing but gain a whole lot of space. I've seen the quant go all the way up to 15 and never noticed a single scene in that video where it looked like it was quantized too high. It's best just to leave the max quantizer alone.
Nah, you wouldn't gain anything - black is black, not-coded blocks are not-coded.

The quants are not restricted *because* two-pass will use them wisely. Yes, they can be restricted and it wouldn't change much (for exaple, 2-10 restriction) but it doesn't mean we should restrict them.
__________________
Visit #xvid or #x264 at irc.freenode.net

14th February 2004, 09:02   #12  |  Link
atreya2011
Apprentice Ripper

Join Date: Feb 2004
Posts: 90
Quote:
 Originally posted by sysKin Nah, you wouldn't gain anything - black is black, not-coded blocks are not-coded. The quants are not restricted *because* two-pass will use them wisely. Yes, they can be restricted and it wouldn't change much (for exaple, 2-10 restriction) but it doesn't mean we should restrict them.
Since it would'nt change much, why should'nt I restrict them. What do you mean by "two pass will choose them wisely"...

 14th February 2004, 10:48 #13  |  Link mf ·     Join Date: Jan 2002 Posts: 1,729 If a frame is low complexity it will have a small size even at quant 2. Also, with watching paint dry it might be recommendable to watch it dry at quant 2 because of the above reason .
 14th February 2004, 12:00 #14  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 So its ok to restrict them??? I can use Min I frame quantizer=2 Max I frame quantizer=5 Min P frame quantizer=2 Max P frame quantizer=5 without any dire consequences I hope...
 14th February 2004, 12:06 #15  |  Link mf ·     Join Date: Jan 2002 Posts: 1,729 The question is, WHY do you want it. It won't have "dire" consequences (though limiting to quant 5 may give you quite an oversize) but rate control performs better without limitations. Why cripple it?
 14th February 2004, 12:27 #16  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 So... by limiting the range to 2-5, I am actually "choking" the rate control?? I have to check if I get an oversized file if I employ it
14th February 2004, 12:54   #17  |  Link
mf
·

Join Date: Jan 2002
Posts: 1,729
Quote:
 Originally posted by atreya2011 So... by limiting the range to 2-5, I am actually "choking" the rate control?? I have to check if I get an oversized file if I employ it
Yeah. There is only one reason why you would want to restrict quants, and that's when RC goes crazy, but that hasn't happened since dev-api-3, so you're better off leaving it unrestricted.

 14th February 2004, 13:00 #18  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 But there is no harm in experimenting right?
 14th February 2004, 13:06 #19  |  Link atreya2011 Apprentice Ripper   Join Date: Feb 2004 Posts: 90 One more thing I forgot to ask. How does the limiting factor actually choke the rate control function?
 14th February 2004, 13:21 #20  |  Link Koepi Moderator     Join Date: Oct 2001 Location: Germany Posts: 4,455 atreya: such things aren't meant to be asked (well, it sounds worse as I mean it now) - try for yourself and you'll very fast understand what happens (especially when you use the status window and look a bit into the internals and look at the quant distribution - and then at virtualdub's estimation in it's status window). XviD is an educational project. So do what this implies - educate yourself with it! Regards Koepi __________________ Koepi's new media development site