fix: convert all non-yuv420 inputs to nv12

Signed-off-by: gnattu <gnattuoc@me.com>
This commit is contained in:
gnattu 2024-03-09 15:16:00 +08:00
parent e6dee627e3
commit 0909ee7208
1 changed files with 1 additions and 1 deletions

View File

@ -5019,7 +5019,7 @@ namespace MediaBrowser.Controller.MediaEncoding
var doOclTonemap = !doVtTonemap && IsHwTonemapAvailable(state, options);
var scaleFormat = string.Empty;
if (GetVideoColorBitDepth(state) == 10)
if (!string.Equals(state.VideoStream.PixelFormat, "yuv420p", StringComparison.OrdinalIgnoreCase))
{
// Use P010 for OpenCL tone mapping, otherwise force an 8bit output.
scaleFormat = doOclTonemap ? "p010le" : "nv12";