lightcraft/crates
radialmonster 2b2ebfc7ca Geom: write the warp formulas once over a Real scalar (f64 or Interval)
Homography::apply, Affine::apply, Warp::to_corrected,
Warp::corrected_to_source and embedded_warp are now generic over
lightcraft_geom::Real (private *_real variants in pipeline, public
apply_real in geom); the f64 API is a thin wrapper, so callers are
unchanged. Real is implemented for f64 (plain IEEE operators) and for
Interval, which rounds every bound one ulp outward and turns division by
a range containing zero, the homography's 1e-300 denominator clamp and
non-finite bounds into "undecided" (NaN). Because the interval runs the
same operations as the f64 path, it bounds the rounded f64 results, not
only the exact ones.

The f64 path keeps the same operations in the same order (only commuted
operands, which IEEE + and x leave bit-identical; no fma). Proof:
warp_f64_results_are_bit_identical_to_the_pre_generic_formulas hashes the
bits of 2000 random warps x 40 points through every formula (plus the
clamp branch, including +-1e-300 exactly) and matches the digest computed
by the same test on thumb-split (419261c) before the change; reassociating
one expression, or `<=` for `<` in the clamp, changes it.

The framing chain (output px -> transformed -> lens-corrected -> green
source, then inside the edges) is written once: Warp::framing, generic.
Warp::frame (f64, returns the corrected and green source points) serves
both the CPU resample (sample_warped) and Warp::covers; block_coverage
evaluates the same chain with intervals over a whole block of output
pixels and compares the bounds against the same edges() inside uses, with
no margin: the bounds enclose every pixel's f64 result, so the decision
equals the per-pixel one; else None.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:29:29 -04:00
..
catalog LR-LIB-PEOPLE: leave empty face regions out of the catalog JSON 2026-10-07 06:16:02 -04:00
codecs Codecs: bound thumbnail fallback decodes and WebP metadata allocations 2026-10-07 18:49:59 -04:00
color Never crash: color, geom, raster, develop, scenes, preview, pipeline 2026-10-04 12:34:53 -04:00
develop M12: AI masks never require SAM 3 — background worker, consented download, review fixes 2026-10-07 09:56:50 -04:00
engine Thumbnails: keep textures when the disk cache is resized 2026-10-07 19:04:03 -04:00
geom Geom: write the warp formulas once over a Real scalar (f64 or Interval) 2026-10-07 19:29:29 -04:00
gpu GPU: decide warped-geometry edges with a CPU coverage mask 2026-10-07 18:49:59 -04:00
mcp Merge main into fix/issue-93-export-overwrite 2026-10-05 18:44:02 -04:00
merge Issue #138: DNG: apply the file's own camera-profile look (HueSatMap, LookTable, ToneCurve) 2026-10-06 10:36:30 -04:00
meta LR-LIB-PEOPLE: clip XMP face regions to the photo, drop off-photo ones, read Rotation π 2026-10-07 06:12:49 -04:00
pipeline Geom: write the warp formulas once over a Real scalar (f64 or Interval) 2026-10-07 19:29:29 -04:00
preview Thumbnails: keep textures when the disk cache is resized 2026-10-07 19:04:03 -04:00
raster Merge pull request #56 from storytold/pr/never-crash-core 2026-10-04 14:23:22 -04:00
raw Merge remote-tracking branch 'origin/main' into fix-178 2026-10-07 06:01:50 -04:00
scenes Never crash: color, geom, raster, develop, scenes, preview, pipeline 2026-10-04 12:34:53 -04:00
segment M12: lightcraft-segment: Apache-2.0, checked weights, pure-Rust model download 2026-10-07 09:56:49 -04:00
sysmem Never crash: move the one unsafe FFI call into crates/sysmem 2026-10-05 02:06:08 -04:00
tiff Issue #138: DNG: apply the file's own camera-profile look (HueSatMap, LookTable, ToneCurve) 2026-10-06 10:36:30 -04:00
ui-egui UI tests: wait for the sidebar's file-system checks before clicking 2026-10-07 19:04:03 -04:00