Files
ffmpeg/libavcodec
Lynne c9a6817e3d ffv1enc_vulkan: replace the float32 bitonic sort with a radix sort
The bitonic sort needed a 64 KiB shared buffer, more than some devices
have, and for larger slices sorted in place in an unqualified buffer
with a memoryBarrierBuffer() after the barrier, which under the Vulkan
memory model does not make the writes visible to other invocations. It
also takes log2(N)^2/2 barriers, 91 for the UHD slices, and a slice of
millions of pixels times out the GPU.

Replace it with an LSD radix sort, 4 bits per pass, between the pairs
region of a plane and a scratch region. Each subgroup owns a block of
rows of elements, one per lane, and ranks them with ballots from the
digit counts of the blocks, which take up to 16 KiB of shared memory.
The bitmaps of the planes now follow the pairs of all planes, as the
setup shader only fills them once the sort is done, so their region
serves as the scratch and the buffer keeps its size.

At UHD with the default slicing on an RX 6900 XT, the sort of a frame
goes from 14 ms to 3.4 ms.
2026-09-24 08:03:43 +09:00
..
2026-06-17 17:34:24 +09:00
2026-09-02 22:31:34 +02:00
2026-09-10 18:23:50 +00:00
…
2026-09-02 22:31:34 +02:00
2026-09-12 23:52:20 +00:00
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
2026-07-01 21:05:27 +09:00
2026-07-01 21:05:27 +09:00
2026-09-12 23:52:20 +00:00
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-02 22:31:34 +02:00
…
…
…
…
…
…
…
…
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
2026-06-23 19:15:57 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
2026-09-10 18:23:50 +00:00
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
2026-04-28 14:31:19 +02:00
…
…
…
…
…
…
…
2026-04-28 12:29:37 +00:00
…
…
…
…
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
2026-05-03 16:56:43 +02:00
…
…
2026-08-09 17:26:53 +02:00
…
2025-11-26 15:16:42 +01:00
2026-09-06 00:48:26 +02:00
…
2026-04-28 12:29:37 +00:00
…
…
…
…
…
2025-11-08 18:48:54 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-08-03 13:48:47 +02:00
…
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
…
2026-09-12 23:52:20 +00:00
…
…
…
…
2026-06-03 14:12:50 +09:00
…
2025-08-03 13:19:25 +00:00
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
…
2025-07-03 20:35:23 +02:00
…
…
…
…
…
…
…
…
2025-10-30 03:41:24 +01:00
2025-06-23 17:16:42 +10:00
…
…
…
…
…
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
…
2025-08-03 13:48:47 +02:00
…
…
2026-06-23 19:15:57 +02:00
…
…
…
2026-03-10 13:52:19 +01:00
…
…
…
2025-06-06 17:21:37 +02:00
…
…
…
2025-08-03 13:19:25 +00:00
…
…
…
2026-06-23 19:15:57 +02:00
…
…
2025-07-20 01:05:23 +02:00
…
…
…
…
…
…
2025-12-13 18:45:17 -03:00
…
…
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
…
…
2026-05-03 18:23:03 +02:00
…
…
…
…
2026-07-07 17:35:58 +00:00
2026-07-07 17:35:58 +00:00
…
…
…
…
2026-06-13 15:55:40 +00:00
2025-12-30 17:30:45 +00:00
…
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
…
…
…
2026-09-12 23:52:20 +00:00
2026-01-02 18:39:48 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-08-03 13:48:47 +02:00
2025-08-03 13:48:47 +02:00
2026-05-02 21:39:02 +00:00
…
…
2025-08-03 13:48:47 +02:00
…
…
…
2026-06-23 17:15:02 +02:00
…
2026-07-28 17:54:07 +02:00
…
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
2026-01-10 22:47:22 +01:00
2026-02-04 12:05:35 +08:00
2026-02-04 12:05:35 +08:00
2026-09-12 23:52:20 +00:00
…
…
…
2026-09-24 08:02:22 +09:00
2026-09-24 08:02:22 +09:00
2026-07-01 21:05:27 +09:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-10 13:52:19 +01:00
…
…
2025-07-03 20:34:51 +02:00
…
…
…
2025-08-03 13:48:47 +02:00
…
…
2025-07-03 20:35:23 +02:00
…
…
2026-02-19 22:39:35 +00:00
…
…
…
…
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
…
…
2025-08-11 11:54:31 +02:00
…
…
…
2026-05-03 18:22:24 +02:00
…
2026-09-12 23:52:20 +00:00
2026-09-12 23:52:20 +00:00
…
…
…
…
…
…
…
…
…
…
2026-03-02 19:01:46 +01:00
2026-09-12 23:52:20 +00:00
…
…
…
…
2025-08-03 13:48:47 +02:00
…
…
…
…
…
2026-08-13 13:17:59 +02:00
…
…
…
…
…
2026-09-12 23:52:20 +00:00
…
2026-09-21 21:23:33 +00:00
…
…
…
…
2026-08-09 17:25:23 +02:00
…
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
2026-08-09 17:25:23 +02:00
…
…
…
…
…
…
…
…
2026-03-10 13:52:18 +01:00
…
…
2026-06-23 19:15:57 +02:00
…
2026-04-28 12:29:37 +00:00
…
…
2025-08-03 13:48:47 +02:00
…
2025-06-21 22:08:52 +02:00
…
…
2025-08-03 13:48:47 +02:00
…
…
…
2026-07-28 17:54:07 +02:00
2025-08-20 11:20:14 +02:00
…
…
…
…
…
…
2026-03-10 13:52:19 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-06-23 19:15:57 +02:00
…
…
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2026-03-16 10:24:33 +00:00
…
…
…
…
…
…
…