Commit Graph
139 Commits
Author SHA1 Message Date
aiongg cf35f7dbae Merge remote-tracking branch 'upstream/main' into next-sync-1123
# Conflicts:
#	Cargo.toml
#	crates/audio/src/track.rs
2026-11-23 01:29:52 +00:00
Terra854 59c9ebfa6c Report DNG linearization in decoder comparisons (#3030) 2026-11-22 16:23:30 +07:00
David MannandClaude Opus 5.5 1929e79ebb Merge storytold main into next (20 Nov, second sync)
Merges main at 8f92ed1334 (#2550 and the rest of main since the 20 Nov sync).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 16:38:55 +01:00
FredApps 17ec60ad0c Merge pull request #2379 from trufae/fix/raw-orf-preview-fallback
craft-raw: recover ORF previews with missing pointers
2026-11-20 13:43:32 +07:00
FredApps 8014b39bfc Merge pull request #2378 from trufae/fix/raw-nef-packed-guard
craft-raw: simplify NEF packed-layout eligibility
2026-11-20 13:41:41 +07:00
FredApps 63ed548b69 Merge pull request #2380 from trufae/fix/raw-orf-crop-coordinates
craft-raw: reject narrowing ORF crop coordinates
2026-11-20 13:35:05 +07:00
Dylan M. Taylor f4c242fe21 test(raw): ensure CARGO_TARGET_TMPDIR exists in decode_report FixtureDir (#2502) 2026-11-19 23:32:07 -05:00
aiongg b05c1c27f9 Merge storytold main into next (20 Nov sync) 2026-11-20 01:48:18 +00:00
42e0bd5482 Add a craft-raw decoder comparison example (#2417)
* Add a craft-raw decoder comparison example

* Clean up RAW decoder report test fixtures

* craft-raw: say the report hashes decoded samples and which revisions build it

The digest covers RawImage::data, after any decoder linearization, so the
README now says "decoded samples" and explains that two stored codes that
map to the same value give the same digest.

The copy-into-an-older-checkout instructions now name the first main
revision the example builds on (ecee6933, #1171): older revisions have no
Cfa origin fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 05:50:06 +07:00
pancakeandpancake 352c589d89 RAW-DNG: gate JPEG XL tests on the codec feature (#2381)
The DNG integration target also runs when JPEG XL decoding is disabled.
Gate the five JPEG XL cases and their fixture helpers on the jxl feature
so a DNG-only test run checks the codecs available in that build.

The full JPEG XL regressions remain enabled when jxl is selected.

Co-authored-by: pancake <pancake@nopcode.org>
2026-11-19 17:45:24 -05:00
pancake 9e81d13691 RAW-ORF-PREVIEW: scan for JPEGs when preview pointers are missing
An enabled ORF reader makes the format report supported even when a
particular sensor stream cannot be decoded. Keep the existing JPEG scan
fallback available for these files when their preview tags are missing
or damaged.

Cover both preview entry points with an unsupported ORF containing an
unreferenced JPEG.
2026-11-19 20:21:36 +01:00
pancake 63124081c9 RAW-NEF: simplify packed-layout eligibility
Express the accepted cases as one positive condition before rejecting
an unmarked strip. The truth table stays unchanged: an explicit packed
mode or a measured complete-group layout is required.

This removes Clippy 1.95's nonminimal_bool diagnostic.
2026-11-19 20:21:36 +01:00
pancake 58b06868e3 RAW-ORF-CROP: reject crop coordinates that cannot fit usize
Maker-note crop values are u64. Casting them to usize on a 32-bit target
can turn an out-of-range coordinate or size into a valid small crop.
Use checked conversions before applying the existing sensor bounds.

Exercise a valid crop and values offset by 2^32 using an uncompressed
ORF header, independently of lossless-compressed sensor support.
2026-11-19 20:21:36 +01:00
aiongg e8e713ee26 Merge storytold main into next (18 Nov sync)
Merges main at 3b8e426a26.

- crates/ui: main's e-sign dialog (crates/ui/src/esign) moves to craft-cloud-ui beside the
  share dialog, behind craft-cloud-ui's esign feature; craft-ui forwards `esign` and
  re-exports the module.
- crates/proof: main's can_suggest_cased goes to affix/check.rs and its tests to
  affix/tests.rs (next split affix.rs); French wiring in lib.rs.
- crates/svg: main's validated resolver and raster validation stay under tree-render, which
  now also enables gif and image-webp; the shared image-codec helpers are gated on tree.
- craft-ai-agents: main's rev (craft-ai-integrations main), one entry.
- crates/craft: facade dependencies, features and re-exports for main's new crates.
2026-11-18 23:07:38 +00:00
Phil HartandClaude Opus 5.5 2393b1f16f craft-raw: decode two-field Coolpix NEFs (E5400, E5700 CYGM, E8400, E8800) (#2235)
Ported from storytold/lightcraft#672, whose decoder code now lives here.
Some CCD Coolpix bodies store two interlaced fields one after the other in
one tight 12-bit strip. For the measured bodies, in their measured legacy
layout (binary maker-note version 0.2.0.0, compression 1, one strip of
w*h*1.5 bytes), the fields are interleaved in the model's field order. The
E5700's CYGM mosaic becomes approximate linear RGB with fixed gains.
Masked columns are judged on the stored rows, so the header probe and the
full decode agree. Other files keep their stored rows.

Checked on 527 NEF/NRW samples: only the six E5400/E5700/E8400/E8800 files
(and four synthetic legacy-layout fixtures) change; the other 517 decode
bit-identically.


Claude-Session: https://claude.ai/code/session_01Fnx9MwPUug72xHRgg993uc

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:03:26 -05:00
Phil HartandClaude Opus 5.5 0976e3fd19 craft-raw: Kelvin presets for more CR2, CR3, PEF and RW2 raws (#2234)
Reads the camera's white-balance presets as a Kelvin curve where the
decoders gave none:
- CR2 ColorData versions 1 to 12 (5-word records), version 10 at either
  of its two layouts, picked by the Daylight record's 5200 K;
- CR3 ColorData versions 16-19, 32-34, 48 and 64-66;
- PEF maker note 0x0221 (entries of 53190 - K and the red/blue
  multipliers);
- RW2/RWL/RAW tag 0x0027: the D55 and 3200 K studio tungsten
  multipliers as a neutral pair with their chromaticities
  (KelvinPresets::from_neutral_lights / neutral_lights).
Ported from storytold/lightcraft#2527.


Claude-Session: https://claude.ai/code/session_01Fnx9MwPUug72xHRgg993uc

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:02:12 -05:00
Phil HartandClaude Opus 5.5 ccabfee3b5 craft-raw: no frame floor for tiny lossless JPEG tiles (#2232)
A DNG tile's frame may hold at most twice the tile's samples and a Sony
quad tile's at most the tile's samples, with no 65,536-sample floor. The
floor let each of many tiny tiles decode and keep a frame far larger than
the tile budget counts (storytold/lightcraft#4024). A DNG tile also drops
the surplus capacity of a larger frame after the resize.


Claude-Session: https://claude.ai/code/session_01Fnx9MwPUug72xHRgg993uc

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 15:00:30 -05:00
Dylan M. Taylor f589ff4857 Merge pull request #2039 from agstrc/craft-raw-sony-zv-e10-distortion
craft-raw: Sony ZV-E10 in-file distortion
2026-11-18 10:58:33 -05:00
techneissa 71e2714833 raw: lengthen an understated DNG strip only for integer samples (#2040)
SampleFormat 4 and other undefined values no longer reach the extension; an
absent tag still reads as 1 (unsigned), so a file without it is unchanged.
2026-11-17 18:47:47 +03:00
techneissa 786c5571f0 raw: refuse an understated DNG strip whose ActiveArea reaches below the image (#2040)
decode drops such an ActiveArea for the whole image, so nothing would explain
the short byte count.
2026-11-17 18:39:50 +03:00
techneissa 60f7c5d74f raw: read a DNG strip whose byte count is only ActiveArea wide in full (#2040)
An uncompressed single-sample integer DNG strip whose StripByteCounts is exactly
ActiveArea columns (from column 0) by ImageLength rows, while the file holds the
whole ImageWidth by ImageLength raster from the strip's offset, is read at its
declared size instead of refused. Every other shortfall stays Corrupt.
2026-11-17 16:53:35 +03:00
Davi Augusto ff8c279854 craft-raw: Sony ZV-E10 in-file distortion
The ZV-E10 joins APSC_BODIES with the ILCE-6700's rule (11 knots over
its own default crop's half diagonal / 10 = 360.56 px, the corrected-
radius index, the frame-filling zoom, the 0.5 px APS-C fit gate) and its
own distortion unit, 16384: the ILCE-6700's 15000 over-corrects its
16 mm photos by about 9 %. APS-C bodies now carry their unit.

Measured on 4 photos with the E PZ 16-50 mm at 16-32 mm against the
camera JPEG: p95 0.26-0.64 px at 1440 px as rendered (uncorrected up to
18.7 px; unit 15000 up to 2.18 px). Ported from storytold/lightcraft#3743,
overtaken by the craft-raw cutover.
2026-11-17 10:02:44 -03:00
aiongg ac3dfd1f53 Merge storytold main into next (17 Nov sync)
storytold main 83cb1133dd (291 commits) into the integration head bab1a99b85; 47 conflicted files.

- Domain test files (metafile, prepress, pdf plates, settings store, heif, media-testkit, atomic): tests next cut stay cut; tests new on main are kept, as trials where the crate's test target runs trials.
- atomic: main's group-bits test and Faulty::set_group go to src/tests.rs. audio: main's GSM and SBC oracles join tests/main.rs. cms constructors, pdf knockout_backdrop and testing_pdf join their crates' one test binary; timeline's preflight tests become src/preflight_tests.rs trials.
- update: main's changes to detect, install (linux, macos) and the tests land in next's split modules. The app's own offer is inspected on a thread of its own, picked up by tick's polling; settle_for_tests settles offers too. Later on a ready update drops the close it asked for. updater_pin_tests.rs stays deleted; its new pin test is in tests/it/update.rs.
- craft-color: main added a different crate at crates/color (the colour tags of compositor and display frames); it is next's craft-color module `tags`, re-exported at the root.
- Old crates/ui (combo, docking, testing, README) and keymap's ui/view.rs stay deleted; main's new crates/ui/src/testing files are dropped with them.
- New crates in the craft facade: ai, control, dds, frame, ipc, media-source, palette, press-print, score, ssip. testkit and xtask are listed outside it.
- Cargo.lock: the union of both locks, resolved by cargo metadata. Workflow: main's nextest Windows leg, with next's --keep-going clippy.
2026-11-17 12:44:52 +00:00
Bruno 1c927e5e4d craft-raw: a CR2 opens with the camera's aspect crop (AspectInfo), as a CR3 does (#1336) 2026-11-16 21:36:28 -05:00
.CooCoo 27fe59ab79 craft-raw: the pinned RAF corpus list separates digest and path with a tab (#1379) 2026-11-16 21:36:03 -05:00
FredApps bea91b1861 raw: charge each DNG chunk's own output allocation against the aggregate budget (craft-libs #778) (#1884)
A lossy JPEG smaller than its tile is now budgeted by its frame, but decoding still
fills the whole tile, so the chunk's w x h x spp output is charged as well (and refused
over MAX_SAMPLES). Regression test: a 256x256 JPEG padded with comments in a
16384x16384 tile is TooLarge instead of allocating ~1.5 GiB.
2026-11-16 09:55:38 -05:00
aiongg 2df33d2f01 Merge remote-tracking branch 'upstream/main' into sync/main-1116
# Conflicts:
#	Cargo.lock
#	crates/audio/src/lib.rs
#	crates/exr/src/decode.rs
#	crates/font-catalog/src/lib.rs
#	crates/ps/src/lib.rs
#	crates/svg/Cargo.toml
#	crates/text/Cargo.toml
#	crates/text/src/lib.rs
#	crates/video/Cargo.toml
#	crates/video/src/lib.rs
2026-11-16 14:23:07 +00:00
FredApps 402dfe46ad raw: charge short lossy JPEG DNG strips their declared rows (craft-libs #778) (#1857) 2026-11-16 07:52:02 -05:00
FredApps eafb50aff3 Merge pull request #1653 from storytold/codex/dng-opcode-interpreter
Parse DNG opcode parameters into typed values
2026-11-16 12:03:21 +01:00
FredApps 806fa9a5a0 Merge pull request #1648 from storytold/codex/dng-capture-info
Share CinemaDNG capture metadata parsing
2026-11-16 12:02:33 +01:00
FredApps 9b87ff0a0e raw: dng_metadata checks the LinearizationTable count before reading its entries 2026-11-16 10:34:00 +01:00
FredApps cd845444f6 Merge remote-tracking branch 'origin/codex/dng-capture-info' into w1653 2026-11-16 08:52:13 +01:00
FredApps d8a2de2224 Merge remote-tracking branch 'origin/codex/dng-metadata' into w1648 2026-11-16 08:52:09 +01:00
FredApps 2686ac1f95 Merge remote-tracking branch 'origin/codex/shared-dng-opcode-envelope' into w1647 2026-11-16 08:52:05 +01:00
FredApps 456e71da87 Merge remote-tracking branch 'origin/codex/shared-dng-raw' into w1645 2026-11-16 08:52:01 +01:00
FredApps 8a067d58d0 raw: dng_lines checks unpack sizes, budgets each chunk's real decode allocation, and allows subsampled lossy JPEG
- unpack: checked sample, row-bit and output products, capped at MAX_SAMPLES before allocating
- every chunk is charged what its decoder may allocate (lossless: coded rows + 1/8; lossy: the
  32-pixel MCU-padded tile) against the aggregate budget before decoding, the lossless decoder
  is held to that, and truncated capacity is released
- the lossy encoded-size floor allows 64 x spp samples per two-bit block (chroma subsampling)
2026-11-16 08:51:58 +01:00
FredApps 250fc97fa8 raw: opcode_params reads areas as the shared opcodes::Area and clamps them (Area::clamp); document how it differs from the typed opcodes model 2026-11-16 08:36:26 +01:00
FredApps 0e4b33fdf0 Merge remote-tracking branch 'origin/codex/dng-capture-info' into w1653 2026-11-16 08:35:30 +01:00
FredApps 7feff2a02d raw: dng_metadata::Timecode is the crate Timecode; share the CinemaDNG frame-rate range with dng.rs
Removes the duplicated Timecode type and BCD decoder (Sonar duplication 28%) and the copied
frame-rate plausibility check; capture_info is tested against the full reader's CinemaTags.
2026-11-16 08:35:12 +01:00
FredApps 77125b817f Merge remote-tracking branch 'origin/codex/dng-metadata' into w1648 2026-11-16 08:34:03 +01:00
FredApps 6225363b1f raw: dng_metadata tests against hand-built DNGs and the full reader; document why it keeps its own tag reads 2026-11-16 08:33:43 +01:00
FredApps b611b03a29 Merge remote-tracking branch 'origin/codex/shared-dng-opcode-envelope' into w1647 2026-11-16 08:32:30 +01:00
FredApps 89e96d2790 raw: opcodes::parse_list/write_list use the opcode_raw envelope walker and encoder
One opcode-list envelope implementation: opcode_raw::Records walks the records (stopping at a
truncated one) for both the strict opcode_raw::parse and the typed opcodes::parse_list, and
opcodes::write_list encodes through opcode_raw::encode instead of truncating lengths with as.
2026-11-16 08:32:10 +01:00
FredApps 456b7d5b35 Merge remote-tracking branch 'origin/codex/shared-dng-raw' into w1645 2026-11-16 08:30:57 +01:00
FredApps 59d28093e6 raw: dng_lines reuses the DNG reader's unpackers and JPEG decoder, drops the image dependency
- uncompressed rows go through crate::unpack (read_u16s / unpack_msb), as in dng.rs
- lossy JPEG tiles (34892) use tiffraw::lossy_jpeg_with_tile (zune-jpeg) with its tile-size checks
- line-dng now implies dng instead of pulling in image
- tests: every layout and compression read against the full reader, refusals, unpack depths
2026-11-16 08:27:55 +01:00
FredApps 3fd0383c81 Merge remote-tracking branch 'origin/main' into w1644 2026-11-16 08:20:40 +01:00
Dylan M. Taylor 4374003c36 raw: reject zero-pitch public opcode area iterators 2026-11-15 23:26:23 -05:00
Dylan M. Taylor a8fc359bc5 raw: share CinemaDNG capture metadata 2026-11-15 21:49:46 -05:00
Dylan M. Taylor 61a9330f4e Adapt attributed FilmCraft metadata to bounded shared reader
Preserve vangel76 original FilmCraft source commit 28247afae7806590dcdb149d744408739fb738df before the shared metadata extraction. Final metadata implementation is unchanged from the existing PR.
2026-11-15 21:49:46 -05:00
Dylan M. Taylor b00cb4533a raw: use fixed-size opcode record chunks 2026-11-15 21:49:46 -05:00