Skip to content

D3D12: Implement HEVC video encode and decode

The following MR implements the necessary changes to implement HEVC encode and decode in the d3d12 driver, as well as extending some of the common pipe structures and the va frontend with more capabilities like multi slice and multi L0/L1 reference encoding.

With this change, these are the enabled VA entrypoints for D3D12:

vainfo: VA-API version: 1.16 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 22.3.0-devel for D3D12
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileNone                   : VAEntrypointVideoProc

The changes were tested using VAAPI in mpv for decode and FFMpeg for encode and decode. For the encode cases, different bitrates, slice modes and group of picture structures were used. For the decode cases, a set of conformance HEVC bitstreames were used and compared against their md5 reference.

Finally, some d3d12 video bug fixes commits are also added as well.

Edited by Sil Vilerino

Merge request reports