diff options
| author | Bond-009 <bond.009@outlook.com> | 2025-03-30 23:12:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-30 23:12:53 +0200 |
| commit | 476a0d6932aa5a2ffee9b5849dc9d042684b39cc (patch) | |
| tree | 2553f02bebbe0a4801be5824cffbb1798c642377 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | d75216cf3a9bb3f869415bed829dca996f4ee7c9 (diff) | |
| parent | c69e9d8f2cac26a832f0ee09bed2809aae1872bf (diff) | |
Merge pull request #13194 from gnattu/av1-videotoolbox
Enable VideoToolbox AV1 decode
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 8fcbba738..207bb40d9 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -6621,6 +6621,7 @@ namespace MediaBrowser.Controller.MediaEncoding || string.Equals("yuv420p12le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase) || string.Equals("yuv422p12le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase) || string.Equals("yuv444p12le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase); + var isAv1SupportedSwFormatsVt = is8_10bitSwFormatsVt || string.Equals("yuv420p12le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase); // The related patches make videotoolbox hardware surface working is only available in jellyfin-ffmpeg 7.0.1 at the moment. bool useHwSurface = (_mediaEncoder.EncoderVersion >= _minFFmpegWorkingVtHwSurface) && IsVideoToolboxFullSupported(); @@ -6654,6 +6655,13 @@ namespace MediaBrowser.Controller.MediaEncoding { return GetHwaccelType(state, options, "hevc", bitDepth, useHwSurface); } + + if (string.Equals("av1", videoStream.Codec, StringComparison.OrdinalIgnoreCase) + && isAv1SupportedSwFormatsVt + && _mediaEncoder.IsVideoToolboxAv1DecodeAvailable) + { + return GetHwaccelType(state, options, "av1", bitDepth, useHwSurface); + } } return null; |
