Skip to main content

haar_transform_i32

Function haar_transform_i32 

Source
pub fn haar_transform_i32(data: &mut [i32]) -> Status
Expand description

In-place, non-normalized Haar Transform for i32: a forward-only, integer-exact decomposition using only wrapping add/subtract (no scaling), analogous to fwht_i32. Because the transform is non-normalized, an exact-integer inverse does not exist in general (undoing it requires dividing by powers of 2 that may not evenly divide intermediate sums); use haar_transform_f32 / inverse_haar_transform_f32 when an invertible round trip is required.

data.len() must be a power of 2 (e.g. 2, 4, 8, …, 1024).