mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
Merge pull request #13194 from gnattu/av1-videotoolbox
Enable VideoToolbox AV1 decode
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user