Windows 11 gets native Video Encode API for DirectX 12
Microsoft this week its new Video Encode application programming interface (API) for DirectX 12. The API is designed to enable third-party applications to accelerate video encoding using GPUs and will provide them abilities to tweak various aspects of the encoding process. The technology offers a consistent approach for video apps by providing a standard standard process for GPU-accelerated video encoding.
Microsoft’s DirectX 12 already features APIs to support GPU acceleration for video decoding, video processing, and motion estimation, which covers the requirements of the vast majority of end-users outside of the professional video industries. Those who need video encoding use professional applications that support GPU-accelerated encoding, but that encoding is implemented using proprietary means and requires developers to work closely with GPU vendors as there is no standard approach for video encoding.
With the release of the Video Encode API for DirectX 12, Microsoft is changing that and provides a standard for video decoding on Windows 11. All proprietary technologies will continue to be supported, but from now on companies will be able to take advantage of the standard API.
At this point Microsoft’s Video Encode API for DirectX 12 supports H.264 and H.265 (HEVC) codecs, which are popular among both professional and non-professional audiences. Meanwhile, those professionals who need other codecs, including AV-1, H.266 (VVC) will continue to rely on other encoding technologies (most of which are CPU-accelerated).
As far as technological implementation is concerned, the API takes each video frame represented by ID3D12Resource textures and compresses them into an ID3D12Resource buffer that contains the slice headers and payload of each encoded frame. Right now, only DXGI_FORMAT_NV12 and DXGI_FORMAT_P010 are available depending on driver support, so input content may need to be color converted and down sampled previously by the application. The rest of the bitstream codec headers (i.e. SEI/VUI/VPS/SPS/PPS) is assigned to the application, which will create and pack them into the final bitstream along with the compressed bitstream taken from the GPU operation for each frame.
Microsoft’s Video Encode API for DirectX 12 offers exposes multiple configurable parameters for applications (and the end user) to allow tweaking many aspects of the encoding process, which will be particularly useful for professionals.
The Video Encode API is included as part of Windows 11 and is also available in the (version 1.700.10-preview or newer). Drivers from Intel and Nvidia already support the new API, driver support from AMD is coming in Q2 2022.
Vendor | Minimum Supported Platforms | Minimum Video Driver Version |
AMD | Radeon RX 5000, Ryzen 2000 | In development – ETA Q2 2022 |
Intel | Ice Lake, Tiger Lake, Alder Lake | v30.0.100.9955 |
Nvidia | GeForce GTX 1000, GeForce RTX 2000, Nvidia RTX, Quadro RTX | v471.41 |