Browse Source

vaapi: decode vp9 and av1 (#1181)

pull/1183/head
Jason Dove 3 years ago committed by GitHub
parent
commit
eddbf07b11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 5
      ErsatzTV.FFmpeg/Capabilities/Vaapi/VaapiProfile.cs
  3. 20
      ErsatzTV.FFmpeg/Capabilities/VaapiHardwareCapabilities.cs

3
CHANGELOG.md

@ -4,6 +4,9 @@ All notable changes to this project will be documented in this 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

5
ErsatzTV.FFmpeg/Capabilities/Vaapi/VaapiProfile.cs

@ -14,4 +14,9 @@ public class VaapiProfile @@ -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";
}

20
ErsatzTV.FFmpeg/Capabilities/VaapiHardwareCapabilities.cs

@ -70,6 +70,26 @@ public class VaapiHardwareCapabilities : IHardwareCapabilities @@ -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

Loading…
Cancel
Save