In January 2022, I was hired on UpWork by Greg and Andrew from Video Village to port their excellent OpenFX plugins for DaVinci Resolve from macOS to Windows/Linux:

  • Filmbox: Really good film emulation.
  • Scatter: Physically accurate diffusion.

Originally, these plugins were written using Apple’s Core Image and customized Metal kernels and are able to process FullHD and 4K sequences in realtime in DaVinci Resolve on macOS.

My goal was to reproduce the exact same results and performances on Windows/Linux using NVIDIA CUDA and NVIDIA Performance Primitives.

As CUDA is low level compared to Apple’s Core Image, many functionalities has been rewritten from scratch with manually optimized CUDA kernels.

Filmbox Windows/Linux was released in January 2023 and Scatter Windows/Linux was released in June 2023. Scatter took longer to release to be able to get Gaussian/Disc/Box filters with large radius run in real-time with a quality similar to Apple’s Core Image. As filter complexity grows exponentially with radius size, I had to come with an innovative way to compute these filters.

The build system was migrated to CMake to be able to compile the same sources (C/C++, Swift, Metal, CUDA) on macOS, Windows and Linux.

Tests were added using Catch2 to ensure that all versions gives the same results and to benchmark individual part of the plugins (Halation, GateWeave, Dust, colorspace conversion, LUT, filters, …)

Resulting algorithms were profiled using NVIDIA Visual Profiler and NVIDIA NSight to get the best performance on recent RTX GPUs as on older Geforce GPUs.

If you are willing to write new OpenFX plugins or to optimize existing Metal/OpenCL/CUDA code, don’t hesitate to contact me to discuss your project.