Skip to content

Automatic HDR (and Dolby Vision: LLDV) / SDR signal detection and tone mapping control for HyperHDR #749

Closed

Description

@awawa-dev

Based on the empirical values in the stream returned by the grabbers, we can observe that the captured HDR signal has a quite reduced maximum brightness. For the RGB range [0-255] it is most often below 150-160 for HDR. Using this fact, we can implement automatic detection of the HDR / SDR signal by:

  • allowing the user to configure the limit/threshold value above which we consider the signal to be SDR
  • allowing the user to configure the switching time from SDR to HDR if the value does not exceed this threshold during this period (reason: dark scenes may generate a false signal, therefore the time interval is necessary)
  • switching from HDR to SDR will occur immediately because we can immediately detect the value above the critical threshold.

The above mechanism will control turning on/off HyperHDR tone mapping.
To consider whether we scan each pixel or use a simple scanline (and its shape), which should be faster, although it has side effects.

This will be implemented first for USB grabbers and YUV/NV12/P010 and probably MJPEG (not in first version because of how MJPEG handler processes images) modes for Linux and Windows systems.
This could probably be extended with an external flatbuffer/protobuffer source, although at this stage it won't be my priority due to limited resources.

Due to differences in video stream handling and my limited resources, I do not currently foresee this functionality for macOS, at least for now. macOS will also support it, let's have some fun with Mac Mini m4.

Activity

  1. changed the title [-]Automatic HDR (LLDV) / SDR signal detection and tone mapping control for HyperHDR[/-] [+]Automatic HDR (and Dolby Vision: LLDV) / SDR signal detection and tone mapping control for HyperHDR[/+] on Jan 26, 2024
  2. self-assigned this
    on Jan 26, 2024
  3. linked a pull request that will close this issueAutomatic tone mapping #996on Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions