|
|
|
@ -3214,7 +3214,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
|
|
|
|
// OUTPUT nv12 surface(memory)
|
|
|
|
|
// prefer hwmap to hwdownload on opencl.
|
|
|
|
|
var hwTransferFilter = hasGraphicalSubs ? "hwdownload" : "hwmap";
|
|
|
|
|
var hwTransferFilter = hasGraphicalSubs ? "hwdownload" : "hwmap=mode=read";
|
|
|
|
|
mainFilters.Add(hwTransferFilter);
|
|
|
|
|
mainFilters.Add("format=nv12");
|
|
|
|
|
}
|
|
|
|
@ -3457,7 +3457,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
// OUTPUT nv12 surface(memory)
|
|
|
|
|
// prefer hwmap to hwdownload on opencl.
|
|
|
|
|
// qsv hwmap is not fully implemented for the time being.
|
|
|
|
|
mainFilters.Add(isHwmapUsable ? "hwmap" : "hwdownload");
|
|
|
|
|
mainFilters.Add(isHwmapUsable ? "hwmap=mode=read" : "hwdownload");
|
|
|
|
|
mainFilters.Add("format=nv12");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3615,6 +3615,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
|
|
|
|
var outFormat = doTonemap ? string.Empty : "nv12";
|
|
|
|
|
var hwScaleFilter = GetHwScaleFilter(isVaapiDecoder ? "vaapi" : "qsv", outFormat, inW, inH, reqW, reqH, reqMaxW, reqMaxH);
|
|
|
|
|
|
|
|
|
|
// allocate extra pool sizes for vaapi vpp
|
|
|
|
|
if (!string.IsNullOrEmpty(hwScaleFilter) && isVaapiDecoder)
|
|
|
|
|
{
|
|
|
|
|
hwScaleFilter += ":extra_hw_frames=24";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hw scale
|
|
|
|
|
mainFilters.Add(hwScaleFilter);
|
|
|
|
|
}
|
|
|
|
@ -3661,7 +3668,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
// OUTPUT nv12 surface(memory)
|
|
|
|
|
// prefer hwmap to hwdownload on opencl/vaapi.
|
|
|
|
|
// qsv hwmap is not fully implemented for the time being.
|
|
|
|
|
mainFilters.Add(isHwmapUsable ? "hwmap" : "hwdownload");
|
|
|
|
|
mainFilters.Add(isHwmapUsable ? "hwmap=mode=read" : "hwdownload");
|
|
|
|
|
mainFilters.Add("format=nv12");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3878,6 +3885,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
|
|
|
|
var outFormat = doTonemap ? string.Empty : "nv12";
|
|
|
|
|
var hwScaleFilter = GetHwScaleFilter("vaapi", outFormat, inW, inH, reqW, reqH, reqMaxW, reqMaxH);
|
|
|
|
|
|
|
|
|
|
// allocate extra pool sizes for vaapi vpp
|
|
|
|
|
if (!string.IsNullOrEmpty(hwScaleFilter))
|
|
|
|
|
{
|
|
|
|
|
hwScaleFilter += ":extra_hw_frames=24";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hw scale
|
|
|
|
|
mainFilters.Add(hwScaleFilter);
|
|
|
|
|
}
|
|
|
|
@ -3919,7 +3933,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
|
|
|
|
// OUTPUT nv12 surface(memory)
|
|
|
|
|
// prefer hwmap to hwdownload on opencl/vaapi.
|
|
|
|
|
mainFilters.Add(isHwmapNotUsable ? "hwdownload" : "hwmap");
|
|
|
|
|
mainFilters.Add(isHwmapNotUsable ? "hwdownload" : "hwmap=mode=read");
|
|
|
|
|
mainFilters.Add("format=nv12");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -4072,6 +4086,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|
|
|
|
|
|
|
|
|
outFormat = doOclTonemap ? string.Empty : "nv12";
|
|
|
|
|
var hwScaleFilter = GetHwScaleFilter("vaapi", outFormat, inW, inH, reqW, reqH, reqMaxW, reqMaxH);
|
|
|
|
|
|
|
|
|
|
// allocate extra pool sizes for vaapi vpp
|
|
|
|
|
if (!string.IsNullOrEmpty(hwScaleFilter))
|
|
|
|
|
{
|
|
|
|
|
hwScaleFilter += ":extra_hw_frames=24";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// hw scale
|
|
|
|
|
mainFilters.Add(hwScaleFilter);
|
|
|
|
|
}
|
|
|
|
|