Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
awawa-dev opened this issue Jan 26, 2024 · 0 comments
Assignees

Comments

@awawa-dev
Copy link
Owner

awawa-dev commented Jan 26, 2024

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 and probably MJPEG 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.

@awawa-dev awawa-dev 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 Jan 26, 2024
@awawa-dev awawa-dev self-assigned this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant