From fb8ae0e9a1f087e138990ef9989c27eab138b73b Mon Sep 17 00:00:00 2001 From: Nyanmisaka Date: Tue, 22 Mar 2022 00:45:07 +0800 Subject: [PATCH] Improve fps for cuda tonemap in sw decoding avoid second copy if subtitle is not applied. --- MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 261ce915f..c09f00d7d 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2893,8 +2893,8 @@ namespace MediaBrowser.Controller.MediaEncoding } var memoryOutput = false; - var isUploadForOclTonemap = isSwDecoder && doCuTonemap; - if ((isNvDecoder && isSwEncoder) || isUploadForOclTonemap) + var isUploadForCuTonemap = isSwDecoder && doCuTonemap; + if ((isNvDecoder && isSwEncoder) || (isUploadForCuTonemap && hasSubs)) { memoryOutput = true; @@ -2904,7 +2904,7 @@ namespace MediaBrowser.Controller.MediaEncoding } // OUTPUT yuv420p surface(memory) - if (isSwDecoder && isNvencEncoder) + if (isSwDecoder && isNvencEncoder && !isUploadForCuTonemap) { memoryOutput = true; }