Commit Graph
2758 Commits
Author SHA1 Message Date
vangel76andClaude Opus 5.5 589d84d0f4 #1065: lossy JPEG DNG (Compression 34892)
Problem: lossy DNGs (DNG 1.4 Compression 34892, used for proxy and
"lossy compressed" DNGs, 8-bit LinearRaw tiles usually with a
LinearizationTable) were refused as unsupported.

Fix: decode each tile or strip with the baseline JPEG decoder the
workspace already depends on (`image` with only its jpeg feature, as in
crates/codecs and crates/media; no new crate in Cargo.lock, builds for
wasm32), one component as greyscale or three as colour, the samples
filling the chunk in raster order as with lossless JPEG. As the spec
allows it only for 8-bit LinearRaw, CFA or other depths are refused with
a message naming lossy JPEG. The decoder runs under catch_unwind with an
allocation limit, its picture must match the chunk, and a tiny file
cannot claim a huge picture (at least two bits per 8 x 8 block). Info
reports "lossy JPEG". The test writer gains a lossy JPEG path through
`image`'s encoder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:19:49 -05:00
vangel76andClaude Opus 5.5 eb5844d4da #1065: faster DNG decode and development, reduced-resolution path
Problem: a 4096 x 2160 12-bit lossless-JPEG CinemaDNG frame took about
50 ms (tiles) to 115 ms (one strip) on 16 threads and about 200 ms on
one, too slow for smooth 4K playback, and every frame was developed at
full size even for small monitors and proxies.

Fix, without changing the output (f32 bit patterns compared):
- Lossless JPEG: one 13-bit lookup gives a code and its difference
  bits together; the bit reader takes eight bytes at once when they
  hold no 0xFF; per-predictor line loops.
- Tiles decode in parallel by bands straight into place; a single
  strip covering the image is used without a copy.
- Normalisation: without black-level deltas, a lookup table per
  CFA / black-level site replaces the per-sample float arithmetic
  (each entry computed by the same expression).
- Demosaic, crop and colour run row by row from the normalised plane
  (no padded copy, no RGB intermediate), with 5 x 5 windows sliding
  along the five mirrored rows; the bilinear (Fast) Bayer demosaic
  sums in the reference order.
- ProcessOptions::target_size now develops Bayer, LinearRaw and mono
  pictures at 1/2, 1/4 or 1/8 size (the smallest covering the
  target) by averaging each colour over the blocks, without demosaic.

