Personal View site logo
Pro: AVCHD Quantization process
  • 131 Replies sorted by
  • @LPowell

    Could you say same thing is simpler terms.
    I understand how this table is calculated.
    After this I still do not have clear picture.
    Start of table is 10, 11, 13, 14, 16 (they define whole table anyway) I see this in H265 description and they are used for V matrix construction.
    I also have bunch of other 52 sized tables user for various modes (they consist from very similar numbers, sometimes it is the same constant).
    My understanding is that they are used as scalers.
  • The first two articles by Iain Richardson pin down the mathematical details of how the AVCHD Quantization Parameter is calculated. As you noted, quantization scale factors are defined in a fixed range of 52 equally-spaced multiplicative steps. While the quantization scale factor for any step can be calculated directly, it's likely more efficient to simply store them in a look-up table.

    The 52 quantization scale factors are a fixed part of the AVCHD standard and are used in both encoding and decoding. For that reason, patching the encoder's copy of this table with different values would produce non-standard video files that could not be correctly decoded.

    However, the AVCHD Quantization Parameter that is used to index the table is selected individually by the encoder for each macroblock, and is recorded in the bitstream for use by the decoder. This parameter could potentially be manipulated to systematically reduce the overall quantization granularity, which would produce higher image quality and require higher bitrates.
  • Thanks. I am trying to understand how it all works.
    That I understand now is that quanizer must play vital role in bitrate values as H264 uses QStep in quantization and later in inverse quantizaton (and overall it looks like transform->quanization->inverse quantization->inverse transform). But I must read more to get all this.
  • I have followed this Italian Encoding Engineers blog for some years, he writes codecs for H.264 applications. There is some very useful info on his site. http://sonnati.wordpress.com/best-of-blog

    Rambo
  • @woody123

    No, GH2 table consist from integer values (and this table differs from similar table in GH1).
    It is easy to understand that this is QStep table as first 6 values define whole table (see my first post in this topic).
  • http://publications.lib.chalmers.se/records/fulltext/95351.pdf
    pages 14-15(15-16)

    pertinent info from the pdf:
    "H.264 supports a total of 52 values of quantiser step size (Qstep), which are indexed by the
    QP. The value of step size doubles for every increment of 6 in QP. For instance, as seen in
    the Table1.1, when quantiser step increases from 1 to 2, the index QP changes from 4 to 10,
    and ∆QP (DQ) equals to 6.

    The QP used for each picture is called “base QP” or “picture QP. If the QP changes for
    macroblocks in a picture, the base QP is the average QP for the picture. Using “fixed QP”
    means that all macroblocks in a sequence are encoded with a fixed constant QP. In contrast,
    a  rate control” method may be used to control the bit rate by adjusting the base QP between
    pictures. When the bit rate is exceeding the target bit rate, the base QP is increased by the
    rate control. In this case, several base QPs are used when encoding one sequence.

    Encoding with a higher QP results in less bit
    cost but poorer quality and vice versa."