Replies: 4 comments 3 replies
|
Hmm... When I try: I just get error: |
|
I did some more investigation to try and figure out why the colors are changing. First, for reference this is best way that I have been able to come up to convert JPG gain map HDR image to AVIF/HEIC: Then I extracted the AVIF gain map with libavif The original gain map + CFG file were generated by python script that inverts the gain map math, so that the output of grayscale base + RGB gain map + CFG settings equal mathematically exact match to the source color image. That being said, they are close enough to be satisfying already. In both gain maps the HDR letters are each only visible in one color channel each (no luma or chroma bleed has happened between the channels), and the rendered HDR image is so close to the source that only side by side comparison makes the difference clear. |
|
Thank you @MiikaH for trying it out and sharing the reproduction steps! A few observations: Input Headroom is too small: Probing the input JPEG (ultrahdr_app -m 1 -P) shows --hdrCapacityMax 1.5 (~305 nits). This is too low for HDR, and the decoder clamps to 1.5 during linear reconstruction. Besides, the washed-out gain map isn't specific to AVIF/HEIC—re-encoding back to JPEG produces the same result. I would recommend try using an HDR image with a higher hdrCapacityMax value. Let me know what you think. Thank you! |
|
Huh, interesting. I tried to create a more "extreme" RGB Gain Map image to make the difference clearer: Here is the original JPG. It shows different text and different emoji in the middle for both SDR and HDR rendition. There is slight fringing around sharp color changes: Then I put it through the transforms required to make it .avif with a linear float16 HDR + SDR pair: It worked way better than I expected... Especially when using lower JPG version mostly avoided the ghost image because it uses the .jpg gain map that I feed it directly, which was compressed with 4:4:4 subsampling. Regardless, it looks like the issue is about lack of exact control with the current AVIF/HEIC workflow. But if results don't have to be pixel precise, then even the current workflow is fine. EDIT: With upscaled image and adjusted background even the current AVIF workflow can mostly eliminate the artifacts. Although iOS seems to do some kind of interpolation on the gain map that makes this kind of "extreme" test images problematic |




Uh oh!
There was an error while loading. Please reload this page.
I was just trying out the new
v2.0.1to generate .avif and .heic multi-channel gain map ISO 21496-1 test images. Currently it seems like theultrahdr_appCLI only supports avif/heic when using RAW intent HDR+base image pair, which after some fighting I was able to get working.Eventually I was able to replicate my existing RGB gain map test image (shows in black and white in SDR and as full color image in HDR) on my browser HDR test set: https://miikah.fi/utils/browser_hdr_support
However I wasn't able to replicate exactly same image. AVIF version seems more saturated, HEIC looks less saturated (at least on Mac). I think the conversion method
libheifuses, or my conversions from the jpg to the raw variants aren't quite able to generate identical gain map.Not that big deal overall. The test pattern still works and the resulting images look good. But of course this made me wonder if there are plans to allow creating avif/heic images from plain base image + gain map itself, like for .jpg? So that exactly same workflow can be applied for all formats.
All reactions