Run the learned denoise in develop, and export with it
A Bayer photograph keeps its mosaic in the session and is offered the AI Denoise switch. Asked for, the network runs on the decode executor from a hot-pixel-repaired copy — the app's own pass — with the frame's noise from its best source, and its progress in the activity bar; the classical demosaic shows until the result lands, and the finished job says where the noise figures came from. Keep grain is a GrainBlend of the two, made once per value; the render draws it as its source and the adjust pass never knows. demosaiced stays the classical result, so the raw histogram, the white balance picker, masks and segmentation still read the sensor. The develop view reconciles on a 250 ms poll rather than on each way an edit can change (slider, undo, preset, version, a sidecar from another device): two comparisons when nothing changed, and no path that can forget. A failure is not retried until the switch is toggled. An export of a photograph that asks for it waits for a running job or computes it.
This commit is contained in:
@@ -82,10 +82,21 @@ impl NoiseModel {
|
||||
/// `None` only for a frame with no masked border, no profile and no table
|
||||
/// that is also too dark or too busy to measure.
|
||||
pub fn for_frame(raw: &RawImage, bytes: &[u8], iso: Option<u32>) -> Option<NoiseModel> {
|
||||
for_frame_with(raw, dr_decode::noise_profile(bytes).as_deref(), iso)
|
||||
}
|
||||
|
||||
/// [`for_frame`], given the file's `NoiseProfile` already read
|
||||
/// ([`dr_decode::noise_profile`]) rather than the file, for a caller that
|
||||
/// keeps the header's answer and not the bytes.
|
||||
pub fn for_frame_with(
|
||||
raw: &RawImage,
|
||||
profile: Option<&[(f32, f32)]>,
|
||||
iso: Option<u32>,
|
||||
) -> Option<NoiseModel> {
|
||||
let dark = dark_border(raw);
|
||||
let mut model = iso
|
||||
.and_then(|iso| from_table(raw, iso))
|
||||
.or_else(|| dr_decode::noise_profile(bytes).and_then(|p| from_dng_profile(raw, &p)))
|
||||
.or_else(|| profile.and_then(|p| from_dng_profile(raw, p)))
|
||||
.or_else(|| measured(raw, dark.as_ref()))?;
|
||||
if let Some(d) = dark {
|
||||
// The border saw this exposure's row and column noise directly.
|
||||
|
||||
Reference in New Issue
Block a user