diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2025-02-03 16:59:05 -0500 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2025-02-03 16:59:05 -0500 |
| commit | d52ab30ae970523f3b812d79a2f5afeb7f0a439a (patch) | |
| tree | f1742bc3806799d0ef4893f526d502e420ea1f53 /MediaBrowser.Controller/MediaEncoding | |
| parent | e79fc6b851ea851a79668195e573b5a05e55a63d (diff) | |
Backport pull request #13313 from jellyfin/release-10.10.z
Use nv15 as intermediate format for 2-pass rkrga scaling
Original-merge: 5c6317f68d6e255189ceb64e49500afd046e3a50
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 72ac26beb..a9e419df4 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -5695,7 +5695,11 @@ namespace MediaBrowser.Controller.MediaEncoding if (!string.IsNullOrEmpty(doScaling) && !IsScaleRatioSupported(inW, inH, reqW, reqH, reqMaxW, reqMaxH, 8.0f)) { - var hwScaleFilterFirstPass = $"scale_rkrga=w=iw/7.9:h=ih/7.9:format={outFormat}:afbc=1"; + // Vendor provided BSP kernel has an RGA driver bug that causes the output to be corrupted for P010 format. + // Use NV15 instead of P010 to avoid the issue. + // SDR inputs are using BGRA formats already which is not affected. + var intermediateFormat = string.Equals(outFormat, "p010", StringComparison.OrdinalIgnoreCase) ? "nv15" : outFormat; + var hwScaleFilterFirstPass = $"scale_rkrga=w=iw/7.9:h=ih/7.9:format={intermediateFormat}:force_divisible_by=4:afbc=1"; mainFilters.Add(hwScaleFilterFirstPass); } |
