mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:22:39 +00:00
docs(develop): clarify sensor and local tone consumer contracts (#3038)
This commit is contained in:
@@ -49,7 +49,12 @@ Differences from LightCraft (ordinary-range output is covered by the baseline fi
|
||||
summed-area counts or padded table cannot be represented; patch-area arithmetic no longer overflows
|
||||
`i32`. An already-cancelled oversized-patch request returns `Cancelled`, not an unavailable-patch result.
|
||||
|
||||
## Not here yet
|
||||
## Limits
|
||||
|
||||
The rest of the pipeline: the rest of colour, raster, the sensor stage, raw loading and the render stages. No app uses this crate
|
||||
yet.
|
||||
This crate includes the sensor stage and consumes decoded images from `craft-raw`. Raw loading
|
||||
and end-to-end render orchestration remain outside it.
|
||||
|
||||
For integer DNGs with a `LinearizationTable` and a nonempty `OpcodeList1`, `craft-raw` returns the
|
||||
table unapplied on the decoded image. The shared sensor normalisation and binned preview paths
|
||||
do not yet apply that deferred table after `OpcodeList1`. Do not treat their output as fully
|
||||
linearised for those inputs.
|
||||
|
||||
@@ -1293,7 +1293,7 @@ mod fast_tests {
|
||||
}
|
||||
|
||||
/// CPU highlights/shadows base timings on the #3460 frame size:
|
||||
/// `cargo test --release -p lightcraft-pipeline bench_tone_base_cpu -- --ignored --nocapture`.
|
||||
/// `cargo test --release -p craft-develop bench_tone_base_cpu -- --ignored --nocapture`.
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn bench_tone_base_cpu() {
|
||||
|
||||
@@ -23,8 +23,10 @@ pub struct LocalTone {
|
||||
}
|
||||
|
||||
/// Multiply the resampled, not yet white-balanced source `img` by the local tone gain at each
|
||||
/// pixel, where `active_uv(x, y)` maps an output pixel `(x, y)` to normalised active-area
|
||||
/// coordinates `(ax, ay)` (`None` leaves blank canvas alone).
|
||||
/// pixel. For an output pixel `(x, y)`, `active_uv(x, y)` must return normalised (0..=1)
|
||||
/// coordinates in the EXIF-oriented developed source, not in the raw active area.
|
||||
/// [`SourcePlacement::active`] undoes the source orientation and maps through the crop to
|
||||
/// normalised active-area coordinates. Return `None` to leave a blank-canvas pixel unchanged.
|
||||
pub fn apply(img: &mut Rgb32f, lt: &LocalTone, active_uv: impl Fn(usize, usize) -> Option<(f64, f64)> + Sync) {
|
||||
let Some(eval) = lt.map.evaluator() else { return };
|
||||
let w = img.width;
|
||||
|
||||
Reference in New Issue
Block a user