Log in

View Full Version : 4K Blu-ray: Conversion from PQ to HLG


wswartzendruber
29th July 2020, 04:07
I have a Rust project that converts raw PQ frames into HLG. It follows the BBC R&D method for doing so and is quite primitive. I am contemplating extending it with the following approach:

1. Determine the reference white level of the movie by sampling how bright the credits are.
* RGB48 (PQ, Rec.2020) comes in from FFMPEG. *
2. Globally adjust the brightness of each frame as a whole such that the credits (if white) sit at 203 nits (linear scaling of each color channel).
3. Apply Kim-Kautz tone mapping to push everything down to within 1,000 nits.
4. Apply the inverse HLG EOTF function.
* RGB48 (HLG, Rec.2020) goes back out to FFMPEG. *

Given that I want a Good™ HLG encode of something, does this seem like a good way to go about it?

kolak
6th May 2021, 20:05
Question is - why are you doing it? If you have optimal PQ master and about all TVs support HDR10 then what is the point going to HLG?
I see the point going to SDR, but going PQ<->HLG is somehow pointless.

Balling
27th August 2021, 08:58
I recommend using constant luminance HLG. https://github.com/sekrit-twc/zimg/pull/78