Skip to content
  • Fiona Glaser's avatar
    Move adaptive quantization to before ratecontrol, eliminate qcomp bias · 80458ffc
    Fiona Glaser authored
    This change improves VBV accuracy and improves bit distribution in CRF and 2pass.
    Instead of being applied after ratecontrol, AQ becomes part of the complexity measure that ratecontrol uses.
    This allows for modularity for changes to AQ; a new AQ algorithm can be introduced simply by introducing a new aq_mode and a corresponding if in adaptive_quant_frame.
    This also allows quantizer field smoothing, since quantizers are calculated beofrehand rather during encoding.
    Since there is no more reason for it, aq_mode 1 is removed.  The new mode 1 is in a sense a merger of the old modes 1 and 2.
    WARNING: This change redefines CRF when using AQ, so output bitrate for a given CRF may be significantly different from before this change!
    80458ffc