Repository navigation
Open
Description
Summary
I ran every Sony body on raw.pixls.us through main at 65ad290. That's 116 CC0 files covering all 100 bodies, with every coding for the bodies named in open issues. For each file I recorded decode facts, checking black and white levels, crop and as-shot white balance against exiftool and the data itself. I also rendered each at 1200 px and compared it with its embedded camera JPEG (CIE76 ΔE, ΔL*, Δa*, Δb*, chroma ratio), noting whether the camera-look fit was accepted. This is part of LR-IMP-CAMERA-COVERAGE.
Overall:
- 87 bodies decode, 12 open as the embedded preview only, and one decodes to noise.
- 81 of the 87 decoded bodies get an accepted camera-look fit (99 of 105 files). Accepted fits have a median ΔE of 5.1 against the camera JPEG, ΔL* +0.2 and a chroma ratio of 0.97.
- When a fit is rejected, the neutral fallback is dark and grey: median ΔE 18.5, ΔL* −11, chroma 0.39. On newer bodies it is also strongly blue (Δb* −23 on the ILCE-7RM5, −14 on the ILCE-7M4 and ILCE-7C). That explains many "wrong colours" reports where a fit failed.
Open Sony issues on current main
| Issue | Result on the public samples |
|---|---|
| #190 / #305 green (ILCE-6000, ILCE-7M2, ILCE-6500) | Doesn't reproduce: all 6 fits accepted, ΔE 2.1–5.8, |Δa*| ≤ 0.4. The reports predate v0.4.0's white-balance reading and camera-look fit. Green can still happen through the white-balance bugs below. |
| #244 ILCE-7M3 magenta, too bright | Doesn't reproduce on the reporter's own attached file (ΔE 3.4, Δa* +0.3, ΔL* +0.9). The attached a6400 file renders lifted and flat (ΔE 15.5, fit accepted at 0.098 against a 0.10 limit); #499 brings it to 12.4. |
| #378 ILCE-7C purple light; ILCE-7RM5 blue cast | Can't test purple light: no public sample has it. The blue cast doesn't reproduce while the fit is accepted (7RM5 ΔE 2.9–3.3). The fallback on these bodies is strongly blue, which would match the report if those photos' fits were rejected. |
| #454 ILCE-7 posterised | Mild on the public sample. Strong on the ILCE-1 sample (13 flat tone-curve knots). 33 of 99 accepted Sony fits have flat knots; #499 removes all of them. |
| #515 low resolution | Doesn't reproduce for the ILCE-7RM4A (full 9504×6336). Low resolution is real for the 12 preview-only bodies below and for lossless M/S raws, which are smaller by design. |
| #461 DSLR-A200 | No longer garbage: A200–A390 open as previews. Real decoding is still open. |
Decoder bugs found (crates/raw/src/vendor/arw.rs)
- As-shot white balance:
- 14 bodies have none, so they render green whenever the fit fails: A450, A500, A550, A560, A580, A700, NEX-3, NEX-5, NEX-C3, SLT-A33, SLT-A35, SLT-A55, ILCE-6001, UMC-R10C.
- On several others the gains read from the maker note's
Tag2010match the camera's auto-WB estimate, not the white balance it applied. Estimating the applied gains from pixels the camera JPEG renders neutral sides with SR2WB_RGGBLevelsevery time. Examples: ILCE-3500 on a 5600 K preset, R −31 % and B +101 %; SLT-A57 −25 % / +26 %; ILCE-7S on Shade −9 % / +15 %; also NEX-6, RX10M2 and ILCE-5000.
- SR2 black level read from the wrong place for two layouts: 354–365 on the A450, A500 and A550, and 975 on the A700, where the file says 512 and the data floor is 528–544. The A700 renders crushed (ΔE 20, ΔL* −10) even with an accepted fit.
- Lossless M/S raws: the pedestal is about 1024, but 512 is subtracted. Against the same scene shot full size, the 7RM5 M measures 1.007·L + 1021. The result is lifted shadows, about 3 % of white, currently hidden by the fit.
- In-camera 16:9 crop not applied on the ILCE-7SM2 and A580. The render stays 3:2 against a 16:9 JPEG, so no fit is attempted (ΔE 15 and 27). The 7SM2 also keeps 32 padding columns.
- DSC-R1 SR2 decodes as noise, a white frame. Correction: the data isn't encrypted; its 16-bit words are big-endian inside the little-endian TIFF (found by @radialmonster, see LR-IMP-CAMERA-COVERAGE: Sony 16:9 crop on pre-crop-tag bodies #580). Read that way it decodes cleanly, and radialmonster's LR-IMP-FORMATS: Sony DSC-R1 .SR2 decodes (big-endian 16-bit words in a little-endian TIFF) #640 decodes it.
- A850 / A900 are refused but look like plain 12-bit packed data (1.5 bytes per pixel). Not tried.
- Crop origin is 8–32 px left of
DefaultCropOriginon the 7RM3 and 7RM4/4A. Cosmetic: those columns are real image.
Colour-fit observations (crates/engine/src/camera_preview.rs)
- Flat steps in the fitted tone curve (Sony A7 (ILCE-7) ARWs render posterized with a cold colour cast at default settings #454) are fixed by LR-PROF-CAMERACOLOR: fit the starting tone curve by quantile matching (no flat steps), old fit as fallback #499: 33 of 33 affected fits, no fit lost, median ΔE change −0.003.
- Single-hue scenes can pass with collapsed colour separation. On the ILCE-1 sample, two rows of the fitted matrix are nearly identical, yet it passes at 0.094 because the gate is dominated by lightness. This is the same family as Sony ARW (ILCE-7C): raw render loses ~50% saturation under purple/magenta light, ~12% under warm or teal light #378.
- Rejected or not attempted: HX95 (0.103, just over the limit), RX10 (lava scene), RX1R (ISO 6400, too little colour), NEX-3 (black-and-white JPEG), plus the two 16:9 bodies.
Preview-only bodies (expected for now): A100, A200, A230, A290, A300, A330, A350, A380, A390, A850, A900, F828.
I'm working on fixes for 2–5 and will link them here. The per-body table and scripts are available if useful.
Metadata
Metadata
Assignees
Labels
No labels
Activity
QuirkyTurtle94 commentedon Oct 9, 2026
this is seriously impressive, thanks!
LR-IMP-CAMERA-COVERAGE: ILCE-7CR test pins the black level of Bayer c…
radialmonster commentedon Oct 9, 2026
TL;DR: great sweep, thank you. Two things link up with it: #528 changes one of your rejected cases, and I'd like to take item 6 (A850/A900) so we don't both work on it.
QuirkyTurtle94 commentedon Oct 9, 2026
Adding some ILCE-7RM4A (A7R IVA) results from my own archive, investigated with Codex. These support the rejected-fit/neutral-fallback explanation, but the profile is not an across-the-board improvement.
Build and method
65ad290plus LR-PROF-CAMERACOLOR: calibrate rejected every ILCE-7RM4 file (camera JPEG proxy a pixel short) #531's camera-preview sizing fix (matchingfba436a). No LR-PROF-CAMERACOLOR: fit the starting tone curve by quantile matching (no flat steps), old fit as fallback #499 or LR-PROF-CAMERACOLOR: fit the camera look without clipped sensor pixels #528 changes in this experiment.lightcraft-cli calibrate --max 0 --out <isolated-directory> <training-files...>to build a profile for ILCE-7RM4A, rather than reusing an ILCE-7RM4 or ILCE-7CR profile.ILCE-7RM4A.jsonprofile with a matrix and hue/saturation table.LIGHTCRAFT_CAMERA_PROFILESdirectory versus the candidate directory. Validation RAW copies had no XMP sidecars. Originals were not edited; paired-validation originals were SHA-256 checked unchanged.Results
All of the first 24 already had accepted per-photo fits. The profile improved 16 and worsened 8; the largest regression was about +0.83 ΔE, so I haven't installed it as my default.
I then screened another 78 photos from the held-out folders and found one without an accepted per-photo fit. On a fresh 1200px comparison, the profile changed that file from rejected to accepted, and the dark/muted rendering became much closer to the camera JPEG (14.79 → 3.20). That file is Sony compressed ARW, Standard Creative Style, Auto WB, sRGB. It was not in the training set. This is a targeted failure-case result, not a claim about the failure rate of my entire archive.
Limits / coordination
This is a local camera-JPEG-look profile experiment, not measured colour calibration or Lightroom parity. It doesn't explain my earlier “looked better after Lightroom” observation, resolve XMP white-balance/tone interoperability, or establish a resolution fix. I haven't compared this profile with #499/#528 yet, and Sony Imaging Edge reference exports are still pending. I'm not taking ownership of the decoder items already being worked on here. No private photos are attached or uploaded.
AlexChambers commentedon Oct 9, 2026
@radialmonster I hadn't started item 6, so it's yours. Thanks, and nice result on the HX95 with #528.
Status of the rest: items 2 and 3 (SR2 black levels and the lossless M/S pedestal) are in #542. Item 1 (as-shot white balance) builds on #542's SR2 decoding, and items 4 and 5 are next; I'll link them here as they open.
@QuirkyTurtle94 thanks for the ILCE-7RM4A numbers. They match what I saw with an ILCE-7CR profile (#526): about neutral on photos whose own fit was accepted, and a big win on the ones that fell back.
radialmonster commentedon Oct 9, 2026
Item 6 (A850 / A900): checked, and you were right. The A900 sample is plain packed 12-bit data: the single strip is exactly width x height x 1.5 bytes (6080 x 4048 x 1.5 = 36 917 760, ending at the end of the file), two pixels per three bytes, least-significant-bit first. That order is about 12 times smoother between same-colour neighbours than the other orders, the colour layout is RGGB (checked against the embedded camera JPEG), and black is 128 on the 12-bit scale. It renders with natural colour and framing next to the camera JPEG, and in a render of all 199 Sony files in our archive only the A900 changes.
Two caveats: the archive has no A850 file, so nothing is measured for it (a file that follows the same size rule would decode, but I can't say it does). And the sample has no clipped highlights, so the white level and the exact crop origin rest on one frame. If you have an A850 file, or an A900 one with bright highlights, that would settle both. The change is #573.
LR-IMP-CAMERA-COVERAGE: ILCE-7CR test pins the black level of Bayer c…
LR-IMP-CAMERA-COVERAGE: Sony black levels from the SR2 layout and the…
AlexChambers commentedon Oct 9, 2026
Item 1 (as-shot white balance) is up as #575, stacked on #542 (items 2 and 3). The 14 bodies without white balance now read the gains the camera applied from the SR2 block, and over-10% errors drop from 5 to 0 against neutral areas of the camera JPEG. #575 also replaces #542's position tables with one SR2 decryptor. Items 4 and 5 are next.
AlexChambers commentedon Oct 9, 2026
Items 4 and 5 are up as #580. The ILCE-7SM2 and DSLR-A580 now take their in-camera 16:9 crop, so their camera-look fit runs again (ΔE 15.2 → 4.8 and 26.7 → 3.9 against the camera JPEG). The DSC-R1 SR2 is refused, so it opens preview-only with a reason instead of as noise. With #542, #575 and radialmonster's item 6, that covers everything on the list except the cosmetic item 7.
LR-IMP-CAMERA-COVERAGE: Sony 16:9 crop on pre-crop-tag bodies
AlexChambers commentedon Oct 10, 2026
Status after integration batches 22 and 23. Thanks, @echelon and @radialmonster.
Still open beyond the table: single-hue scenes passing with collapsed colour separation (the ILCE-1 sample), and #631, three ILCE-7RM4 frames that never reach the fit, which I'm tracing now. I'll leave this open until #573 lands.
LR-IMP-CAMERA-COVERAGE: Sony ARW white balance and black level from o…
LR-IMP-CAMERA-COVERAGE: Sony 16:9 crop on pre-crop-tag bodies, refuse…
radialmonster commentedon Oct 10, 2026
DSC-R1: #689 reads its SR2SubIFD (other key), giving black 512.5, WB [1.953, 1, 1.504] and crop 3888×2592 at (16, 8).
QuirkyTurtle94 commentedon Oct 10, 2026
I've completed a broader comparison using 64 of my Sony A7R IVA (ILCE-7RM4A) RAWs against Sony Imaging Edge Edit 4.1.00.03062. I think there are three overlapping effects here, rather than a single missing-dynamic-range bug.
The set has 30 FE 24–105mm F4 files and 34 FE 200–600mm F5.6–6.3 files, ISO 250–12800. These are selected files from three folders, including related frames and a known failure, so this is not a random sample or evidence about every Sony body. Private family photos are included only in anonymous measurements and will not be shared.
1. A reproducible partial-fit colour problem
One lion frame (anonymous ID R024) accepts a tone-only camera look. Diagnostic logging explains why:
So “fit accepted” does not mean a meaningful colour model was recovered. With Sony DRO disabled, this frame's aligned mean lightness difference is only −0.35 L*, but LightCraft/Sony mean C* is 0.416. The pooled experimental profile raises that to 0.735, with similar lightness. This is more specific than an exposure mismatch.
There is an interesting fallback interaction:
starting_colour_withaccepts any successful JPEG-derived look before consulting spectral calibration.spectral_table.rsalready maps ILCE-7RM4A to ILCE-7RM4, but the accepted partial look bypasses it. That precedence is intentional and tested. A possible experiment is calibrated camera colour plus a newly fitted tone when the partial look cannot constrain colour, while preserving successful full fits. I would not simply loosen the colour-sample guard or swap the matrix under an existing fitted tone.Source: starting-colour precedence, sample guard, partial fit, camera alias.
2. The Sony default-tone comparison has a deliberate mismatch
All 64 files have DRO Auto metadata, and all 64 LightCraft logs report
DRO tone replaced true. LightCraft intentionally lowers the fitted tone towards its pooled Sony DRO-off curve; Sony Edit's default reference still applies DRO Auto. That accounts for part of the darker appearance and should not automatically be called a decoder defect.I therefore also exported 8 Sony DRO-off controls. The R024 example above still has weak colour after removing the tone mismatch. The other controls also show that turning DRO off reduces the lightness gap without universally removing colour differences. Sony Edit and the embedded camera JPEG are different targets too.
3. Highlight/shadow editing is a separate local-contrast issue
I locally tested existing #645 at
d4e3ebcon three of these files. V1 neutral, Highlights −100, Shadows +100 and combined-recovery controls are byte-identical to the baseline; V2 neutral is unchanged. Under strong edits, the proposed V2 path retains more local detail:This metric is standard deviation of a 9×9 high-pass of linear luminance divided by region mean, with fixed baseline masks, at 1600px. It includes edges/noise; it is not a measure of recovered sensor dynamic range. These are local spot-checks, not full CI or GPU validation. They support the existing PR rather than another implementation.
Broader results and controls
All 64 pairs pass similarity alignment. Central 84% measurements against Sony Auto:
The candidate has lower ΔE76 on 52/64 files and higher on 12. It was trained on 225 other files with no file overlap, although related scenes limit independence. Baseline 63/64 full fits + 1 partial become 64/64 full with the candidate. This is a modest, uneven improvement, not a universal profile fix. It is only supplied to isolated test processes, not installed globally.
I also tested 30 LightCraft slider variations on 6 files, 3 Sony exposure controls with DRO Off, and one native 9504×6336 pair. Basic exposure response is substantial and often close in median luminance: R024 at +2EV is 0.690 LC versus 0.722 Sony, R012 is 0.920 versus 0.908. R008 at −2EV is 0.076 versus 0.075, but its rendered 90/10 spread differs. Similar medians do not prove equal highlight recovery. Contrast +100 increases R024's rendered 90/10 spread from 1.86 to 2.51 stops; that is a display statistic, not sensor DR.
The native LightCraft log explicitly records a 9504×6336 RAW source, and the native crops contain fine detail. This does not test the 100% GUI preview path in #515; that still needs a separate reproduction.
How this relates to existing work
ToneMap::camera/file-local fitted ARW looks unchanged.I'd suggest coordinating the narrow partial-fit fallback experiment with the existing camera-colour work, contributing these checks to #645, and reproducing the GUI preview complaint separately. Any deliberate render change should follow the repository's process-version and regression rules.
Reproduction and limits
Baseline: upstream
b70ae174plus the #695 lens aspect guard at9682caae, CPU pipeline, reset edits, preferences disabled. Sony exports: 16-bit sRGB TIFF 1600×1067, camera WB/Standard, zero exposure/contrast/saturation, DRO Auto except labelled controls. Distortion settings are matched where available (24–105 Auto, 200–600 Off), then similarity registration and a central crop are used. Sony noise reduction, sharpening, vignetting and CA correction remain confounds. All originals and copies pass SHA-256 verification.ΔE is CIE76, not ΔE2000 or calibrated colour accuracy. No Lightroom reference exports or colour chart were used. The rendered histogram/percentile measurements do not establish sensor dynamic range or Lightroom parity. The accompanying report contains 49 non-portrait triptychs, controls, native crops and anonymous per-file CSVs; it excludes RAWs, family images and private metadata.
Follow-up implementation: #732 is now open for review. It lets an accepted identity-matrix partial look try the existing measured spectral calibration, refitting tone/chroma and retaining the old partial unless the candidate passes the normal fit gates and improves held-out encoded error without increasing linear error. All 63 full-fit renders in this 64-file set and all 103 public corpus renders remain byte-identical. The affected lion frame's chroma ratio against Sony DRO Off rises from 0.416 to 0.726; CIE76 falls from 2.62 to 2.20. Against the embedded JPEG, CIE76 instead rises from 1.72 to 1.83, so this is a limited improvement with an explicit reference/metric tradeoff, not a universal colour match. All eight
cargo xtask cistages passed. The earlier pooled-profile image below remains labelled as that separate experiment. #699 and #645 remain outside the implementation.Comparison images
These are metadata-stripped wildlife comparisons. No baby, family or other portrait photographs are attached.
R024: Sony DRO Auto / Sony DRO Off / LightCraft baseline (left to right). Removing DRO reduces the tone mismatch, but the muted LightCraft colour remains.
R024: Sony DRO Auto / LightCraft baseline / experimental pooled profile. The right-hand image uses the earlier profile trained on separate photos. It is not the measured-spectral fallback fix currently being tested.
R008: Highlights −100, PR #645 V1 / V2. This cheetah comparison illustrates the separate local-contrast work described above, with the same edit applied to each process version. It is not evidence of extra sensor dynamic range.
LR-IMP-CAMERA-COVERAGE: Sony ILCE-7CM2 ARW codings in the corpus (sto…
Merge pull request storytold#535 from emmertex/upstream-learn2-sidecars