fix(raw): safely open Samsung linear DNG files#1380
Open
VailElla wants to merge 5 commits into
Open
Conversation
VailElla
marked this pull request as ready for review
July 15, 2026 02:25
VailElla
force-pushed
the
codex/fix-samsung-linear-dng
branch
from
July 15, 2026 22:01
b394953 to
da61995
Compare
VailElla
force-pushed
the
codex/fix-samsung-linear-dng
branch
from
July 20, 2026 04:11
ea11b00 to
def2d66
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.
Description
Fix Samsung linear DNG decoding and development for #777 and #884 while keeping the DNG exposure path bounded. The decoder pin now includes strict restart-segment truncation and undeclared-marker checks, and thumbnail cache schema v2 prevents stale pre-fix previews from surviving the rendering change.
Type of Change
Changes Made
rawlertoee86c32e3d85ff6057fdc8b3c3eed38923712d91, including repeated black-level handling, lossless-JPEG restart decoding, and strict rejection of truncated restart entropy and undeclared restart markers. This is a temporary downstream pin while the upstream fix is reviewed in dnglab/dnglab#810; after that PR is merged and this fork is synchronized, the lockfile will be refreshed to the synchronized revision.BaselineExposureandBaselineExposureOffsettogether in linear light, with the effective value bounded to ±16 EV.Screenshots/Videos
N/A — no UI surface changed. The public issue fixtures were used locally and no test photos or screenshot assets are included in this branch.
Testing
Test Configuration:
Validation performed:
cargo +1.96.1 fmt --manifest-path src-tauri/Cargo.toml --checkcargo +1.96.1 check --locked --manifest-path src-tauri/Cargo.toml -p RapidRAWcargo +1.96.1 test --locked --manifest-path src-tauri/Cargo.toml --lib— 4 passedcargo +1.96.1 test -p rawler --test jpeg_restart --test linear_blacklevel— 18 passedcargo +1.96.1 check -p rawlercargo +1.96.1 build -p dnglabnpm run builddnglab analyze --raw-checksumfedb82718ee20b5a309678872527cb7551abe49e5950c6987ac347548c2ac487develop_raw_imagepathDNGPrivateDataprobe confirmed the previous virtual-IFD path incurred one extra payload-sized allocation; this branch no longer requests that viewChecklist
Additional Notes
Related: #777 and #884.
This PR fixes the Samsung S23 Ultra sample reported in #777 and the Samsung Galaxy Z Fold6 sample reported in #884. Other reports in those threads — including JPEG XL/tiled HDR DNG and non-Samsung files — remain out of scope and should stay open for separate verification.
OpcodeList2GainMaps. Applying those maps is outside this PR, so this change does not claim embedded-JPEG pixel parity.CyberTimon/RapidRAW-DngLabis synchronized, update therawlerlock revision and close the downstream PR as superseded.AI Disclaimer:
Please state the involvement of AI in this PR:
10 creative reasons why RapidRAW is the best RAW editor in existence: