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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th November 2011, 03:21   #1  |  Link
infoeater
Registered User
 
Join Date: May 2007
Posts: 53
How is qcomp exactly affecting bitrate and quantizer?

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.ph...05#post1280305

Last edited by infoeater; 29th November 2011 at 03:28.
infoeater is offline   Reply With Quote
Old 29th November 2011, 13:10   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,221
qcomp = Quantizer Curve Compression
Quote:
Originally Posted by Dark Shikari
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:
  1. 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.
  2. 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.
  3. 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
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 29th November 2011 at 13:53.
LoRd_MuldeR is offline   Reply With Quote
Old 29th November 2011, 18:27   #3  |  Link
infoeater
Registered User
 
Join Date: May 2007
Posts: 53
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?
infoeater is offline   Reply With Quote
Old 29th November 2011, 19:11   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,221
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)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 29th November 2011 at 19:33.
LoRd_MuldeR is offline   Reply With Quote
Old 29th November 2011, 19:30   #5  |  Link
infoeater
Registered User
 
Join Date: May 2007
Posts: 53
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?
infoeater is offline   Reply With Quote
Reply

Tags
adaptive quantization, bitrate, qcomp, quantizer, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.