vaapi: decode vp9 and av1 (#1181)

This commit is contained in:
Jason Dove
2023-02-27 05:57:13 -06:00
committed by GitHub
parent 450ea063b4
commit eddbf07b11
3 changed files with 28 additions and 0 deletions
+3
View File
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Added
- Use VP9 and AV1 hardware-accelerated decoders with VAAPI when available
### Fixed
- Align default docker image (no acceleration) with new images from [ErsatzTV-ffmpeg](https://github.com/jasongdove/ErsatzTV-ffmpeg)
- Fix some transcoding pipelines that use software decoders
@@ -14,4 +14,9 @@ public class VaapiProfile
public const string Vc1Advanced = "VAProfileVC1Advanced";
public const string HevcMain = "VAProfileHEVCMain";
public const string HevcMain10 = "VAProfileHEVCMain10";
public const string Vp9Profile0 = "VAProfileVP9Profile0";
public const string Vp9Profile1 = "VAProfileVP9Profile1";
public const string Vp9Profile2 = "VAProfileVP9Profile2";
public const string Vp9Profile3 = "VAProfileVP9Profile3";
public const string Av1Profile0 = "VAProfileAV1Profile0";
}
@@ -70,6 +70,26 @@ public class VaapiHardwareCapabilities : IHardwareCapabilities
(VideoFormat.Hevc, "main 10" or "2") =>
_profileEntrypoints.Contains(
new VaapiProfileEntrypoint(VaapiProfile.HevcMain10, VaapiEntrypoint.Decode)),
(VideoFormat.Vp9, "profile 0" or "0") =>
_profileEntrypoints.Contains(
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile0, VaapiEntrypoint.Decode)),
(VideoFormat.Vp9, "profile 1" or "1") =>
_profileEntrypoints.Contains(
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile1, VaapiEntrypoint.Decode)),
(VideoFormat.Vp9, "profile 2" or "2") =>
_profileEntrypoints.Contains(
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile2, VaapiEntrypoint.Decode)),
(VideoFormat.Vp9, "profile 3" or "3") =>
_profileEntrypoints.Contains(
new VaapiProfileEntrypoint(VaapiProfile.Vp9Profile3, VaapiEntrypoint.Decode)),
(VideoFormat.Av1, "main" or "0") =>
_profileEntrypoints.Contains(
new VaapiProfileEntrypoint(VaapiProfile.Av1Profile0, VaapiEntrypoint.Decode)),
// fall back to software decoder
_ => false