Enhance workload when tone mapping on some APUs
This commit is contained in:
parent
2124bc2e18
commit
9fbf725a6d
|
@ -858,20 +858,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
}
|
||||
else if (string.Equals(videoEncoder, "h264_amf", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(videoEncoder, "hevc_amf", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var videoStream = state.VideoStream;
|
||||
var isColorDepth10 = IsColorDepth10(state);
|
||||
|
||||
if (isColorDepth10
|
||||
&& _mediaEncoder.SupportsHwaccel("opencl")
|
||||
&& encodingOptions.EnableTonemapping
|
||||
&& !string.IsNullOrEmpty(videoStream.VideoRange)
|
||||
&& videoStream.VideoRange.Contains("HDR", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Enhance quality and workload when tone mapping with AMF
|
||||
param += "-quality quality -preanalysis true";
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (encodingOptions.EncoderPreset)
|
||||
{
|
||||
|
@ -897,6 +883,18 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||
param += "-quality speed";
|
||||
break;
|
||||
}
|
||||
|
||||
var videoStream = state.VideoStream;
|
||||
var isColorDepth10 = IsColorDepth10(state);
|
||||
|
||||
if (isColorDepth10
|
||||
&& _mediaEncoder.SupportsHwaccel("opencl")
|
||||
&& encodingOptions.EnableTonemapping
|
||||
&& !string.IsNullOrEmpty(videoStream.VideoRange)
|
||||
&& videoStream.VideoRange.Contains("HDR", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Enhance workload when tone mapping with AMF on some APUs
|
||||
param += " -preanalysis true";
|
||||
}
|
||||
}
|
||||
else if (string.Equals(videoEncoder, "libvpx", StringComparison.OrdinalIgnoreCase)) // webm
|
||||
|
|
Loading…
Reference in New Issue
Block a user