Scales from aom's [0:63] to avm's [M:255], where M=0/-48/-96 for 8/10/12 bit. See --min-qp help in https://gitlab.com/AOMediaCodec/avm/-/blob/main/apps/avmenc.c
| 404 | // See --min-qp help in |
| 405 | // https://gitlab.com/AOMediaCodec/avm/-/blob/main/apps/avmenc.c |
| 406 | static int avmScaleQuantizer(int quantizer, uint32_t depth) |
| 407 | { |
| 408 | if (depth == 10) { |
| 409 | return AVIF_CLAMP((quantizer * (255 + 48) + 31) / 63 - 48, -48, 255); |
| 410 | } |
| 411 | if (depth == 12) { |
| 412 | return AVIF_CLAMP((quantizer * (255 + 96) + 31) / 63 - 96, -96, 255); |
| 413 | } |
| 414 | assert(depth == 8); |
| 415 | return AVIF_CLAMP((quantizer * 255 + 31) / 63, 0, 255); |
| 416 | } |
| 417 | |
| 418 | // Converts quality to avm's quantizer in the range of [M:255], where M=0/-48/-96 for 8/10/12 bit. |
| 419 | // See --min-qp help in |
no outgoing calls
no test coverage detected