* try to fix vaapi inconsistencies * log unexpected data * vaapi fixes * disable 444 test * add qsv deinterlace filter; qsv fixes * add videotoolbox acceleration
27 lines
741 B
C#
27 lines
741 B
C#
using ErsatzTV.FFmpeg.Format;
|
|
|
|
namespace ErsatzTV.FFmpeg.Encoder.Vaapi;
|
|
|
|
public class EncoderH264Vaapi : EncoderBase
|
|
{
|
|
private readonly FrameState _currentState;
|
|
|
|
public EncoderH264Vaapi(FrameState currentState)
|
|
{
|
|
_currentState = currentState;
|
|
}
|
|
|
|
public override FrameState NextState(FrameState currentState) => currentState with
|
|
{
|
|
VideoFormat = VideoFormat.H264,
|
|
FrameDataLocation = FrameDataLocation.Hardware
|
|
};
|
|
|
|
public override string Name => "h264_vaapi";
|
|
public override StreamKind Kind => StreamKind.Video;
|
|
|
|
public override string Filter => _currentState.FrameDataLocation == FrameDataLocation.Software
|
|
? "format=nv12|vaapi,hwupload"
|
|
: string.Empty;
|
|
}
|