Skip to content

Decode requested gain maps for SDR output - #451

Open
gregbenz wants to merge 1 commit into
google:mainfrom
gregbenz:codex/decode-requested-sdr-gainmap
Open

Decode requested gain maps for SDR output#451
gregbenz wants to merge 1 commit into
google:mainfrom
gregbenz:codex/decode-requested-sdr-gainmap

Conversation

@gregbenz

Copy link
Copy Markdown
Contributor

What changed

  • Decode the gain map when the caller supplies a gain-map destination, including for SDR output.
  • Route gain-map metadata failures through the existing HEIF/AVIF cleanup path.
  • Add HEIF and AVIF regressions comparing gain maps returned by SDR and HDR decode paths.

Why

The public decoder supplies a gain-map output buffer and exposes it through uhdr_get_decoded_gainmap_image(). For SDR HEIF/AVIF output, decoding previously returned success without populating that requested buffer. Callers now receive the decoded gain map consistently, regardless of the requested primary-image transfer function.

Testing

  • HEIF and AVIF regressions fail before the fix and pass afterward.
  • Focused HEIF/AVIF tests: 2 passed.
  • Full unit suite: passed.
  • git diff --check

@google-cla

google-cla Bot commented Aug 15, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

1 participant