diff --git a/ErsatzTV.Scanner.Tests/Core/FFmpeg/TranscodingTests.cs b/ErsatzTV.Scanner.Tests/Core/FFmpeg/TranscodingTests.cs index ff8e988a4..9176c095f 100644 --- a/ErsatzTV.Scanner.Tests/Core/FFmpeg/TranscodingTests.cs +++ b/ErsatzTV.Scanner.Tests/Core/FFmpeg/TranscodingTests.cs @@ -203,9 +203,9 @@ public class TranscodingTests public static HardwareAccelerationKind[] TestAccelerations = [ HardwareAccelerationKind.None, - //HardwareAccelerationKind.Nvenc - HardwareAccelerationKind.Vaapi, - HardwareAccelerationKind.Qsv, + HardwareAccelerationKind.Nvenc, + //HardwareAccelerationKind.Vaapi, + //HardwareAccelerationKind.Qsv, // HardwareAccelerationKind.VideoToolbox, // HardwareAccelerationKind.Amf ]; @@ -217,6 +217,12 @@ public class TranscodingTests //StreamingMode.HttpLiveStreamingSegmenterV2 ]; + public static bool[] NormalizeColors = + [ + false, + true + ]; + public static string[] FilesToTest => [string.Empty]; } @@ -234,7 +240,9 @@ public class TranscodingTests [ValueSource(typeof(TestData), nameof(TestData.TestAccelerations))] HardwareAccelerationKind profileAcceleration, [ValueSource(typeof(TestData), nameof(TestData.StreamingModes))] - StreamingMode streamingMode) + StreamingMode streamingMode, + [ValueSource(typeof(TestData), nameof(TestData.NormalizeColors))] + bool profileNormalizeColors) { var localFileSystem = new LocalFileSystem( new RealFileSystem(), @@ -303,7 +311,8 @@ public class TranscodingTests VideoFormat = profileVideoFormat, AudioFormat = FFmpegProfileAudioFormat.Aac, DeinterlaceVideo = true, - BitDepth = profileBitDepth + BitDepth = profileBitDepth, + NormalizeColors = profileNormalizeColors }, StreamingMode = streamingMode, SubtitleMode = ChannelSubtitleMode.None @@ -423,6 +432,7 @@ public class TranscodingTests profileBitDepth, profileVideoFormat, profileAcceleration, + profileNormalizeColors, VaapiDriver.iHD, localStatisticsProvider, streamingMode, @@ -455,7 +465,9 @@ public class TranscodingTests [ValueSource(typeof(TestData), nameof(TestData.TestAccelerations))] HardwareAccelerationKind profileAcceleration, [ValueSource(typeof(TestData), nameof(TestData.StreamingModes))] - StreamingMode streamingMode) + StreamingMode streamingMode, + [ValueSource(typeof(TestData), nameof(TestData.NormalizeColors))] + bool profileNormalizeColors) { try { @@ -755,6 +767,7 @@ public class TranscodingTests profileBitDepth, profileVideoFormat, profileAcceleration, + profileNormalizeColors, VaapiDriver.iHD, localStatisticsProvider, streamingMode, @@ -1026,6 +1039,7 @@ public class TranscodingTests FFmpegProfileBitDepth profileBitDepth, FFmpegProfileVideoFormat profileVideoFormat, HardwareAccelerationKind profileAcceleration, + bool profileNormalizeColors, VaapiDriver vaapiDriver, ILocalStatisticsProvider localStatisticsProvider, StreamingMode streamingMode, @@ -1134,6 +1148,11 @@ public class TranscodingTests videoStream.PixelFormat.ShouldBe(expectedPixelFormat); + if (!profileNormalizeColors) + { + continue; + } + // verify colors var colorParams = new ColorParams( videoStream.ColorRange,