ledoge / jxr_to_avif

HDR JPEG-XR -> AVIF converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This is a simple command line tool for converting HDR JPEG-XR files, such as Windows HDR screenshots, to AVIF.

The output format is hardcoded to be 12 bit 4:4:4 for maximum quality. Unfortunately, these files cannot be decoded natively by Windows's AV1 extension, as it only seems to do 8 bit up to 4:4:4 or 10/12 bit up to 4:2:0. However, the files open fine in Chromium.

Usage

jxr_to_avif [--speed n] input.jxr [output.avif]

HDR metadata

The MaxCLL value is calculated almost identically to HDR + WCG Image Viewer by taking the light level of the 99.99 percentile brightest pixel. This is an underestimate of the "real" MaxCLL value calculated according to H.274, so it technically causes some clipping when tone mapping. However, following the spec can lead to a much higher MaxCLL value, which causes e.g. Chromium's tone mapping to significantly dim the entire image, so this trade-off seems to be worth it.

About

HDR JPEG-XR -> AVIF converter

License:GNU General Public License v3.0


Languages

Language:C 99.4%Language:CMake 0.6%