-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVIF HDR and premultiplied alpha #197
Comments
The Netflix HDR sample images are loading correctly. Currently the HDR support is limited to SMPTE ST 2084 (BT.2100 PQ). It is unclear how the HDR support should work with premultiplied alpha images. I filed an issue in the av1-avif repository for clarification on that: AOMediaCodec/av1-avif#197
Tricky question. Let me ask around a bit among the HDR experts. I'm not sure if the spec explicitly states that premultiplication should be done in linear RGB space. Not doing it linear space works ok for SDR content, but I can imagine that the artifacts would be pretty bad if done in gamma space for a PQ image. |
I recently tested this. The premultiplication will result in the image data being clipped to the [0, 1] range, and the resulting image has a larger file size than the straight alpha image (at least with the Photoshop rendered image I was testing with). The following zip file contains both the straight and premultiplied alpha AVIF images. |
This comment was marked as off-topic.
This comment was marked as off-topic.
We'll be having some more discussions about this internally in a while, but the gist of it so far is this:
Some relevant papers: |
What is the recommended method for handling HDR images with premultiplied alpha?
I have been working on adding HDR support to my AVIF plug-in for Photoshop, and premultiplied alpha is one of the features that the plug-in supports.
I am assuming that the image data would be premultiplied before the BT. 2020 PQ curve is applied to the RGB values.
Is there any code (e.g. in Chromium) that shows how this is handled?
The Krita code has been helpful as a general guide on what is required for HDR decode/encode support, but it does not appear to include premultiplied alpha handling.
Sample images would also be useful for testing, but I can always generate my own after I start working on implementing the encoder side.
The only HDR test images I could find in this repository are the Netflix samples, and none of those have an alpha channel.
The text was updated successfully, but these errors were encountered: