Browse Source

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

pull/1763/head
Jason Dove 2 years ago committed by GitHub
parent
commit
6858103be5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 17
      ErsatzTV.FFmpeg/Pipeline/QsvPipelineBuilder.cs

1
CHANGELOG.md

@ -94,6 +94,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -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

17
ErsatzTV.FFmpeg/Pipeline/QsvPipelineBuilder.cs

@ -572,11 +572,18 @@ public class QsvPipelineBuilder : SoftwarePipelineBuilder @@ -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,

Loading…
Cancel
Save