Log in

View Full Version : b-frames a cheap shot at raising quantizers?


Niem
6th February 2003, 14:10
I'm a bit confused about the decisions made about raising quantizers when using b-frames. Both XviD and DivX (and probably other MPEG-4 codecs) do this when using b-frames.

The codecs carefully compress the entire movie making I & P frames the lowest quantizer they can be, but with an XviD b-frames setting of 3/150/100 you are making the b-frame quantizer much higher than the P & i frame quantizers.

So here is the question. Why is MPEG-4 designed (or implemented in practice) that it should flag certain flags not only to become a b-frame but also a frame which can receive a higher quantizer? Is there something unique in the decision of a frame being a b-frame that it could also 'get away' with more compression (higher quantizer)?

Many speak of the method of creating a linear curve scale for compression, it seams to me that the ultimate way of doing this while using b-frames would be to use a setting of {1-3}/100/0.

Comments?

- Niem

sysKin
6th February 2003, 16:40
Originally posted by Niem
So here is the question. Why is MPEG-4 designed (or implemented in practice) that it should flag certain flags not only to become a b-frame but also a frame which can receive a higher quantizer? Is there something unique in the decision of a frame being a b-frame that it could also 'get away' with more compression (higher quantizer)?As long as a single frame is coded at high quantizer, noone will see quality degradation. This is because motion estimation is quite good, and even if some pixels are not exactly as in the original, the picture still doesn't have visible artifacts.
The problems start when there is a series of high-quant frames, referencing one another by means of motion compensation. Picture soon becomes blocky, blurry, noisy - ugly.

Now, remember that P-frames reference one another, while B-frames don't. You see what happens? P-frames have low quant and therefore good quality. B-frames are compensated from high-quality P-frames and look great, even with high quant.

I hope this answers your question,
Radek

bilu
6th February 2003, 18:52
@sysKin

From your explanation, it seems to be recommended to use just one B-frame, right?


Bilu

Koepi
6th February 2003, 18:56
Even if you use 5 bframes they're compensated from the surrounding p-frames, thus the amount doesn't change too much. (High motion scenes may suffer, so not using too many consecutive bframes - like xvid does with it's dynamic decision - is the best way to go).

Regards
Koepi

tangent
7th February 2003, 03:43
dynamic bframe works already?

Teegedeck
7th February 2003, 07:28
They've been dynamic since the day of their introduction.

Tommy Carrot
8th February 2003, 01:47
The reference software of h.264 didn't raise the quantizer of the b-frames, the psnr is about the same too, still, b-frames are much shorter. I don't know the technical details, but maybe mpeg4 could do that with further tuning.