Files
ersatztv/ErsatzTV.FFmpeg/Decoder/DecoderRkmpp.cs
T
d855e4f20d Add initial support for Rockchip Media Process Platform (rkmpp) hardware acceleration (#2418)
* Add Rockchip Media Process Platform (rkmpp) acceleration

* remove fourcc stuff; it's exclusive to videotoolbox

* update changelog

---------

Co-authored-by: Jason Dove <1695733+jasongdove@users.noreply.github.com>
2025-09-16 00:51:56 +00:00

27 lines
944 B
C#

using ErsatzTV.FFmpeg.Format;
namespace ErsatzTV.FFmpeg.Decoder;
public class DecoderRkmpp : DecoderBase
{
protected override FrameDataLocation OutputFrameDataLocation => FrameDataLocation.Software;
public override string Name => "implicit_rkmpp";
public override string[] InputOptions(InputFile inputFile) => Array.Empty<string>();
/*
public override string[] InputOptions(InputFile inputFile) =>
new[] { "-hwaccel_output_format", "drm_prime" };
*/
public override FrameState NextState(FrameState currentState)
{
FrameState nextState = base.NextState(currentState);
return currentState.PixelFormat.Match(
pixelFormat => pixelFormat.BitDepth == 8
? nextState with { PixelFormat = new PixelFormatNv12(pixelFormat.Name) }
: nextState with { PixelFormat = new PixelFormatNv15(pixelFormat.Name) },
() => nextState);
}
}