Files
craft-libs/crates
vangel76andClaude Opus 5.5 cb3f76848b #1065: DNG opcode lists (OpcodeList1/2/3)
Problem: DNG opcode lists were ignored, so lens shading gain maps
(phones and many cameras), bad pixel maps, vignette and distortion
corrections and trims that a file asks for were silently left out,
and an opcode a reader must apply could not be refused.

Fix (DNG 1.7.1.0 chapter 7): a big-endian opcode list parser (at most
256 opcodes, every count checked against the parameter bytes before
allocating) and the opcodes WarpRectilinear, WarpFisheye,
WarpRectilinear2 (with the skip rule), FixVignetteRadial,
FixBadPixelsConstant / List, TrimBounds, MapTable, MapPolynomial,
GainMap, DeltaPerRow / Column and ScalePerRow / Column. OpcodeList1 runs
on the stored samples (0-65535), OpcodeList2 on the linear values
before white balance (the fused normalise splits only then),
OpcodeList3 on the demosaiced camera values; values are clipped after
each opcode. Unknown opcodes or ones newer than 1.7.1.0 are skipped
when optional and an error naming them when mandatory; preview-only
opcodes are skipped on the reduced-resolution path, and a mandatory
OpcodeList3 keeps full resolution. Interpretations where the spec
leaves room are recorded in the README. Files without opcode lists
develop exactly as before.

Tests: unit tests per opcode with known results (tables, polynomials,
deltas, scales, gain map interpolation and edge replication, vignette,
warps reproducing a ramp, fisheye, the skip rule, bad pixels, trim,
hostile parameters) and whole-file tests of each list's stage, the
optional flag, the preview path, and 3000 mutations under catch_unwind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 21:49:46 -05:00
..
…
…
…
…
…
…
…
…
…
…
…
…
2026-11-15 16:23:03 +00:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-11-15 11:38:06 +00:00
…
…
…
…
…
…
…
…
…
…
…
2026-11-15 18:12:18 +00:00
…
…
…
…
…
…
…
…
2026-11-15 17:56:52 +00:00
…