#5721·HandBrake

Improve hardware encoding/decoding and filters

Author: galad87Created Jan 25, 2024Updated Aug 28, 2026
LabelsEnhancementPatch / Help Welcome

Here's an hopefully complete table of the current state of hardware acceleration. Lately I ported some small filters to Metal, some were ports of OpenCL and CUDA libavformat filters, others were ports of CPU filter. It's quite easy to go from one shading languages to another, porting them to another API would be quite easy work.

Going forward, I think the best course of action would be to port them to Vulkan, and avoid yet another API for each GPU vendor. Libavfilter has very few GPU accelerated filters, some for CUDA, some others for OpenCL and Vulkan, so there isn't too much that can be reused.

Anyway, this all depends on external help and hopefully on some new contributors.

Feature QSV NV AMD VT
Decoding
Encoding
HW download4
HW upload5
Prefilter6 ✅1 ✅2 ✅3
Detelecine
Comb detect
Decomb
Yadif
Bwdif
Framerate Shaper
Deblock
HQDN3D
NLMeans
Chroma Smooth
Rotate ✅1 ✅3
Render Sub
Crop & Scale ✅1 ✅3
Lapsharp
Unsharp
Grayscale
Pad
Colorspace
Format ✅1 ✅3
  1. QSV VPP libavfilter;
  2. scale_cuda & colorspace_cuda filters, rotate is not supported;
  3. VideoToolbox VTPixelTransferSessionRef and VTPixelRotationSessionRef filters;
  4. Meaning the ability to copy a frame from the hardware decoder memory to CPU memory;
  5. Meaning the ability to copy a frame from CPU memory to GPU memory to allow GPU accelerated filtering;
  6. Filters run inside decavcodec.c to handle unexpected video size, format, and range changes mid stream;