Skip to content

jpegr: initialize legacy gain map output - #445

Open
gregbenz wants to merge 1 commit into
google:mainfrom
gregbenz:codex/fix-legacy-gainmap-output
Open

jpegr: initialize legacy gain map output#445
gregbenz wants to merge 1 commit into
google:mainfrom
gregbenz:codex/fix-legacy-gainmap-output

Conversation

@gregbenz

Copy link
Copy Markdown
Contributor

What changed

  • Correctly configure the gain-map output in the legacy decodeJPEGR() wrapper.
  • Add a test that requests the primary image, gain map, and metadata together.

Why

When a caller asks for both the decoded image and its gain map, the wrapper puts the
gain-map settings on the wrong output and passes an uninitialized descriptor for the
gain map. This causes the decode to fail. The fix configures the correct output so both
images are returned successfully.

Testing

  • Added JpegRTest.DecodeLegacyApiWithGainMapOutputKeepsPrimaryDescriptor; it fails on
    current main and passes with this change.
  • Full non-HEIF unit suite: 1,291 tests run; 1,067 passed and 224 existing parameter
    combinations skipped.

@google-cla

google-cla Bot commented Aug 13, 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.

@gregbenz
gregbenz force-pushed the codex/fix-legacy-gainmap-output branch from 8b059af to 943b98b Compare August 15, 2026 01:34
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