mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Merge pull request #8001 from jellyfin/fix-yuvj420p-hwdec
Fix yuvj420p pixel format hardware decoding
This commit is contained in:
commit
d342b79218
@ -4288,6 +4288,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return videoStream.BitDepth.Value;
|
||||
}
|
||||
else if (string.Equals(videoStream.PixelFormat, "yuv420p", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(videoStream.PixelFormat, "yuvj420p", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(videoStream.PixelFormat, "yuv444p", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return 8;
|
||||
@ -4578,7 +4579,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var hwSurface = (isIntelDx11OclSupported || isIntelVaapiOclSupported)
|
||||
&& _mediaEncoder.SupportsFilter("alphasrc");
|
||||
|
||||
var is8bitSwFormatsQsv = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8bitSwFormatsQsv = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals("yuvj420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8_10bitSwFormatsQsv = is8bitSwFormatsQsv || string.Equals("yuv420p10le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
// TODO: add more 8/10bit and 4:4:4 formats for Qsv after finishing the ffcheck tool
|
||||
|
||||
@ -4637,7 +4639,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
var hwSurface = IsCudaFullSupported() && _mediaEncoder.SupportsFilter("alphasrc");
|
||||
var is8bitSwFormatsNvdec = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8bitSwFormatsNvdec = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals("yuvj420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8_10bitSwFormatsNvdec = is8bitSwFormatsNvdec || string.Equals("yuv420p10le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
// TODO: add more 8/10/12bit and 4:4:4 formats for Nvdec after finishing the ffcheck tool
|
||||
|
||||
@ -4703,7 +4706,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var hwSurface = _mediaEncoder.SupportsHwaccel("d3d11va")
|
||||
&& IsOpenclFullSupported()
|
||||
&& _mediaEncoder.SupportsFilter("alphasrc");
|
||||
var is8bitSwFormatsAmf = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8bitSwFormatsAmf = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals("yuvj420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8_10bitSwFormatsAmf = is8bitSwFormatsAmf || string.Equals("yuv420p10le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (is8bitSwFormatsAmf)
|
||||
@ -4759,7 +4763,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
&& IsVaapiFullSupported()
|
||||
&& IsOpenclFullSupported()
|
||||
&& _mediaEncoder.SupportsFilter("alphasrc");
|
||||
var is8bitSwFormatsVaapi = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8bitSwFormatsVaapi = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals("yuvj420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8_10bitSwFormatsVaapi = is8bitSwFormatsVaapi || string.Equals("yuv420p10le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (is8bitSwFormatsVaapi)
|
||||
@ -4816,7 +4821,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
return null;
|
||||
}
|
||||
|
||||
var is8bitSwFormatsVt = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8bitSwFormatsVt = string.Equals("yuv420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals("yuvj420p", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
var is8_10bitSwFormatsVt = is8bitSwFormatsVt || string.Equals("yuv420p10le", videoStream.PixelFormat, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (is8bitSwFormatsVt)
|
||||
|
Loading…
Reference in New Issue
Block a user