intel / libvpl

Intel® Video Processing Library (Intel® VPL) API, dispatcher, and examples
https://intel.github.io/libvpl/
MIT License
277 stars 84 forks source link

Specialized HDR Encoding Options #33

Closed perrinpagess closed 2 years ago

perrinpagess commented 2 years ago

System information

Feature Information

Describe the feature and expected behavior

Because HDR PQ EOTF has different bit allocation than SDR gamma EOTF, x265 has options "--aq-mode 2" (raises or lowers per-block quantization based on complexity analysis of the source image with auto variance) and "--hdr-opt" (adds luma and chroma offsets for HDR/WCG content) that attempt to improve quality when encoding PQ HDR content.

Customer usage and impact for this feature

Quantization for HDR and SDR video in the current implementation is the same which causes blocking/banding/bitrates that are too low for chosen QP when encoding PQ HDR video. This bias toward SDR video is especially apparent when tone-mapping HDR video to SDR with the vpp hdr2sdr filter before encoding; the bitrate while encoding tone-mapped SDR video (with same QP setting) is double or triple that of the unaltered PQ HDR video and the end result is much better quality when visually compared.

Additional context Add any other context or screenshots about the feature request here.

https://x265.readthedocs.io/en/2.5/cli.html

https://en.wikipedia.org/wiki/Perceptual_quantizer