mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Enable the new BWDIF CUDA deint filter when available
this requires jellyfin-ffmpeg7 Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
12a88fe042
commit
aecd294fd7
2 changed files with 7 additions and 2 deletions
|
@ -3234,14 +3234,18 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
doubleRateDeint ? "1" : "0");
|
||||
}
|
||||
|
||||
public static string GetHwDeinterlaceFilter(EncodingJobInfo state, EncodingOptions options, string hwDeintSuffix)
|
||||
public string GetHwDeinterlaceFilter(EncodingJobInfo state, EncodingOptions options, string hwDeintSuffix)
|
||||
{
|
||||
var doubleRateDeint = options.DeinterlaceDoubleRate && (state.VideoStream?.AverageFrameRate ?? 60) <= 30;
|
||||
if (hwDeintSuffix.Contains("cuda", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var useBwdif = string.Equals(options.DeinterlaceMethod, "bwdif", StringComparison.OrdinalIgnoreCase)
|
||||
&& _mediaEncoder.SupportsFilter("bwdif_cuda");
|
||||
|
||||
return string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"yadif_cuda={0}:-1:0",
|
||||
"{0}_cuda={1}:-1:0",
|
||||
useBwdif ? "bwdif" : "yadif",
|
||||
doubleRateDeint ? "1" : "0");
|
||||
}
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
// cuda
|
||||
"scale_cuda",
|
||||
"yadif_cuda",
|
||||
"bwdif_cuda",
|
||||
"tonemap_cuda",
|
||||
"overlay_cuda",
|
||||
"transpose_cuda",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue