> This is usually visible as ugly banding or blocking in dark scenes. I was just complaining about this a couple weeks ago with some friends after the “Dark” episode of GoT. I was saying the codecs don’t seem to have caught up or they are just being fed at too low a bit rate to really excel at dark scenes. It’s hard to imagine this is just a scaling issue with the color ranges, and if so, how could it possibly not ha…
B) The issues you're seeing with background banding are _not_, primarily colorspace issues. While having a larger colorspace helps, these are largely related to the way quantization is done for the macro blocks in h.264.
The original h.264 spec (which is baseline and main profiles) only had a exponential quantization matrix.
During quantization we are "rounding" to the nearest integer for pixels. If we imagine each macroblock only had _one_ frequency coefficient. Dark scenes would have a low coefficient, say 1.4 If we round to 1 that's a 28.5% error in the rounding. A brighter scene which is at 9.4 has a rounding error of only 4.3%.
Custom quantization matrices and non linear quantization matrices(which are available in newer codecs) help deal with this.
Advanced h264 encoders have variance adaptive quantization technologies to help choose what level of quantization to apply to a block.
In short: h264 has technological limitations that are not caused by colorspace and the encoder doing this encode doesn't have strong AQ.