BRiDCT: Fast Two-Dimensional DCTs Using SIMD: SIMD Organization, Register Blocking, and Numerical Verification
Abstract
Repeated two-dimensional discrete cosine transforms (DCTs) require implementations that remain fast across several array sizes while preserving the mathematical transform. Fewer arithmetic operations do not guarantee a faster DCT: execution time also depends on how the computation uses the CPU's single-instruction, multiple-data (SIMD) units, registers and memory hierarchy. We implement established DCT algorithms in SIMD and compare execution strategies for forward, inverse, and normalized round-trip transforms on float32 arrays from to . The resulting library, BRiDCT, combines the Shao--Johnson factorization with SIMD lane organization, banded intermediate storage, padding, and register blocking in C11/ARM NEON. On one Apple M3 Max, the final native library has lower execution times than the tested general-purpose routes---Apple's Accelerate framework (vDSP), FFTW and Ooura---across their available cases from to . It also outperforms the tested libjxl and floating-point libjpeg-turbo routes. The compiled NumPy interface outperforms OpenCV in all 130 tested contracts per session, including squares up to and two rectangles, with call and allocation costs included. Complementary comparisons evaluate SciPy, DUCC and cached/planned pyFFTW. The measured gains come from organizing SIMD execution and intermediate storage, rather than introducing a new arithmetic factorization. A reproducible 474-input verification corpus probes cancellation, neighboring floats, dynamic range, and extreme amplitudes: all 1 260 core checks of the final configuration pass, while boundary diagnostics reveal overflow and weak-component limitations. Larger native transforms show size-dependent limits. Code, versioned releases, dataset and recorded measurements: https://github.com/antmoev/bridct.
Create a lesson
Metadata
- Categories
- eess.IV, eess.SP
- Comments
- Technical report, 13 pages, 5 figures; supplementary methods and results, 7 pages, 1 figure. Code, verification data and recorded measurements included as ancillary archives
Related papers
MouseSeg: Open Source 3D Mouse Organ and Tumor CT Segmentation in Under 10 Seconds Without GPUs
Shared title terminologyeess.IVJoseph B. Schulz, Campbell Haasch, Ohyun Kwon et al.
Toward Realistic Numerical Mouse Phantoms to Enable Virtual Imaging-based Assessment of Preclinical Multispectral Dynamic Contrast-Enhanced Photoacoustic Computed Tomography
Shared title terminologyeess.IVRefik Mert Cam, Hsuan-Kai Huang, Luke Lozenski et al.
Background2Background: a self-supervised background removal framework for high dimensional microscopy
Shared title terminologyeess.IVGuangrui Ding, Haonan Lin, Rong Tang et al.
Wrong Organ, Right Physics: Transferring Echocardiography Pretraining to Lung Ultrasound for Tuberculosis Screening
Shared title terminologyeess.IVChristiaan M. Geldenhuys, Joshua M. Jansen van Vüren, Véronique Suttels et al.
Uncertainty-driven training for three-dimensional calibrated lung nodule classification
Shared title terminologyeess.IVGiuseppe Tripodi, Alessandro De Rosis, Saleh Rezaeiravesh
Discrete cosine-sine transform and fast 16-point integer cosine-sine transform low-complexity for video coding
Shared title terminologyeess.IVLev Hnativ, Yaroslav Luts