fix transcoding 10-bit source content using qsv on windows (#1762)

This commit is contained in:
Jason Dove
2024-06-26 16:21:42 -05:00
committed by GitHub
parent f7f1a0493b
commit 6858103be5
2 changed files with 13 additions and 5 deletions
+1
View File
@@ -94,6 +94,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix scheduling loop/failure caused by some duration schedule items
- Fix `video_bit_depth` search field for Plex media
- Fix template and deco template editors with MariaDB/MySql backend
- Fix transcoding 10-bit source content using QSV acceleration on Windows
### Changed
- Show health checks at top of home page; scroll release notes if needed
+12 -5
View File
@@ -572,11 +572,18 @@ public class QsvPipelineBuilder : SoftwarePipelineBuilder
{
IPipelineFilterStep scaleStep;
if (currentState.ScaledSize != desiredState.ScaledSize && ffmpegState is
{
DecoderHardwareAccelerationMode: HardwareAccelerationMode.None,
EncoderHardwareAccelerationMode: HardwareAccelerationMode.None
} && context is { HasWatermark: false, HasSubtitleOverlay: false, ShouldDeinterlace: false })
bool useSoftwareFilter = ffmpegState is
{
DecoderHardwareAccelerationMode: HardwareAccelerationMode.None,
EncoderHardwareAccelerationMode: HardwareAccelerationMode.None
} && context is { HasWatermark: false, HasSubtitleOverlay: false, ShouldDeinterlace: false };
// auto_scale filter seems to muck up 10-bit software decode => hardware scale, so use software scale in that case
useSoftwareFilter = useSoftwareFilter ||
(ffmpegState is { DecoderHardwareAccelerationMode: HardwareAccelerationMode.None } &&
OperatingSystem.IsWindows() && currentState.BitDepth == 10);
if (currentState.ScaledSize != desiredState.ScaledSize && useSoftwareFilter)
{
scaleStep = new ScaleFilter(
currentState,