mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
794 B
24 lines
794 B
using ErsatzTV.FFmpeg.Filter.Cuda; |
|
using ErsatzTV.FFmpeg.Filter.Qsv; |
|
|
|
namespace ErsatzTV.FFmpeg.Filter; |
|
|
|
public static class AvailableSubtitleScaleFilters |
|
{ |
|
public static IPipelineFilterStep ForAcceleration( |
|
HardwareAccelerationMode accelMode, |
|
FrameState currentState, |
|
FrameSize scaledSize, |
|
FrameSize paddedSize, |
|
int extraHardwareFrames) => |
|
accelMode switch |
|
{ |
|
HardwareAccelerationMode.Nvenc => new SubtitleScaleNppFilter(currentState, scaledSize, paddedSize), |
|
HardwareAccelerationMode.Qsv => new SubtitleScaleQsvFilter( |
|
currentState, |
|
scaledSize, |
|
paddedSize, |
|
extraHardwareFrames), |
|
_ => new ScaleImageFilter(paddedSize) |
|
}; |
|
}
|
|
|