Browse Source

fix colorspace filter when using vaapi (#1226)

pull/1229/head
Jason Dove 2 years ago committed by GitHub
parent
commit
c9141b0d86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 15
      ErsatzTV.FFmpeg/Filter/ColorspaceFilter.cs

1
CHANGELOG.md

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix updating (re-adding) Trakt lists to properly use new metadata ids that were not present when originally added
- Fix local show library scanning with non-english season folder names, e.g. `Staffel 02`
- Fix bug where local libraries would merge with media server libraries when the same file was added to both libraries
- Fix transcoding some 10-bit content from media servers using VAAPI acceleration
### Changed
- Use Poster artwork for XMLTV if available

15
ErsatzTV.FFmpeg/Filter/ColorspaceFilter.cs

@ -47,9 +47,20 @@ public class ColorspaceFilter : BaseFilter @@ -47,9 +47,20 @@ public class ColorspaceFilter : BaseFilter
hwdownload = "hwdownload,";
foreach (IPixelFormat pixelFormat in _currentState.PixelFormat)
{
if (!string.IsNullOrWhiteSpace(pixelFormat.FFmpegName))
string name = pixelFormat.FFmpegName;
// vaapi is not a target software format
if (pixelFormat is PixelFormatVaapi vaapi)
{
hwdownload = $"hwdownload,format={pixelFormat.FFmpegName},";
foreach (IPixelFormat pf in AvailablePixelFormats.ForPixelFormat(vaapi.Name, null))
{
name = pf.FFmpegName;
}
}
if (!string.IsNullOrWhiteSpace(name))
{
hwdownload = $"hwdownload,format={name},";
}
}
}

Loading…
Cancel
Save