Skip to content

Treat RGB888 as RGB during gain-map reconstruction - #516

Open
gregbenz wants to merge 2 commits into
google:mainfrom
gregbenz:codex/rgb888-classification-20261108
Open

gregbenz wants to merge 2 commits into
google:mainfrom
gregbenz:codex/rgb888-classification-20261108

Conversation

@gregbenz

@gregbenz gregbenz commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

applyGainMap accepts RGB888 base images, but isPixelFormatRgb omits the format. RGB samples therefore go through a YUV-to-RGB conversion, causing a strong color cast even at unity display boost.

Normal API decoding does not currently reach this case: HDR reconstruction uses YCbCr or RGBA base images. Direct callers, including component tests and custom integrations, can get incorrect output even though the call succeeds. This change makes that accepted input work correctly and adds a one-pixel regression that checks neutral gray against its expected linear half-float value.

Validation: the regression fails before the fix and passes afterward. Local Release testing passes 1,104 tests with 224 existing skips; focused AddressSanitizer and UndefinedBehaviorSanitizer checks also pass.

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