intel/libvpl

Specialized HDR Encoding Options

perrinpagess opened this issue · 0 comments

System information

  • GPU platform enabling for new feature: IceLake and newer
  • Host machine if it's discrete card: n/a
  • libva/libva-utils/gmmlib/media-driver/Media SDK version you are using? Media SDK API 1.35 (oneVPL once OEM updates driver)
  • Are you willing to contribute it?(Yes/No) Yes, but my programming knowledge is limited

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