mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-02 05:04:31 -04:00
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)
|
else if (string.Equals(videoEncoder, "h264_amf", StringComparison.OrdinalIgnoreCase)
|
||||||
|| string.Equals(videoEncoder, "hevc_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)
|
switch (encodingOptions.EncoderPreset)
|
||||||
{
|
{
|
||||||
@ -897,6 +883,18 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
param += "-quality speed";
|
param += "-quality speed";
|
||||||
break;
|
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
|
else if (string.Equals(videoEncoder, "libvpx", StringComparison.OrdinalIgnoreCase)) // webm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user