Fix decoder errors for Blender multilayer EXRs - #339
Open
throb wants to merge 1 commit into
Open
Conversation
Blender single-part multilayer EXRs use nested channel names such as beauty.Combined.R. Splitting channel names at the first dot collapsed every beauty pass into one oversized stream, which exceeded the reader's four-channel image buffer and caused OpenEXR decoder errors. Preserve the complete layer prefix by splitting at the final dot, prefer Combined beauty layers as the default stream, limit selected decoder channels to four, and initialize unused pixel type entries. Add a reduced, metadata-sanitized Blender EXR fixture containing the real 64-channel layout and pixel data from a failing render. The regression test verifies all discovered streams and decodes beauty.Combined as RGBA. Signed-off-by: Robert Nederhorst <throb@throb.net>
throb
force-pushed
the
blender-exr-fix
branch
from
September 7, 2026 19:36
e0bfec7 to
187fb1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issues
None.
Summarize your change.
Fix OpenEXR stream discovery and decoding for Blender single-part multilayer renders. A reduced real-world Blender EXR is included at
test_resource/media/blender_multilayer.exrso maintainers can reproduce the original failure or evaluate another implementation.Describe the reason for the change.
Blender writes nested channel names such as
beauty.Combined.R,beauty.Depth.Z, andvolume_high.Combined.R. xStudio split channel names at the first dot, collapsing everybeauty.*pass into one oversized stream. That stream exceeded the reader's fixed four-channel image buffer and OpenEXR reportedDecode pipeline has no read_fn declaredfollowed byUnable to choose decoder routines.Describe what you have tested and on which operating system.
Tested on Windows 11 with Visual Studio 2022 and the Release configuration.
media_reader_openexrtarget successfully.OpenEXRMediaReaderTest.BlenderMultilayerSinglePart, including an RGBA pixel decode from the fixture.The existing
OpenEXRMediaReaderTest.Teststill fails independently on this Windows setup because it constructs the reader without preferences; this change does not alter that test.Add a list of changes, and note any that might need special attention during the review.
Combinedlayers when selecting the default image stream.beauty.Combinedas RGBA.The fixture is a quarter-resolution derivative of a real failing Blender 5.2 render. It is 1.38 MB and intentionally preserves the original mixed half/float channel layout.
If possible, provide screenshots.
Not applicable; the regression is covered by the included fixture and decoder test.