Repository navigation
1.5.0
Changelog 1.5.0
Added
- SIMD Grayscale: Implemented architecture-specific SIMD instructions (NEON/SSE) for
ph_to_grayscale, processing 8-16 pixels per iteration. - Context Scratchpad: Introduced a managed
scratchpadbuffer withinph_context_tto eliminate heap allocations during the hashing hot path. - Benchmark Suite: Added
make benchmarkutility for high-resolution timing and performance regression tracking of all algorithms.
Improved
- pHash Optimization: Improved performance by ~4.5x through pruned DCT (calculating only the required 8x8 grid) and precision tuning.
- Fixed-Point Arithmetic: replaced
doubleprecision inph_resize_bilinearandph_resize_boxwith 16.16 fixed-point math, removing FPU bottlenecks. - wHash Performance: Optimized box-sampling and memory reuse, resulting in a ~1.2x speedup.
- Separable Gaussian Blur: Refactored 3x3 blur into two 1D passes, improving cache locality and reducing total operations.
- Precision Refactoring: Switched internal pHash and wHash calculations from
doubletofloatto increase speed while maintaining perceptual accuracy.
Fixed
- Memory Pressure: Eliminated redundant
malloc/freecalls in primary functions by utilizing the new scratchpad architecture. - FPU Overhead: Reduced costly float-to-int conversions in resizing and transformation routines.
PR
- [1.5.0]: SIMD optimizations, fixed-point resizing, and zero-allocation architecture by @gudoshnikovn in #4
Full Changelog: 1.3.0...1.5.0