Files
FFmpeg/libswscale
Niklas Haas 2589ce4a2c tests/swscale: unref buffers before each iteration
Otherwise, we always pass frames that already have buffers allocated, which
breaks the no-op refcopy optimizations.

Testing with -p 0.1 -threads 16 -bench 10, on an AMD Ryzen 9 9950X3D:

 Before:
  Overall speedup=2.776x faster, min=0.133x max=629.496x
  yuv444p 1920x1080 -> yuv444p 1920x1080, flags=0x100000 dither=1
     time=9 us, ref=9 us, speedup=1.043x faster

 After:
  Overall speedup=2.721x faster, min=0.140x max=574.034x
  yuv444p 1920x1080 -> yuv444p 1920x1080, flags=0x100000 dither=1
    time=0 us, ref=28 us, speedup=516.504x faster

(The slowdown in the legacy swscale case is from swscale's lack of a no-op
refcopy optimizaton, plus the fact that it's now actually doing memory
work instead of a no-op / redundant memset)

Signed-off-by: Niklas Haas <git@haasn.dev>
2026-03-11 08:05:08 +00:00
..
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2026-03-01 21:57:53 +00:00
2026-03-01 21:57:53 +00:00
2025-07-22 19:56:34 +02:00
2026-03-09 11:25:57 +01:00
2025-09-01 19:28:35 +02:00
2026-02-26 18:36:46 +00:00