Skip to content

improve gainmap computation logic for dark pixels #333

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

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

ram-mohan
Copy link
Contributor

while computing gain for near blacks or pixels with channel values zero, sdr_offset is used. This value is extremely small and can result large gainmap coefficient. During encode-decode process, if this sdr pixel flips to zero, after applying gainmap the hdr pixel will blow out. It is best if the gainmap computation logic is desensitized for dark pixels.

also, conversion from wider to narrower gamut space can cause overrange values. clip only negative excursions so that domain of computeGain remains positive.

Test: ./ultrahdr_app

@ram-mohan ram-mohan force-pushed the gainmapdarkpels branch 3 times, most recently from 546d9c4 to 407d747 Compare November 28, 2024 20:40
while computing gain for near blacks or pixels with channel values zero,
sdr_offset is used. This value is extremely small and can result large
gainmap coefficient. During encode-decode process, if this sdr pixel
flips to zero, after applying gainmap the hdr pixel will blow out. It is
best if the gainmap computation logic is desensitized for dark pixels.

also, conversion from wider to narrower gamut space can cause overrange
values. clip only negative excursions so that domain of computeGain
remains positive.

Test: ./ultrahdr_app
Change-Id: Id98d95d020a01db6e85e08115a4405eac07d42c1
@DichenZhang1 DichenZhang1 merged commit 720dbed into google:main Dec 2, 2024
20 checks passed
@ram-mohan ram-mohan deleted the gainmapdarkpels branch December 2, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants