google / libultrahdr

Ultra HDR is a true HDR image format, and is backcompatible. libultrahdr is the reference codec for the Ultra HDR format. The codecs that support the format can render the HDR intent of the image on HDR displays; other codecs can still decode and display the SDR intent of the image.
https://developer.android.com/guide/topics/media/platform/hdr-image-format
Apache License 2.0
150 stars 25 forks source link

luminosity of high frequency color detail is incorrect #202

Closed gregbenz closed 2 months ago

gregbenz commented 2 months ago

example: If you encode an image with an alternating grid of bright (+3 stop) red and green single pixels will result in a much darker grid in the final output (in the HDR rendering). If you use the same bright colors in large blocks instead of single pixels, the result will be accurate (at least when you are not at the edges). This is true even for 4:4:4 input / output, as if the luminosity for the gain map is calculated with sub-sampled data.