Commit Graph

13 Commits

Author SHA1 Message Date
pete 0840e3a55e Make all builds ISA invariant, and remove option 2021-02-15 08:44:58 +00:00
pete 1639c88f49 Use vfloat4 to back float3 types, allowing SIMD 2021-02-14 00:48:08 +00:00
pete 8a12563e18 Fix vint4.set_lane on SSE2 2021-02-13 19:31:07 +00:00
pete 01d4caaf08 Replace int4/uint4 with vint4 and remove vtype4 2021-02-13 17:03:29 +00:00
pete 0b9c1b23c7 Add more vint4 functions to SIMD library 2021-02-13 16:17:16 +00:00
Pete Harris affbeea396 Migrate to vfloat4 everywhere (#212)
Prior to this PR we had two vec4 implementations for floats, the legacy "float4" and the newer "vfloat4". The newer vfloat4 is a superset of the capabilities of the float4, and using it everywhere would give other opportunities to optimize by e.g. using the conditional select functionality rather than scalarizing chunks of vector code.

This patch is just the basic migration - where possible I've translated the original code without additional refactoring. Further optimizations to make better use of the vfloat4 functionality will come later. Overall this patch has no impact on IQ or performance, but does give a slight reduction in code size.
2021-02-11 09:15:26 +00:00
pete e824c20106 Remove data table for angular steppings an stepsizes
This replaces the angular_steppings table with a computationally
generated one, where the steppings are evenly spaced 1-40.
This isn't quite as effective, reducing quality by up to 0.05dB,
but improves performance by 3-6%.
2021-01-20 20:52:25 +00:00
pete 2618393f53 Add more functions to vector library 2021-01-13 00:45:18 +00:00
pete 524c27e257 Make scalar and vector horizontal vector ops 2021-01-13 00:17:41 +00:00
Pete Harris 39f0260928 Implement optimizations for compute_error_squared_rgb/a() (#198)
This implementation alters the algorithm and vectorizes these two functions.

The algorithm change will have a minor image quality impact; it now uses a faster approximation for selecting which component to assign to a second plane when choosing a partition. There is an insignificant IQ hit on -medium (under < 0.01dB), as we rarely use two planes anyway, and a slightly larger one on -thorough (under < -0.05dB). The significant (>10%) performance gain on -thorough is worth the quality loss (i.e. users are more likely to use -thorough if it's faster, and the overall IQ gain vs medium is still net positive).
2021-01-11 22:10:03 +00:00
Pete Harris 1b90f69a61 Implement SIMD optimized compute_error_for_weight_set (#197)
This PR vectorizes the implementation of the compute_error_for_weight_set() function using the vector-length agnostic SIMD support. It is bit-exact with the original implementation, so no image diffs are expected.

To make this vectorizable it needs to switch some structures from AOS to SOA, but we can't use these everywhere, so we duplicate some data tables in the decimation table and store both array orderings.

5-7% faster for -thorough
2-4% faster for -medium
1-2% faster for -fast
Neutral for -fastest
2021-01-11 22:05:05 +00:00
pete abba3c6c77 Enable full None SIMD vfloat4 and enable in unit tests 2021-01-01 23:44:22 +00:00
Pete Harris fb388737fb Add Arm aarch64 builds and NEON acceleration (#191)
This PR adds support for Arm aarch64 builds, including the corresponding NEON accelerated vector library.

As part of this work I also improved testing:

- Native C++ unit tests support using `googletest` integrated into CMake/CTest. 
- First unit test suite added, for 4-wide SIMD implementations.
- Command line functional tests can target any build, not just AVX2.
2021-01-01 23:27:18 +00:00