normalize bit depth via new pipeline (#1045)
* fix subtitles test and nvidia subtitles * new ffmpeg pipelines; software and nvidia * partial qsv * fix qsv * fix software pipeline * add vaapi pipeline * fix qsv 10-bit h264 output * nvidia fixes * properly disable 10-bit h264 hardware encoders * more nvidia fixes * add video toolbox pipeline
This commit is contained in:
@@ -4,40 +4,8 @@ namespace ErsatzTV.FFmpeg.Encoder.Vaapi;
|
||||
|
||||
public class EncoderHevcVaapi : EncoderBase
|
||||
{
|
||||
private readonly FrameState _currentState;
|
||||
private readonly Option<SubtitleInputFile> _maybeSubtitleInputFile;
|
||||
private readonly Option<WatermarkInputFile> _maybeWatermarkInputFile;
|
||||
|
||||
public EncoderHevcVaapi(
|
||||
FrameState currentState,
|
||||
Option<WatermarkInputFile> maybeWatermarkInputFile,
|
||||
Option<SubtitleInputFile> maybeSubtitleInputFile)
|
||||
{
|
||||
_currentState = currentState;
|
||||
_maybeWatermarkInputFile = maybeWatermarkInputFile;
|
||||
_maybeSubtitleInputFile = maybeSubtitleInputFile;
|
||||
}
|
||||
|
||||
public override string Name => "hevc_vaapi";
|
||||
public override StreamKind Kind => StreamKind.Video;
|
||||
|
||||
// need to upload if we're still in software unless a watermark or subtitle is used
|
||||
public override string Filter
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_currentState.FrameDataLocation == FrameDataLocation.Software)
|
||||
{
|
||||
if (_maybeWatermarkInputFile.IsNone && _maybeSubtitleInputFile.IsNone)
|
||||
{
|
||||
return "format=nv12|vaapi,hwupload";
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public override FrameState NextState(FrameState currentState) => currentState with
|
||||
{
|
||||
VideoFormat = VideoFormat.Hevc
|
||||
|
||||
Reference in New Issue
Block a user