QG-Size differs from docs default value

Issue #560 new
Former user created an issue

Using preset "Slow" sets --ctu (maxCUSize) to 64. Regarding the docs --qg-size should be set to 64, too. But without specifying --qg-size, it is set to 32 by the encoder.

Is this a bug in x265 or its docs?

x265 [info]: Coding QT: max CU size, min CU size : 64 / 8 x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra x265 [info]: ME / range / subpel / merge : star / 57 / 3 / 1 x265 [info]: Keyframe min / max / scenecut / bias : 23 / 250 / 40 / 5.00 x265 [info]: Lookahead / bframes / badapt : 25 / 4 / 2 x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0 x265 [info]: References / ref-limit cu / depth : 4 / on / on x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1 x265 [info]: Rate Control / qCompress : CRF-20.0 / 0.60

--qg-size <64|32|16|8> Enable adaptive quantization for sub-CTUs. This parameter specifies the minimum CU size at which QP can be adjusted, ie. Quantization Group size. Allowed range of values are 64, 32, 16, 8 provided this falls within the inclusive range [maxCUSize, minCUSize]. Default: same as maxCUSize Source: https://x265.readthedocs.io/en/default/cli.html#cmdoption-qg-size

Comments (2)

  1. Thomas Trzepacz

    the docs refer to the default settings, and the default preset is medium, not slow… however 32 does look better then 64 with a ctu of 64. i haven't tested a lower ctu… 8 and 16 are ok, but 32 is best and smallest… (and i don’t always agree with the presettings) ps i also tested with custom settings across the board…

  2. Dendraspis

    the docs refer to the default settings, and the default preset is medium, not slow

    No, the docs give us a global behaviour: Default: same as maxCUSize. [Source: https://x265.readthedocs.io/en/default/cli.html#cmdoption-qg-size]
    And maxCUSize/ctu is 64 - for Slow and Medium.

    It might be true that 32 is the best value, but nevertheless there is a discrepancy between the code and the docs and one of them should be updated/fixed.

    Current state:

    preset 0 1 2 3 4 5 6 7 8 9
    ctu 32 32 64 64 64 64 64 64 64 64
    qg-size [CODE] 32 32 32 32 (default) 32 (default) 32 (default) 32 (default) 32 (default) 32 (default) 32 (default)
    qg-size [DOCS] 32 32 64 64 64 64 64 64 64 64

  3. Log in to comment