Filter bound inputs at their source storage precision

This commit is contained in:
chasse20 committed 2026-11-18 05:35:30 -05:00
1 parent 1e13f0b78b
commit df9c43dda4
11 files changed
+180 -40

No files matched your search

+8 -1
View File
@@ -23,7 +23,14 @@ pub fn cook(package: &Package, graph_index: usize, options: &Options, cache: &Mu
})
.collect();
inputs.extend(options.inputs.iter().map(|(name, value)| (name.clone(), value.clone())));
bound = Options { only: options.only.clone(), inputs, overrides: options.overrides.clone(), graph_stack: options.graph_stack.clone(), ..*options };
bound = Options {
only: options.only.clone(),
inputs,
input_formats: options.input_formats.clone(),
overrides: options.overrides.clone(),
graph_stack: options.graph_stack.clone(),
..*options
};
&bound
} else {
options
+14 -4
View File
@@ -1,5 +1,5 @@
use crate::{Cache, MAX_DEPTH, NodeOutput, Options, Port, cook, identifier};
use materialcraft_core::{Graph, Node, Package, Value};
use materialcraft_core::{Graph, Node, OutputFormat, Package, Value};
use std::{collections::BTreeMap, sync::Mutex};
pub(crate) fn resolve<'a>(registry: &'a Package, current: &'a Package, node: &Node) -> Option<(&'a Package, usize, &'a Graph)> {
@@ -42,7 +42,7 @@ pub(crate) fn cook_instance(
node: &Node,
input_ports: &[Port],
output_ports: &[Port],
inputs: &[Option<&NodeOutput>],
inputs: &[Option<(&NodeOutput, OutputFormat)>],
params: &BTreeMap<String, Value>,
base: crate::resolved_base_parameters::ResolvedBaseParameters,
options: &Options,
@@ -84,9 +84,19 @@ pub(crate) fn cook_instance(
source_options.graph_stack = options.graph_stack.clone();
source_options.graph_stack.push(identity);
source_options.only = Some(source_graph.nodes.iter().filter(|node| node.def == "output").map(|node| node.id).collect());
source_options.inputs = input_ports.iter().zip(inputs).filter_map(|(port, input)| Some((port.id.clone(), input.as_ref()?.as_image()?.clone()))).collect();
source_options.overrides = params.iter().filter(|(k, _)| source_graph.exposed.iter().any(|e| &e.id == *k)).map(|(k, v)| (k.clone(), v.clone())).collect();
source_options.overrides.extend(input_ports.iter().zip(inputs).filter_map(|(port, input)| Some((port.id.clone(), input.as_ref()?.as_value()?.clone()))));
for (port, input) in input_ports.iter().zip(inputs) {
match input {
Some((NodeOutput::Image(image), format)) => {
source_options.inputs.insert(port.id.clone(), image.clone());
source_options.input_formats.insert(port.id.clone(), *format);
}
Some((NodeOutput::Value(value), _)) => {
source_options.overrides.insert(port.id.clone(), value.clone());
}
None => {}
}
}
let cooked = cook(source, source_graph_index, &source_options, cache);
if cooked.cancelled {
return Err("cancelled".into());
+42 -30
View File
@@ -7,7 +7,7 @@ use crate::{
value_execution::evaluate_value,
};
use craft_texture::{Image, Kind};
use materialcraft_core::{Node, Package, Value};
use materialcraft_core::{Node, OutputFormat, Package, Value};
use materialcraft_nodes::{CookContext, find};
use std::{
collections::BTreeMap,
@@ -81,7 +81,7 @@ pub(crate) fn cook_node(
input_formats.push(source.map_or(materialcraft_core::OutputFormat::F32, |source| source.2));
}
incoming.push(output);
incoming.push(source.map(|(output, _, format)| (output, format)));
}
let input_base = prepared.input_base(node.id, cooked);
@@ -133,7 +133,11 @@ pub(crate) fn cook_node(
let tile = base.tiling[0] && base.tiling[1];
// Input nodes read the caller's image for their identifier
let input_image = node.def.starts_with("input_").then(|| options.inputs.get(&identifier(node))).flatten();
let input_image = node
.def
.starts_with("input_")
.then(|| identifier(node))
.and_then(|name| Some((options.inputs.get(&name)?, options.input_formats.get(&name).copied().unwrap_or(OutputFormat::F32))));
let resource_hash = match parameters.get("resource") {
Some(Value::Text(name)) => package.resource(name).map_or(0, |r| r.bytes.content_hash()),
_ => 0,
@@ -155,7 +159,7 @@ pub(crate) fn cook_node(
subgraph_hash,
// A cached graph instance includes results evaluated with its host environment
(node.def == "graph_instance").then(|| serde_json::to_string(&options.environment).unwrap_or_default()),
input_image.map(|image| image_key(image, cache)),
input_image.map(|(image, format)| (image_key(image, cache), format)),
variable_key(node, &parameters, variables),
));
if let Some(outputs) = lock(cache).get(key) {
@@ -172,38 +176,20 @@ pub(crate) fn cook_node(
} else {
incoming.iter().find_map(|output| *output)
};
let output = input.cloned().unwrap_or_else(|| NodeOutput::Image(Image::filled(w, h, Kind::Gray, [0.0; 4])));
let output = input.map(|(output, _)| output.clone()).unwrap_or_else(|| NodeOutput::Image(Image::filled(w, h, Kind::Gray, [0.0; 4])));
Ok(vec![output; output_ports.len().max(1)])
} else if node.def == "input_value" {
let value = variables.get(&identifier(node)).or_else(|| parameters.get("default")).cloned().unwrap_or(Value::Float(0.0));
Ok(vec![NodeOutput::Value(value)])
} else if node.def == "value_processor" {
evaluate_value(&parameters, variables, seed, [w, h], &inputs, tile).map(|value| vec![NodeOutput::Value(value)])
} else if matches!(node.def.as_str(), "output" | "dot") && incoming.first().and_then(Option::as_ref).is_some_and(|output| output.as_value().is_some()) {
incoming.first().copied().flatten().cloned().map(|output| vec![output]).ok_or("missing value input".into())
} else if let Some(image) = input_image {
let mut image = if node.def == "input_grayscale" && image.kind() == Kind::Color {
// Grayscale bridges use equal RGB weights and preserve fused float order
let weight = 1.0 / 3.0;
image.map(Kind::Gray, |pixel| [pixel[2].mul_add(weight, pixel[1].mul_add(weight, pixel[0] * weight)), 0.0, 0.0, 0.0])
} else if node.def == "input_color" {
image.to_color()
} else {
image.clone()
};
// Bound resources clamp edges through stored factor-two levels
// Preserve resampling and storage conversion for HDR bridges
let resized = image.width() != w || image.height() != h;
while image.width() != w || image.height() != h {
let next = |current: u32, target: u32| {
if current < target { current.saturating_mul(2).min(target) } else { current.div_ceil(2).max(target) }
};
image = crate::output_precision::apply(image.resize(next(image.width(), w), next(image.height(), h), false), base.format);
}
// Resized inputs already store the final level at the declared precision
let image = if resized { image } else { crate::output_precision::apply(image, base.format) };
} else if matches!(node.def.as_str(), "output" | "dot")
&& let Some(Some((NodeOutput::Value(value), _))) = incoming.first()
{
Ok(vec![NodeOutput::Value(value.clone())])
} else if let Some((image, format)) = input_image {
let kind = if node.def == "input_grayscale" { Kind::Gray } else { Kind::Color };
let image = cook_bound_image(image.clone(), (w, h), kind, format, base.format);
Ok(vec![NodeOutput::Image(image)])
} else if node.def == materialcraft_core::MISSING_NODE {
let name = if node.label.is_empty() { "this node" } else { node.label.as_str() };
@@ -255,3 +241,29 @@ pub(crate) fn cook_node(
Err(error) => fail(error, key),
}
}
fn cook_bound_image(mut image: Image, size: (u32, u32), kind: Kind, mut source_format: OutputFormat, output_format: OutputFormat) -> Image {
let next = |current: u32, target: u32| {
if current < target { current.saturating_mul(2).min(target) } else { current.div_ceil(2).max(target) }
};
loop {
if (image.width(), image.height()) != size {
image = materialcraft_nodes::resize_input_level(&image, next(image.width(), size.0), next(image.height(), size.1), source_format);
}
// The first filtered level supplies RGB for conversion. Later levels read the stored gray texels.
if image.kind() != kind {
image = match kind {
Kind::Gray => {
let weight = 1.0 / 3.0;
image.map(Kind::Gray, |p| [p[2].mul_add(weight, p[1].mul_add(weight, p[0] * weight)), 0.0, 0.0, 0.0])
}
Kind::Color => image.to_color(),
};
}
image = crate::output_precision::apply(image, output_format);
if (image.width(), image.height()) == size {
return image;
}
source_format = output_format;
}
}
+4 -1
View File
@@ -1,5 +1,5 @@
use craft_texture::Image;
use materialcraft_core::{NodeId, Value};
use materialcraft_core::{NodeId, OutputFormat, Value};
use std::collections::BTreeMap;
use std::sync::atomic::AtomicBool;
@@ -15,6 +15,8 @@ pub struct Options<'a> {
pub only: Option<Vec<NodeId>>,
/// Images for the graph's input nodes, by identifier (graph instances)
pub inputs: BTreeMap<String, Image>,
/// Upstream storage precision for caller-supplied images. Unspecified floating inputs use full precision.
pub input_formats: BTreeMap<String, OutputFormat>,
/// Values for the graph's exposed parameters (graph instances), over the graph's own
pub overrides: BTreeMap<String, Value>,
/// Decodes a package resource (bitmap) by name
@@ -39,6 +41,7 @@ impl<'a> Options<'a> {
max_size: None,
only: None,
inputs: BTreeMap::new(),
input_formats: BTreeMap::new(),
overrides: BTreeMap::new(),
resource,
cancel: None,
+67
View File
@@ -339,6 +339,73 @@ fn same_size_resources_key_differently() {
assert!((second.image(bm, 0).unwrap().mean()[0] - mean).abs() > 0.05);
}
#[test]
fn bound_image_resizing_filters_normalized_levels_before_float_storage() {
let mut graph = Graph::new("levels");
graph.size = [4, 4];
graph.format = materialcraft_core::OutputFormat::F32;
let input = graph.add_node("input_color", [0.0; 2]);
let mut package = Package::new("levels");
package.graphs.push(graph);
let stripe = Image::generate(8, 8, Kind::Color, |x, _| [(x % 2) as f32; 4]);
let cache = Mutex::new(Cache::default());
for (normalized, expected) in [(true, 16384.0 / 65535.0), (false, 0.25)] {
let mut options = Options::new(&no_res);
options.inputs.insert("input".into(), stripe.clone().with_integer_sampling(normalized));
let result = cook(&package, 0, &options, &cache);
assert_eq!(result.image(input, 0).unwrap().get(1, 0, false), [expected; 4]);
assert_eq!(result.image(input, 0).unwrap().get(0, 0, false), [0.0; 4]);
}
}
#[test]
fn bound_image_resizing_filters_rgb_before_grayscale_conversion() {
let mut graph = Graph::new("Grayscale input");
graph.size = [4, 4];
graph.format = materialcraft_core::OutputFormat::F32;
let input = graph.add_node("input_grayscale", [0.0; 2]);
let mut package = Package::new("Channel order");
package.graphs.push(graph);
let level = 1.0 / 65535.0;
let stripe = Image::generate(8, 8, Kind::Color, |x, _| [if x % 2 == 1 { level } else { 0.0 }, 0.0, 0.0, 1.0]);
let mut options = Options::new(&no_res);
options.inputs.insert("input".into(), stripe.with_integer_sampling(true));
let result = cook(&package, 0, &options, &Mutex::new(Cache::default()));
let image = result.image(input, 0).unwrap();
assert_eq!(image.get(1, 0, false)[0], 0.0);
assert_eq!(image.get(2, 0, false)[0], level * (1.0 / 3.0));
}
#[test]
fn bound_image_resizing_reads_the_upstream_float_format_inside_instances() {
use materialcraft_core::{OutputFormat, SizeMode};
let (mut parent, instance) = instancing("Parent", "Resized");
let source = parent.add_node("input_grayscale", [0.0; 2]);
let base = &mut parent.node_mut(source).unwrap().base;
base.size_mode = SizeMode::Absolute;
base.size = [3, 3];
parent.connect(source, "output", instance, "input").unwrap();
let mut child = Graph::new("Resized");
child.absolute_output_size = Some([4, 4]);
let bridge = child.add_node("input_grayscale", [0.0; 2]);
child.node_mut(bridge).unwrap().base.format = OutputFormat::F32;
let output = child.add_node("output", [100.0, 0.0]);
child.connect(bridge, "output", output, "input").unwrap();
let mut package = Package::new("Stored levels");
package.graphs.extend([parent, child]);
let corners = [0x3fd0e000, 0xbfa46000, 0xc02d8000, 0x407f0000];
let image = Image::gray(8, 8, |x, y| f32::from_bits(corners[((y % 2) * 2 + x % 2) as usize]));
let mut options = Options::new(&no_res);
options.inputs.insert("input".into(), image);
let cache = Mutex::new(Cache::default());
for (format, expected) in [(OutputFormat::F32, 0x3ed5f000), (OutputFormat::F16, 0x3ed60000), (OutputFormat::F32, 0x3ed5f000)] {
package.graphs[0].node_mut(source).unwrap().base.format = format;
let cooked = cook(&package, 0, &options, &cache);
assert_eq!(cooked.nodes[&instance].error, None);
assert_eq!(cooked.image(instance, 0).unwrap().get(1, 1, false)[0].to_bits(), expected);
}
}
#[test]
fn input_nodes_read_bound_preview_images() {
let mut p = Package::new("p");
+6 -2
View File
@@ -44,7 +44,9 @@ pub fn decode(bytes: &[u8], linear: bool) -> Result<Image> {
if gray {
let luminance = decoded.into_luma16();
let data: Vec<f32> = luminance.pixels().map(|p| p.0[0] as f32 / 65535.0).collect();
return Image::from_data(w, h, Kind::Gray, data, &Limits::default()).map_err(|e| FormatError::Image(e.to_string()));
return Image::from_data(w, h, Kind::Gray, data, &Limits::default())
.map(|image| image.with_integer_sampling(true))
.map_err(|e| FormatError::Image(e.to_string()));
}
let mut data = decoded.into_rgba32f().into_raw();
@@ -56,7 +58,9 @@ pub fn decode(bytes: &[u8], linear: bool) -> Result<Image> {
}
}
Image::from_data(w, h, Kind::Color, data, &Limits::default()).map_err(|e| FormatError::Image(e.to_string()))
Image::from_data(w, h, Kind::Color, data, &Limits::default())
.map(|image| image.with_integer_sampling(linear && !float))
.map_err(|e| FormatError::Image(e.to_string()))
}
/// Encode `image` as `ext` (see [`EXPORT_FORMATS`]). `srgb`: color values are written through the sRGB curve (base color); data maps (normal, roughness…) are written linear
+11
View File
@@ -2,6 +2,17 @@ use super::*;
use craft_texture::{Image, Kind, srgb_to_linear};
use std::io::Cursor;
#[test]
fn bound_image_decoding_marks_normalized_linear_channels() {
let mut gray = Cursor::new(Vec::new());
::image::GrayImage::from_pixel(2, 2, ::image::Luma([128])).write_to(&mut gray, ::image::ImageFormat::Png).unwrap();
assert!(decode(gray.get_ref(), false).unwrap().integer_sampling());
let mut color = Cursor::new(Vec::new());
::image::RgbImage::from_pixel(2, 2, ::image::Rgb([128, 64, 32])).write_to(&mut color, ::image::ImageFormat::Png).unwrap();
assert!(decode(color.get_ref(), true).unwrap().integer_sampling());
assert!(!decode(color.get_ref(), false).unwrap().integer_sampling());
}
#[test]
fn export_every_format() {
let img = Image::generate(8, 8, Kind::Color, |x, y| [x as f32 / 7.0, y as f32 / 7.0, 0.5, 1.0]);
+1
View File
@@ -34,6 +34,7 @@ pub use parameter_definition::ParameterDefinition;
pub use parameter_descriptor::ParameterDescriptor;
pub use port_definition::PortDefinition;
pub use port_kind::PortKind;
pub use texture_sampler::resize_input_level;
pub type CookResult = Result<Vec<craft_texture::Image>, String>;
pub type Cook = fn(&CookContext<'_>) -> CookResult;
+5
View File
@@ -1,6 +1,11 @@
use craft_texture::Image;
use materialcraft_core::OutputFormat;
/// Resample a single stored input level with clamped edges at destination pixel centers.
pub fn resize_input_level(image: &Image, width: u32, height: u32, format: OutputFormat) -> Image {
Image::generate_uv(width, height, image.kind(), |u, v| sample(image, [u, v], [false; 2], format, None))
}
/// Bilinear texture filtering. Untiled axes clamp unless the caller supplies a border color.
pub(crate) fn sample(image: &Image, uv: [f32; 2], tiling: [bool; 2], format: OutputFormat, matte: Option<[f32; 4]>) -> [f32; 4] {
if !uv.iter().all(|v| v.is_finite()) {
+20
View File
@@ -95,6 +95,26 @@ With Position disconnected, both apps return zero in U8 and U16 and quiet NaN in
Four independent 32² image functions distinguish output storage from scalar parameter validation. Bind an RGBA32F field with `R=(x mod 7)-3`, `G=1` on every fourth row starting at zero and `G=0` elsewhere, `B=0` and `A=1`. Output, in turn, B/B, A/B, R/B and R/G. In U8, U16, F16 and F32 each run matches 1,024/1,024 stored samples, **16,384/16,384** overall. The mixed R/G float images each contain 256 finite values, 120 quiet NaNs, 288 positive infinities and 360 negative infinities. Every special value matches bit for bit and the maximum finite error is zero. Integer storage maps NaNs and negative infinities to zero and positive infinities to white.
### Resizing images bound to graph inputs
Bind a 128² linear image directly to a graph input, set the input bridge to the indicated storage format, and nearest-sample its output at pixel centers into RGBA32F. The CPU cook and the reference app match **4,534,272/4,534,272 pixels across 72 cases**, maximum component error zero. All four channels count toward each pixel.
| Source | Bridge | Output sides | Cases | Exact pixels / total |
|---|---|---|---:|---:|
| Original RGBA8 atlas field | Color in U8, U16, F16 and F32 | 64, 128, 256 | 12 | 344,064/344,064 |
| Original RGBA16 and signed RGBA32F fields | Color in U8, U16, F16 and F32 | 32, 64, 128, 256, 512 | 40 | 2,793,472/2,793,472 |
| Same RGBA16 and signed RGBA32F fields | Grayscale in U16 and F32 | 32, 64, 128, 256, 512 | 20 | 1,396,736/1,396,736 |
Use the RGBA8 formula under [atlas crop with wired value inputs](#atlas-crop-with-wired-value-inputs) and the signed RGBA32F field under [3D linear gradient](#3d-linear-gradient). For the RGBA16 field, map each signed input component `v` to the nearest integer to `65535*(v+4)/8`. Use seed 42 below 128² and zero otherwise. The grayscale bridge result was also read directly before expansion to RGBA.
Each factor-two step filters four clamped texels at the source storage precision, then stores the result in the bridge format. For grayscale, the first step filters the three color channels before computing the equal-weight mean. Further steps read stored grayscale. Before the fix, the 256² RGBA8 source case with an F32 bridge matched 4/65,536 pixels, maximum error 7.629395e-6. Filtering the same RGBA16 field after conversion to gray matched only 53,819/65,536 gray U16 pixels at 256².
The 256² atlas wrapper now matches 65,281/65,536 at default rotation, maximum .250003815. Its 255 differing pixels lie on the first row and column of the lower-right quadrant. Rotation .125 matches 65,089/65,536, maximum 1. The directly bound controls above and this wrapper exercise different graph connections.
With the inputs and settings under [panoramic LOD](#panoramic-lod), the four 64² seed-42 format runs now match 4,096/4,096 each, maximum zero. The 128² opaque, alpha and changed-seed outputs each match 16,128/16,384, maximum 125 byte levels. At 256² the opaque image matches 64,768/65,536, maximum 126. Both 128² flat controls match 16,128/16,384, maximum 116.
The rotated 3D planar projection runs still differ. At 128² the grayscale output matches 16,335/16,384 in LUM16, maximum 226 levels, and color matches 16,378/16,384 in RGBA8, maximum one level. At 64² both roots match 4,094/4,096 in U8 and 4,093/4,096 in each of U16, F16 and F32. The respective maxima are 1, 32, .00048828125 and .000488288701. All three default and changed-seed runs for each root match 98,304/98,304 pixels. With the [shared lookup](#basic-and-ridged-3d-perlin), ridged 3D Perlin matches all four eight-bit cases. Its changed U16, F16 and F32 runs match 16,337, 16,380 and 5,160 of 16,384 pixels, with maxima 1, .00048828125 and 1.78813935e-7.
### Pixel Processor random draws
Emit four independent calls to `rand(1)` as RGBA32F. In the reference app the four values recover a unique initial 24-bit state at each of **27,968/27,968 pixels**. Advance the state with `s=(3626811*s+51137) mod 2^24` and return `floor(s/2)/2^23`. The four outputs then match at every pixel, maximum error zero. Use square canvases of sides 8, 16, 32, 64 and 128 at seed zero, also 32² at seeds 1, 2, 42 and 137, and 32×16 and 16×32 at seeds zero and 42. The first 32² pixel starts from 9,091,073 at seed zero and 3,342,178 at seed 42.
+2 -2
View File
@@ -57,14 +57,14 @@ The first pass covered all **546 roots**, with **166 Parity** and **380 Too hard
| [3d_texture_render.sbs/position_debug](../assets/sbs/3d_texture_render.sbs) | 2 | Yes | [Parity · 14 sphere and plane cases](parity-fixes.md#position-debug) |
| [3d_texture_transform.sbs/3d_texture_offset_color](../assets/sbs/3d_texture_transform.sbs) | 1 | No | [Parity: 5 cases](parity-fixes.md#verified-cases) |
| [3d_texture_transform.sbs/3d_texture_offset_grayscale](../assets/sbs/3d_texture_transform.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
| [3d_viewer.sbs/ibl_specular_contrib_anisotropic/panoramic_lod](../assets/sbs/3d_viewer.sbs) | 1 | Yes | [In progress · input resizing and transform filtering measured](parity-fixes.md#panoramic-lod) |
| [3d_viewer.sbs/ibl_specular_contrib_anisotropic/panoramic_lod](../assets/sbs/3d_viewer.sbs) | 1 | Yes | [In progress · four 64² formats exact, larger outputs differ at row boundaries](parity-fixes.md#resizing-images-bound-to-graph-inputs) |
| [3d_volume_mask.sbs/3d_volume_mask](../assets/sbs/3d_volume_mask.sbs) | 1 | No | [In progress · box rotation and feathering differ](parity-fixes.md#3d-volume-mask-and-worley-noise) |
| [3d_worley_noise.sbs/3D_worley_noise](../assets/sbs/3d_worley_noise.sbs) | 1 | No | [In progress · random draws measured, per-pixel starting state differs](parity-fixes.md#pixel-processor-random-draws) |
| [alveolus.sbs/alveolus](../assets/sbs/alveolus.sbs) | 0 | Yes | [In progress · 64² format sweep exact, larger fields differ](parity-fixes.md#alveolus-quadrant-placement-and-falloff) |
| [angle_to_vector.sbs/angle_to_vector](../assets/sbs/angle_to_vector.sbs) | 1 | No | [Parity: 4 cases](parity-fixes.md#verified-cases) |
| [anisotropic_blur.sbs/anisotropic_blur](../assets/sbs/anisotropic_blur.sbs) | 1 | No | [In progress · first directional pass differs](parity-fixes.md#anisotropic-blur) |
| [anisotropic_blur.sbs/anisotropic_blur_grayscale](../assets/sbs/anisotropic_blur.sbs) | 1 | No | [In progress · rotated kernel differs](parity-fixes.md#anisotropic-blur) |
| [atlas_spliter.sbs/crop_and_transform_sub](../assets/sbs/atlas_spliter.sbs) | 7 | Yes | [In progress · typed pins wired, rotation and upsampling differ](parity-fixes.md#atlas-crop-with-wired-value-inputs) |
| [atlas_spliter.sbs/crop_and_transform_sub](../assets/sbs/atlas_spliter.sbs) | 7 | Yes | [In progress · wired 256² crop differs at 255 edge pixels, rotation still differs](parity-fixes.md#resizing-images-bound-to-graph-inputs) |
| [atlas_spliter.sbs/max_ba](../assets/sbs/atlas_spliter.sbs) | 1 | Yes | [Parity: 3 cases](parity-fixes.md#verified-cases) |
| [auto_crop.sbs/min_max](../assets/sbs/auto_crop.sbs) | 1 | Yes | [Parity: 3 cases](parity-fixes.md#verified-cases) |
| [auto_levels.sbs/auto_levels](../assets/sbs/auto_levels.sbs) | 1 | No | [Parity: 3 cases](parity-fixes.md#verified-cases) |