mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-24 02:09:03 +03:00
This allows us to add a threshold for alpha comparisons to the full range path as well. The AArch64 changes were LLM-assisted, since I'm not familiar with that architecture. However, the logic checks out to me. Also adjusts the checkasm test to make sure there are no rounding differences between the C and assembly implementations. Tested correct across 100k seeds on x86. checkasm: - CPU: AMD Ryzen 9 9950X3D 16-Core Processor (00B40F40) - Timing source: x86 (rdtsc) - Bench duration: 100000 µs per function (432788090 cycles) - Random seed: 4076092999 Benchmark results: (old) name cycles (vs ref) detect_alpha_8_full_c: 4670.7 detect_alpha_8_full_avx2: 856.6 ( 5.45x) detect_alpha_8_full_avx512icl: 667.5 ( 7.00x) detect_alpha_16_full_c: 2705.7 detect_alpha_16_full_avx2: 693.1 ( 3.90x) detect_alpha_16_full_avx512icl: 546.4 ( 4.94x) Benchmark results: (new) name cycles (vs ref) detect_alpha_8_full_c: 7988.5 detect_alpha_8_full_avx2: 1078.0 ( 7.41x) detect_alpha_8_full_avx512icl: 876.7 ( 9.11x) detect_alpha_16_full_c: 3734.7 detect_alpha_16_full_avx2: 814.6 ( 4.58x) detect_alpha_16_full_avx512icl: 613.8 ( 6.08x) Sponsored-by: nxtedition AB Signed-off-by: Niklas Haas <git@haasn.dev>