The first version is kept as `reference` (feature `writer`, tests and
benchmarks only): tests/equivalence.rs checks identical raw samples and
developed bits over all Bayer phases, both qualities, odd crops,
active areas, linearisation, black deltas, codes above the bit depth,
LinearRaw, mono, other CFAs and tiny pictures; examples/bench.rs times
both interleaved at 1/4/16 threads. Best of 9 under load ~12: tiles
2.5x (1 thread) to 2.9x (16), one strip 2.1-2.6x; half size 3-4x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:19:49 -05:00
vangel76andClaude Opus 5.5 953cb7ef3c #1065: clean-room DNG / CinemaDNG decoder crate
Problem: camera RAW is at 0% (docs/codec-parity.md, #383). CinemaDNG,
the one cinema RAW format with a public specification, could not be
read at all.

Fix: new L0 crate filmcraft-dng, written from the public DNG 1.4-1.7,
TIFF 6.0 / TIFF-EP, ITU-T T.81 and CinemaDNG specifications only (no
other decoder's source read; editions in the crate README):
- TIFF container with SubIFDs, bounded (64 IFDs, 4 levels, cycles end
  the walk) and checked offsets; the main raw IFD is the largest
  NewSubFileType 0 CFA / LinearRaw image.
- Raw data: 1-16-bit uncompressed (MSB-first packing) and lossless JPEG
  (process 14, predictors 1-7, 1-4 components, point transform, line
  restarts), strips and tiles, tiles decoded in parallel; allocations
  capped by size and by the data present.
- Processing per the DNG model: ActiveArea, LinearizationTable, per-site
  black levels with deltas, white levels, as-shot white balance with
  neutral highlight clipping, Malvar-He-Cutler Bayer demosaic (bilinear
  for other patterns), DefaultCrop, ColorMatrix / CameraCalibration /
  ForwardMatrix with illuminant interpolation, Bradford to linear
  Rec. 709, BaselineExposure; output scene-linear RGBA floats.
- CinemaDNG FrameRate, TimeCodes and ReelName tags.
- A test-only writer (feature `writer`) synthesises DNGs. Tests: raw
  samples bit-exact for every depth / predictor / layout, processing
  against hand-computed values, hostile files (every truncation, 12k
  mutations, cyclic IFDs, huge sizes, bad offsets), and LibRaw's
  unprocessed_raw as an external oracle reading the same samples
  (skipped when not installed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:19:48 -05:00
FredApps eeb134def2 Merge pull request #1769 from storytold/extract/bounded-cube-3d
cms: share bounded 3D Cube profile parsing
2026-11-16 01:12:10 +01:00
FredApps 2d4b8b8ecd Merge pull request #1679 from storytold/codex/avif-source-depth
Expose source bit depth from AVIF decode
2026-11-16 01:11:58 +01:00
Dylan M. Taylor c599f64832 Merge pull request #1662 from vangel76/perf/raw-ljpeg-nef-1655
CR2, DNG, ARW lossless-JPEG and NEF/RW2 Huffman raw decoding is up to 2x as fast
2026-11-15 18:49:54 -05:00
Dylan M. Taylor 0fd30aeb3e Merge pull request #1771 from storytold/cutover/light-print-raster
pdf: add bounded multi-image 16-bit print raster writer
2026-11-15 18:48:04 -05:00
FredApps 2c740f3292 Merge pull request #1746 from storytold/extract/usd-int-write
Extract bounded USD Crate integer delta encoding
2026-11-16 00:46:40 +01:00
FredApps 19e3dbb606 Merge pull request #1744 from storytold/extract/usd-lz4-write
Share bounded USD Crate LZ4 compression
2026-11-16 00:46:01 +01:00
FredApps b24a1ee25c Merge pull request #1745 from storytold/fix/raw-dng-lin-before-opcodes
raw: leave LinearizationTable unapplied when OpcodeList1 is present
2026-11-16 00:44:49 +01:00
Dylan M. Taylor e3b9c10ee0 Merge pull request #1263 from keithcsqueensu/xlsb-styles
craft-xlsx: read the styles part of a binary workbook
2026-11-15 18:39:26 -05:00
Dylan M. Taylor 4c254242de Merge pull request #1142 from vangel76/perf/hevc-residual-decode
HEVC decoding about 4% fewer instructions on one thread
2026-11-15 18:31:24 -05:00
Dylan M. Taylor d9e56e3f7c Merge pull request #1290 from vangel76/feat/docx-chart-axis-series
DOCX charts keep axis and series formatting
2026-11-15 18:30:37 -05:00
Dylan M. Taylor faa36fc2ea Merge pull request #1140 from vangel76/perf/av1-wavefront-3106
AV1 decoding about 1.7x as fast with many threads
2026-11-15 18:28:38 -05:00
Dylan M. Taylor f60aec302b Merge pull request #1659 from vangel76/perf/raw-dng-parallel-copy-1651
DNG files decode up to 2.4x faster on many cores (5x uncompressed)
2026-11-15 18:27:55 -05:00
Dylan M. Taylor ba240b89a3 Merge pull request #1677 from vangel76/perf/raw-raf-1656
Fujifilm compressed RAF files decode about 1.4x as fast
2026-11-15 18:25:44 -05:00
Dylan M. Taylor 95d118a095 Merge pull request #1287 from vangel76/feat/rtf-rtl-paragraphs
RTF keeps right-to-left paragraph direction
2026-11-15 18:24:29 -05:00
Dylan M. Taylor 4608875afb Merge pull request #1683 from vangel76/perf/raw-cr3-1654
Canon C-RAW (CR3) files decode about 1.5x as fast, lossless CR3 up to 1.4x
2026-11-15 18:23:39 -05:00
Dylan M. Taylor f081b9a062 Merge pull request #1352 from batistalucasv/fix/docx-numbering-change-without-list
craft-docx: preserve w:numberingChange when active numbering is absent
2026-11-15 18:22:07 -05:00
Dylan M. Taylor fce9d1be4d Merge pull request #1144 from vangel76/fix/mpegts-ts-flags-pmt
MPEG-TS: a PAT or PMT packet sent twice no longer damages the section
2026-11-15 18:18:01 -05:00
FredApps 1d413b992d Merge pull request #1688 from storytold/codex/flac-main-reconcile
Reconcile native FLAC decoder with merged QOA support
2026-11-16 00:17:47 +01:00
FredApps 9687434f72 Merge pull request #1632 from storytold/codex/shared-font-outline
Share catalog face metrics and glyph outlines
2026-11-16 00:11:44 +01:00
FredApps 0eaafeb505 Merge pull request #1641 from storytold/codex/tiff-dng-reader
tiff: share bounded lazy classic directory reader
2026-11-16 00:10:27 +01:00
FredApps 6bd1c3dc35 Merge pull request #1715 from storytold/codex/filmcraft-project-format
Share FilmCraft project envelope and schema migrations
2026-11-16 00:10:16 +01:00
FredApps 99d0a6eca4 Merge pull request #1724 from storytold/codex/shared-control-protocol
Share authenticated JSON-lines control protocol
2026-11-16 00:10:04 +01:00
FredApps 8287455d6d Merge pull request #1629 from storytold/codex/exr-rgba-writer
exr: share scanline RGBA writer
2026-11-16 00:08:19 +01:00
FredApps f01f6aca3a Merge pull request #1721 from storytold/codex/shared-sfnt-discovery
Share bounded SFNT face discovery
2026-11-16 00:08:07 +01:00
FredApps 19675a61ec Merge pull request #1708 from storytold/extract/psd-duotone-records
craft-psd: share raw Duotone ink records and block writer
2026-11-16 00:07:29 +01:00
FredApps 24a9b2928e Merge pull request #1722 from storytold/extract/dds-float-surface
craft-texture: add bounded DDS float surface adapter
2026-11-16 00:07:17 +01:00
FredApps 947dc5fb0e Merge pull request #1630 from storytold/codex/shared-tiff-inspection
Share first-directory TIFF inspection
2026-11-16 00:05:27 +01:00
FredApps c26b32c8ac Merge pull request #1636 from storytold/codex/shared-pcm-packet
audio: share interleaved PCM packet decoding
2026-11-16 00:05:15 +01:00
FredApps 937ac93c5c Merge pull request #1695 from storytold/codex/jpeg-app14
Share Adobe APP14 and JPEG sample conversion
2026-11-16 00:02:40 +01:00
FredApps 2896c6ed06 Merge pull request #1718 from storytold/codex/shared-font-embedding
Share TrueType subset embedding classification
2026-11-16 00:02:29 +01:00
Dylan M. Taylor f135882c7b Merge pull request #1742 from storytold/extract/usd-int-decode
Extract bounded USD Crate integer delta decoding
2026-11-15 18:02:27 -05:00
FredApps c0f7be37f1 Merge pull request #1694 from storytold/codex/ps-actualtext-scope
Keep synthesized PostScript text spans inside clip scopes
2026-11-16 00:02:17 +01:00
Dylan M. Taylor ef87387625 Merge pull request #1720 from storytold/extract/spi1d-parser
cms: extract bounded SPI1D table reader from EffectCraft
2026-11-15 18:01:55 -05:00
FredApps 5f4d546449 Merge pull request #1658 from storytold/codex/fcp7-nesting-bounds
Bound FCP7 nested sequence traversal
2026-11-16 00:01:33 +01:00
FredApps f749643b01 Merge pull request #1603 from storytold/codex/raster-probe-limits
Expose bounded stored raster dimensions
2026-11-16 00:01:21 +01:00
FredApps 984803ad07 Merge pull request #1689 from storytold/codex/zip-owned-archive
Allow ZIP archives to own their input
2026-11-16 00:01:08 +01:00
FredApps 3d519f66d2 Merge pull request #1740 from storytold/fix/ps-reencoded-fallback
ps: preserve reencoded glyph names in fallback fonts
2026-11-15 23:59:03 +01:00
FredApps 6909f21a85 Merge pull request #1650 from storytold/codex/shared-control-envelope
Share bounded legacy control envelopes
2026-11-15 23:58:51 +01:00
Dylan M. Taylor bea6ed1ff0 Merge pull request #1633 from storytold/extract/plist-xml
Share bounded XML property-list reader from Craft Anything
2026-11-15 17:58:08 -05:00
FredApps 3a4aecf38c Merge pull request #1698 from storytold/codex/svgz-member-integrity
Reject damaged later SVGZ members
2026-11-15 23:57:14 +01:00
FredApps 643ea04216 Merge pull request #1678 from storytold/codex/webp-canvas-validation
Validate WebP decoder canvas before allocating frames
2026-11-15 23:57:02 +01:00
FredApps cb3551ad3f Merge pull request #1680 from storytold/fix/jls-low-bit-budget
Fix JPEG-LS low-precision scaling and scan allocation limit
2026-11-15 23:56:48 +01:00
FredApps e42b9e1696 Merge pull request #1731 from storytold/codex/obj-compat-options
Expose compatible OBJ read options
2026-11-15 23:55:19 +01:00
FredApps 3a8c6aef3e Merge pull request #1730 from storytold/codex/obj-stream-bounds
Bound OBJ face and continued-line parsing
2026-11-15 23:54:59 +01:00
FredApps ba0ddffcbb Merge pull request #1716 from storytold/codex/fbx-parent-policy
Allow FBX object-only and last-parent hierarchy policies
2026-11-15 23:54:20 +01:00
FredApps 4b1eb33a5b Merge pull request #1713 from storytold/codex/fbx-strict-geometry
Support strict FBX geometry and final polygons
2026-11-15 23:53:56 +01:00
FredApps b464072bae Merge pull request #1710 from storytold/codex/fbx-rotation-options
Allow FBX pre and post rotations without the active flag
2026-11-15 23:53:27 +01:00