Skip to content

Commit

Permalink
Enable BWDIF VideoToolbox deint filter when available (jellyfin#12634)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnattu authored Sep 12, 2024
1 parent 6deebb4 commit 0ff7f28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3237,9 +3237,12 @@ public string GetHwDeinterlaceFilter(EncodingJobInfo state, EncodingOptions opti

if (hwDeintSuffix.Contains("videotoolbox", StringComparison.OrdinalIgnoreCase))
{
var useBwdif = options.DeinterlaceMethod == DeinterlaceMethod.bwdif && _mediaEncoder.SupportsFilter("bwdif_videotoolbox");

return string.Format(
CultureInfo.InvariantCulture,
"yadif_videotoolbox={0}:-1:0",
"{0}_videotoolbox={1}:-1:0",
useBwdif ? "bwdif" : "yadif",
doubleRateDeint ? "1" : "0");
}

Expand Down
1 change: 1 addition & 0 deletions MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public partial class EncoderValidator
"flip_vulkan",
// videotoolbox
"yadif_videotoolbox",
"bwdif_videotoolbox",
"scale_vt",
"transpose_vt",
"overlay_videotoolbox",
Expand Down

0 comments on commit 0ff7f28

Please sign in to comment.