Multi-level forward (analysis) and inverse (synthesis) DWT of one frame of N real samples with periodic boundary extension, matching PyWavelets wavedec / waverec with mode="periodization" for the wavelets listed in helia_dwt_wavelet_t.
Each direction has three entry points with one contract:
Entry point
Implementation
helia_dwt_forward_f32()
MVE when the build targets floating-point MVE (__ARM_FEATURE_MVE & 2) and ARM_MATH_AUTOVECTORIZE is not defined, optimized scalar otherwise
helia_dwt_forward_scalar_f32()
optimized scalar, on every target
helia_dwt_reference_forward_f32()
readable scalar reference (the test oracle)
and likewise helia_dwt_inverse_f32(), helia_dwt_inverse_scalar_f32() and helia_dwt_reference_inverse_f32(). The implementation behind helia_dwt_forward_f32() is fixed by the preprocessor when the library is compiled; no entry point chooses among implementations at run time, so an application that calls one entry point links one implementation.
Every entry point evaluates each output as the reference does, without fused multiply-add. A forward output is a sum, starting at +0.0f, of the products of one tap and one sample, added in tap order. An inverse output starts at +0.0f; for each input i in increasing order and each tap t in increasing order it accumulates lo[t] * a[i] + hi[t] * d[i], the two products added together first. Under that rule the optimized and MVE implementations are required to return results identical bit for bit to the reference on the library’s test corpus, which is a test gate, not a proof for all finite inputs. The library compiles these sources without fast-math and without floating-point contraction whatever flags the application uses.
Signed zero: in the qualified domain every zero output is +0.0f, from every entry point, and an input of -0.0f gives the same result as an input of +0.0f. Every sum starts at +0.0f, and under round to nearest adding a zero leaves a sum’s value, and an exact cancellation gives +0.0f. This follows from the evaluation rule; the library’s tests check it with each zero sample of three input patterns as +0.0f and as -0.0f.
Reconstruction is not exact: an inverse following a forward transform returns the input up to f32 rounding (see the library’s test report for measured errors).
The entry points do not check for NaN or infinity. Such inputs are outside the qualified domain, and no result is specified for them.
helia_dwt_workspace_size_f32functionNumber of f32 workspace elements every forward and inverse entry point requires for S.
helia_dwt_forward_f32functionForward DWT: MVE implementation on targets with floating-point MVE, unless the library is built with ARMMATHAUTOVECTORIZE (CMake AUTOVECTORIZE=ON), optimized s…
helia_dwt_inverse_f32functionInverse DWT: MVE implementation on targets with floating-point MVE, unless the library is built with ARMMATHAUTOVECTORIZE (CMake AUTOVECTORIZE=ON), optimized s…
Configuration of a DWT of fixed frame size and depth.
Created by helia_dwt_init_f32() and read-only afterwards. The layout is the same in every build configuration. Process functions do not check the fields; an instance not produced by helia_dwt_init_f32() is undefined behaviour.
Supported configurations: 1 <= levels <= 30, frame_size a nonzero multiple of 2^levels and at most UINT32_MAX / 2, and wavelet one of helia_dwt_wavelet_t. The coarsest stage therefore filters 2 or more samples; stages shorter than the filter wrap periodically as PyWavelets does. No implicit padding is applied.
Forward DWT: MVE implementation on targets with floating-point MVE, unless the library is built with ARMMATHAUTOVECTORIZE (CMake AUTOVECTORIZE=ON), optimized s…
Forward DWT: MVE implementation on targets with floating-point MVE, unless the library is built with ARM_MATH_AUTOVECTORIZE (CMake AUTOVECTORIZE=ON), optimized scalar implementation otherwise.
Inverse DWT: MVE implementation on targets with floating-point MVE, unless the library is built with ARMMATHAUTOVECTORIZE (CMake AUTOVECTORIZE=ON), optimized s…
Inverse DWT: MVE implementation on targets with floating-point MVE, unless the library is built with ARM_MATH_AUTOVECTORIZE (CMake AUTOVECTORIZE=ON), optimized scalar implementation otherwise.