Skip to content

1.5.0

Choose a tag to compare

@gudoshnikovn gudoshnikovn released this 18 Feb 20:31
· 552 commits to main since this release

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 scratchpad buffer within ph_context_t to eliminate heap allocations during the hashing hot path.
  • Benchmark Suite: Added make benchmark utility 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 double precision in ph_resize_bilinear and ph_resize_box with 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 double to float to increase speed while maintaining perceptual accuracy.

Fixed

  • Memory Pressure: Eliminated redundant malloc/free calls 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