Merge pull request #12590 from nyanmisaka/bwdif-cuda-deint
Enable the new BWDIF CUDA deint filter when available
This commit is contained in:
commit
ccfd8fa66c
|
@ -3242,14 +3242,18 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
doubleRateDeint ? "1" : "0");
|
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;
|
var doubleRateDeint = options.DeinterlaceDoubleRate && (state.VideoStream?.AverageFrameRate ?? 60) <= 30;
|
||||||
if (hwDeintSuffix.Contains("cuda", StringComparison.OrdinalIgnoreCase))
|
if (hwDeintSuffix.Contains("cuda", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
|
var useBwdif = string.Equals(options.DeinterlaceMethod, "bwdif", StringComparison.OrdinalIgnoreCase)
|
||||||
|
&& _mediaEncoder.SupportsFilter("bwdif_cuda");
|
||||||
|
|
||||||
return string.Format(
|
return string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
"yadif_cuda={0}:-1:0",
|
"{0}_cuda={1}:-1:0",
|
||||||
|
useBwdif ? "bwdif" : "yadif",
|
||||||
doubleRateDeint ? "1" : "0");
|
doubleRateDeint ? "1" : "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
// cuda
|
// cuda
|
||||||
"scale_cuda",
|
"scale_cuda",
|
||||||
"yadif_cuda",
|
"yadif_cuda",
|
||||||
|
"bwdif_cuda",
|
||||||
"tonemap_cuda",
|
"tonemap_cuda",
|
||||||
"overlay_cuda",
|
"overlay_cuda",
|
||||||
"transpose_cuda",
|
"transpose_cuda",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user