Handle full range output in tonemap filter for Trickplay (#12746)

This commit is contained in:
Nyanmisaka 2024-09-30 02:21:36 +00:00 committed by GitHub
parent 0ef72683bb
commit 77420739e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4177,7 +4177,7 @@ namespace MediaBrowser.Controller.MediaEncoding
hwScaleFilter += $":transpose={tranposeDir}";
}
if (!string.IsNullOrEmpty(hwScaleFilter) && doVppFullRangeOut)
if (!string.IsNullOrEmpty(hwScaleFilter) && doVppFullRangeOut && !doOclTonemap)
{
hwScaleFilter += ":out_range=pc";
}
@ -4433,6 +4433,7 @@ namespace MediaBrowser.Controller.MediaEncoding
}
if (!string.IsNullOrEmpty(hwScaleFilter)
&& !doOclTonemap
&& ((isVaapiDecoder && isMjpegEncoder)
|| (isQsvDecoder && doVppFullRangeOut)))
{
@ -4746,7 +4747,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var outFormat = doTonemap ? (isRext ? "p010" : string.Empty) : "nv12";
var hwScaleFilter = GetHwScaleFilter("scale", "vaapi", outFormat, false, swpInW, swpInH, reqW, reqH, reqMaxW, reqMaxH);
if (!string.IsNullOrEmpty(hwScaleFilter) && isMjpegEncoder)
if (!string.IsNullOrEmpty(hwScaleFilter) && isMjpegEncoder && !doOclTonemap)
{
hwScaleFilter += ":out_range=pc";
}
@ -4998,7 +4999,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// hw scale
var hwScaleFilter = GetHwScaleFilter("scale", "vaapi", "nv12", false, inW, inH, reqW, reqH, reqMaxW, reqMaxH);
if (!string.IsNullOrEmpty(hwScaleFilter) && isMjpegEncoder)
if (!string.IsNullOrEmpty(hwScaleFilter) && isMjpegEncoder && !doVkTonemap)
{
hwScaleFilter += ":out_range=pc";
}
@ -5200,7 +5201,7 @@ namespace MediaBrowser.Controller.MediaEncoding
outFormat = doOclTonemap ? string.Empty : "nv12";
var hwScaleFilter = GetHwScaleFilter("scale", "vaapi", outFormat, false, inW, inH, reqW, reqH, reqMaxW, reqMaxH);
if (!string.IsNullOrEmpty(hwScaleFilter) && isMjpegEncoder)
if (!string.IsNullOrEmpty(hwScaleFilter) && isMjpegEncoder && !doOclTonemap)
{
hwScaleFilter += ":out_range=pc";
}