From c6612da7986ada222eeff03b8b9798b14811c00f Mon Sep 17 00:00:00 2001 From: arnav-hiwarkar Date: Wed, 18 Nov 2026 15:46:04 +0530 Subject: [PATCH] #3830: tell a 3-entry .3dl mesh apart by the row count alone --- crates/effects/src/ocio/lut.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/effects/src/ocio/lut.rs b/crates/effects/src/ocio/lut.rs index 8424e33cd..8674d9bd9 100644 --- a/crates/effects/src/ocio/lut.rs +++ b/crates/effects/src/ocio/lut.rs @@ -77,12 +77,8 @@ pub(super) fn parse_3dl_limited(text: &str, max_side: usize) -> Option { return None; } } - let is_cube = |k: usize| { - let n = (k as f64).cbrt().round() as usize; - n * n * n == k - }; - // A 3-entry input mesh (3³ lattice) looks like a data row: tell them apart by the count. - if mesh.is_none() && !is_cube(rows.len()) && rows.len() == 28 { + // A 3-entry input mesh (3³ lattice) looks like a data row: 28 rows are a mesh and 27. + if mesh.is_none() && rows.len() == 28 { mesh = Some(rows.remove(0).to_vec()); } let n = match &mesh {