View Full Version : How is qcomp exactly affecting bitrate and quantizer?
infoeater
29th November 2011, 03:21
How is qcomp exactly working? If size of an group of frames is 16x times bigger with constant quantizer than with constant bitrate, what would be it's size with qcomp=0.6 and why?
qcomp is not affecting AQ:
http://forum.doom9.org/showthread.php?p=1280305#post1280305
LoRd_MuldeR
29th November 2011, 13:10
qcomp = Quantizer Curve Compression
Quantizer curve compression, or “qcomp”, is a very old and simple idea. Lower the quality in areas of the video with high complexity and raise the quality in areas with low complexity. The original implementation dates at least back to the original libavcodec ratecontrol. There are three justifications for this:
High-complexity scenes generally have high motion, and one is less likely to notice quality loss in a high motion scene, since fine detail is impossible to see in motion anyways.
High-complexity scenes are extraordinarily costly bit-wise, so even if it makes quality somewhat worse, it might be worth it to save those bits to use elsewhere.
Each frame in a high-complexity scene is not referenced very far into the future since there is a great deal of change between each frame, so even from a PSNR perspective, one should allocate fewer bits to those frames as opposed to frames which are nearly static.
x264 uses qcomp pretty much unchanged except that it performs a gaussian blur over the frame complexities to avoid too much local fluctuation between quantizers.
Note, however, that with "MB-Tree" the basic idea of qcomp has been brought down to the Macroblock-level.
See here:
http://x264dev.multimedia.cx/archives/98
infoeater
29th November 2011, 18:27
Thank you for the link. Now I understand more, but I still don't know how qcomp parameter is affecting bitrate used for blocks/frames. Is it using geometric average like this (I have suspicion, that it is, but I am not sure)?:
(a^qcomp)*(b^(1-qcomp))
where:
a - bitrate which would be used at qcomp=1 or CQ.
b - bitrate which would be used at qcomp=0 or CBR.
or is it working somehow else?
LoRd_MuldeR
29th November 2011, 19:11
Now that x264 uses its MB-Tree algorithm, and that is enabled by default(!), quantizers are controlled on the macroblock-level.
This means that blocks which will be referenced a lot in the future get a lower quantizer, while blocks which will be referenced rarely get a higher quantizer.
And, as far as I understand, the qcomp parameter essentially controls the "strength" of the MB-Tree influence.
(Too much MB-Tree influence probably causes too much noticeable quality variation, while too less MB-Tree influence destroys the MB-Tree/qcomp improvement)
infoeater
29th November 2011, 19:30
ok, but still how is qcomp strength applied on MB-Tree (or generally on variability in bitrate if MB-Tree is turned off)? If an fragment of frame with constant amount of details and references is 32 times bigger on qcomp=1, then on qcomp=0, how big it will be at qcomp=0.6? Approximately 8 times bigger then on qcomp=0?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.