PDA

View Full Version : Quantizer Value for Intra....


octapus
8th May 2002, 15:29
I want to share something strange i noticed some days ago.
I was comprssing "Fast and Furious", for those who don't know a movie with a lot of fast moving race cars. It's about 1 hour and 45 minutes long. Well i set a resolution of 640x256 of b.p.p.~0.244 and had a first_pass_size/final_size~66%. Finally i used Nic's 2/5/2002 xvid codec, Alt cc(High 235;Low 85;High Aggression;Strength 50) and Bonus on Keyframes 20%.

Well the results weren't bad. They were quite good i can say but not optimal. I analyzed debug output for second pass. Average quantizer was at about 3.2 but the strangest thing is that all keyframes were compressed with quantizer 2. Not even one was quantized > 2. And restrictions i had put were for I frames 2<=quant<=4 and for P frames 2<=quant<=6. Is there anything strange or is it just me? Can this be explained in any way? Maybe that the movie had enough bits to redistribute? On the other hand on very fast moving scenes ( you know car races ) watching dbgview i could see that when overflow started getting a certain amount ( usually below -150.000 ) codec started quantizing heavily all p frames at the maximum restriction (6) continuously until overflow came to reasonable amounts and at the same time all i frames (between p frames quantized at 6) got quantized all with value 2. Imagine 100 frames quantized all continusly at value 6 except for all intermediate Keyframes(all at quant 2) and some at quant 4 cause of the restriction Koepi thought some months ago.

And something else. Above i mentioned some scenes where oveflow went below -150.000. You can guess how did this happen: Consecutive keyframes all quantized at 2. I had put a restriction of keyframe at least every 3 (three) frames. I 'm not saying that those keyframes shoudn't be there because there was a constant change of pictures in the movie. But they could be more heavily quantized.

From dbgview it's almost like this
....2nd-pass.....1stpass:x scaled:y actual:z .......
where x,y,z integer values.
Well for almost all of the keyframes z>x. Shouldn't z<=x. I'm just asking some of xvid experts to tell me if i'm wrong and if yes why?

canadian_fbi
8th May 2002, 17:47
i've noticed this too - i did moulin rouge on one (90 min) cd as sort of a challenge and ended up with an average quant of 3.27; it turned out pretty nice for all the motion in there. however, all i-frames were encoded at quant 2 (and there are a lot of i-frames in that movie). i always thought that the i-frame boost gave the i-frames just enough scaled bits that the algorithm decided that going over with quant 2 was better than going under with quant 3. i wonder though if there's something else going on as well, like it's biased towards low quants on i-frames. but then i did in the line of fire around the same time with an average quant of 3.26, and ended up with all i-frames being at quant 3. i know average quantizer value isn't a flawless benchmark of quality, but you would think there'd be some deviation at least. i dunno.