Skip to content

libvmaf-fast-v1

Choose a tag to compare

@4KVCD 4KVCD released this 08 Oct 20:28
· 4 commits to fast since this release

An unofficial fork of Netflix's libvmaf, not affiliated with or endorsed by Netflix. Built from fast at 867efb83: upstream libvmaf master at b41d2340 with 13 upstream pull requests merged, and the Vulkan engine (fast/). See the README.

What's new

  • VMAF + NEG on Vulkan: 2.3x to 5.6x as fast.
  • VMAF v1: 3.3x to 6.0x as fast, CAMBI and SpEED's filtering now on the GPU (Intel iGPU: 1.2x).
  • PSNR 2.0x to 3.1x and SSIM 1.9x to 4.1x as fast, the same scores.
  • XPSNR in libvmaf: 5.2x to 16x as fast as FFmpeg's xpsnr filter, the same scores.
  • libvmaf CUDA: 35% less GPU memory (4K VMAF + NEG), and 5.5x as fast with host pictures from vmaf_cuda_fetch_preallocated_picture, now pooled.
  • CUDA through the Python bindings: 1.6x to 1.8x as fast; they upload only the luma.
  • Frames from AMD's hardware decoder without a CPU copy (on Vulkan); VMAF v1 reads Direct3D 11 textures.
  • Upstream pull requests Netflix#1382 and Netflix#1645 merged; libvmaf updated to upstream master (its MSVC build, NEON ADM, vmaf_picture_convert).
  • Reproducible builds: the same bytes wherever the checkout is.

Frames per second, 3.2.0-fast.1 → this release:

4K RTX 5090, Core Ultra 9 285K Intel iGPU, Core Ultra 9 285K Radeon 8060S, Ryzen AI Max+ 395 Radeon 780M, Ryzen 7 8845HS
VMAF + NEG, Vulkan 356 → 855 (2.4x) 15 → 71 (4.6x) 72 → 401 (5.6x) 26 → 92 (3.5x)
VMAF + NEG, CUDA 152 → 269 (1.8x)
VMAF v1, GPU 95 → 567 (6.0x) 42 → 51 (1.2x) 94 → 313 (3.3x) 28 → 143 (5.1x)
PSNR 169 → 452 (2.7x) 137 → 422 (3.1x) 174 → 340 (2.0x)
SSIM 118 → 451 (3.8x) 221 → 421 (1.9x) 73 → 304 (4.1x)
1080p RTX 5090, Core Ultra 9 285K Intel iGPU, Core Ultra 9 285K Radeon 8060S, Ryzen AI Max+ 395 Radeon 780M, Ryzen 7 8845HS
VMAF + NEG, Vulkan 1294 → 2933 (2.3x) 59 → 268 (4.5x) 317 → 1700 (5.4x) 100 → 341 (3.4x)
VMAF + NEG, CUDA 432 → 674 (1.6x)
VMAF v1, GPU 430 → 1960 (4.6x) 167 → 192 (1.2x) 437 → 1811 (4.1x) 117 → 533 (4.5x)
PSNR 586 → 1167 (2.0x) 827 → 1849 (2.2x) 498 → 1131 (2.3x)
SSIM 408 → 945 (2.3x) 656 → 1289 (2.0x) 248 → 570 (2.3x)

The Intel iGPU is in the RTX 5090's PC; it has no CUDA or CPU rows of its own.

Measured with the release benchmark (fast/BENCHMARK.md); the comparison with official libvmaf is in the README.

Bug fixes

  • libvmaf CUDA: a failed GPU transfer of the distorted picture went unnoticed, and the frame was scored against an empty picture.
  • VMAF v1 failed where the model's folder or the Temp folder has letters outside ASCII in its path.
  • A buffer the engine could not allocate left a dangling pointer, read when the context was closed.
  • Two threads starting the engine at once could both create its Vulkan instance.
  • V1Scorer.close unpinned libvmaf's pictures after libvmaf had freed them.

Changes that need attention

  • VmafPicture has a new member (color, from upstream): programs built against 3.2.0-fast.1's headers must be rebuilt.
  • vmaf_picture_convert is exported but returns -ENOTSUP: this build has no zimg.
  • libvmaf.dll now contains XPSNR, ported from FFmpeg under the LGPL 2.1 or later (licenses/LICENSE.xpsnr.txt); the rest stays BSD-2-Clause-Patent.

In the archive (Windows x64)

  • libvmaf/libvmaf.dll: libvmaf with CUDA, its public C API, built-in models, static C runtime. Reports version 867efb83.
  • vmaf_vulkan/vmaf_vulkan.dll: VMAF, NEG and VMAF v1's features on any GPU with Vulkan 1.1.
  • Licences for each, BUILD.txt, and SHA256SUMS of every file.

Checked

With these DLLs, on an RTX 5090 (driver 616.92) and the Core Ultra 9 285K's integrated GPU (driver 32.0.101.8860):

  • Vulkan VMAF and NEG identical to CUDA in all 45 cases of compare_vmaf_vulkan.py --matrix; VMAF v1 identical to libvmaf's CPU code in all 73 of compare_vmaf_v1.py --matrix.
  • diagnose_vmaf_vulkan.py: every sum matches the reference. vulkan.probe() and v1.probe() pass.
  • libvmaf's C tests with CUDA: 33 pass (test_cuda_vif_order, from Netflix#1614, does not build on Windows).

On a Radeon 8060S (Ryzen AI Max+ 395, driver 32.0.12079.1014), which has no CUDA: the self-tests pass, diagnose_vmaf_vulkan.py matches the reference, VMAF v1 is identical in all 73 cases, and its builds of both DLLs are the main PC's byte for byte.

Thanks

The merged CUDA fixes are the work of StormBytePP, jmsether, lusoris, BardieJoensen and shin.han, in their pull requests to Netflix/vmaf (listed in the README).