1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-28 15:19:38 +03:00
Files
ffmpeg/libavfilter
Niklas Haas d241c80e59 avfilter/x86/vf_colordetect: avoid calling C code for tail handling
Instead, we can just call the SIMD function a second time. This will reprocess
a few overlapping pixels, but that is safe since this function is read-only
and idempotent.

We only need to bail to the C function if the overall width is smaller than
a single SIMD vector.

checkasm:
 - CPU: AMD Ryzen 9 9950X3D 16-Core Processor (00B40F40)
 - Timing source: x86 (rdtsc)
 - Bench duration: 100000 µs per function (462406519 cycles)
 - Random seed: 555761032

Benchmark results:
  name                                  cycles (vs ref)
  detect_alpha_8_full_c:                7884.5
  detect_alpha_8_full_avx2:              439.9 (17.88x)
  detect_alpha_8_full_avx512icl:         262.8 (30.00x)
  detect_alpha_8_full_off_c:            7884.0
  detect_alpha_8_full_off_avx2:          456.3 (17.27x)
  detect_alpha_8_full_off_avx512icl:     267.3 (29.49x)
  detect_alpha_8_limited_c:            13452.5
  detect_alpha_8_limited_avx2:          1163.5 (11.56x)
  detect_alpha_8_limited_avx512icl:      650.9 (20.67x)
  detect_alpha_16_full_c:               3696.1
  detect_alpha_16_full_avx2:             426.4 ( 8.67x)
  detect_alpha_16_full_avx512icl:        262.6 (14.07x)
  detect_alpha_16_full_off_c:           3698.7
  detect_alpha_16_full_off_avx2:         454.7 ( 8.13x)
  detect_alpha_16_full_off_avx512icl:    267.1 (13.85x)
  detect_alpha_16_limited_c:            8215.9
  detect_alpha_16_limited_avx2:         1288.4 ( 6.38x)
  detect_alpha_16_limited_avx512icl:     691.3 (11.88x)
  detect_range_8_c:                     1411.0
  detect_range_8_avx2:                   281.6 ( 5.01x)
  detect_range_8_avx512icl:              168.7 ( 8.36x)
  detect_range_16_c:                    1334.4
  detect_range_16_avx2:                  228.6 ( 5.83x)
  detect_range_16_avx512icl:             139.7 ( 9.50x)

Sponsored-by: nxtedition AB
Signed-off-by: Niklas Haas <git@haasn.dev>
2026-09-01 13:15:06 +02:00
..
2023-11-18 19:55:42 +01:00
2024-08-19 21:48:04 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2024-08-19 21:48:04 +02:00
…
…
…
…
…
2024-08-19 21:48:04 +02:00
2025-12-14 12:41:00 +05:30
…
…
2025-08-03 13:48:47 +02:00
…
…
2024-08-19 21:48:04 +02:00
…
…
…
2024-08-19 21:48:04 +02:00
…
…
2025-08-03 13:48:47 +02:00
2024-07-01 22:31:02 +02:00
2024-08-19 21:48:04 +02:00
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2024-08-19 21:48:04 +02:00
…
2024-02-16 21:34:38 +01:00
2025-06-15 21:00:38 +05:30
2025-10-16 18:41:19 +02:00
2025-07-04 01:32:27 +02:00
2025-07-04 01:32:27 +02:00
2026-05-15 20:29:29 +02:00
2026-05-15 20:29:29 +02:00
2025-08-03 13:48:47 +02:00
…
2025-08-03 13:48:47 +02:00
…
…