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. |
29th December 2022, 00:39 | #1 | Link |
Registered User
Join Date: Jan 2013
Location: Santa Clara CA
Posts: 114
|
Typical QP values with SDR v. HDR content
For typical content coded with constant quality, we tend to use QP values in the low 20's for "good quality, okayish compression", and mid-high 30's for "okayish quality, strong compression".
Based on my reading of the spec, the actual QP value used during quantization is adjusted per equation 8-286: Qp' = Qp + QpBdOffset, where QpBdOffset = 6 * (bitdepth - 8). In other words for HDR10 content, a QP of 20 really behaves like a QP of 32 (20 + 6*(10-2)) in terms of the information it's throwing away. Presumably this correlates with subjective quality too. To account for this, the lowest allowed QP value is -QpBdOffset, which means for 10-bit content you can have negative QP values, i.e. the legal range becomes -12..51 for HDR10. So then for HDR10 the "good quality okayish compression" the QP values should be in the low 10's. This all mostly makes sense, except I have never seen this show up anywhere. For example, recommended constant quality settings for tools like x256. Also its kind of annoying for system design, you have to re-calibrate yourself on what kind of quality you think you are getting when picking QP values for HDR content. Does this jive with anyone else's experience? |
29th December 2022, 07:34 | #2 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Usually, implementations shift the quantizers when the calculation precision changes.
Instead of allowing -12..51, one would allow 0..63 and then you are back in the: Quote:
Selur |
|
3rd January 2023, 11:36 | #3 | Link |
Registered User
Join Date: Mar 2021
Location: North Carolina
Posts: 138
|
Interesting post. I use programs like Vidcoder and they have CRF values below zero. I've tested some encodes below zero, while using uhd-bd=1 and it wouldn't allow it and would always set the CRF to 0. I appreciate that CRF isn't the same as QP control, but it's interesting that it also offers 12 steps below 0 also when using 10-bit x265.
|
3rd January 2023, 19:04 | #4 | Link |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
You are mixing two different things : QpBdOffset which is there only to account for bitdepth increase (independently of SDR / HDR), and SDR / HDR differences in signal characteristics.
For the first thing, you can see things like that : with a given 8 bits SDR video, converting it to 10 bits amounts to multiplying all pixels value by 4. So to keep the same level of information, you need to also multiply the quantization step by 4. And relationship between quantization step and quantizer is 2^((QP-4)/6), so you would need to increase QP by 12 if you went from 8 bits to 10 bits in order to keep the same visual quality. QpBdOffset is there to account for that, so that whatever the bitdepth, a given quantizer delivers the same visual quality (which makes thing simpler for everybody). The consequence is that in 10 bits, quantizers range from -12 to 51, instead of 0 to 51 for 8 bits. But QP = 20 delivers the same visual quality (and PSNR) in both 8 and 10 bits. And QP = -12 in 10 bits delivers a quality unreachable in 8 bits, even without compression (that's why quantizer range is restricted in 8 bits). For the second thing, HDR content requires a lower average quantizer to deliver the same visual quality as SDR content, when both are encoded in 10 bits. Reason for that is that a difference of 1 in HDR is more visible than a difference of 1 in SDR, so to keep the same level of visual distorsion, you need to have a smaller error in HDR, so a smaller quantizer. How much lower depends on lots of thing.
__________________
|
|
|