nvdec: Adding Vp8 codec support (#2707)

* first try

* second try

* working update

* Final impl

* Fixes nits

* Fix everything

* remove leftover

* Update FFmpegContext.cs

* Update Surface.cs

* Addresses gdkchan feedback

* bool not byte

* Addresses gdkchan feedback
This commit is contained in:
Ac_K 2021-10-12 22:55:57 +02:00 committed by GitHub
parent a7109c767b
commit d1604aa762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 220 additions and 35 deletions

View file

@ -1,4 +1,4 @@
using Ryujinx.Graphics.Nvdec.H264;
using Ryujinx.Graphics.Nvdec.FFmpeg.H264;
using Ryujinx.Graphics.Nvdec.Image;
using Ryujinx.Graphics.Nvdec.Types.H264;
using Ryujinx.Graphics.Video;
@ -10,7 +10,7 @@ namespace Ryujinx.Graphics.Nvdec
{
private const int MbSizeInPixels = 16;
public unsafe static void Decode(NvdecDecoderContext context, ResourceManager rm, ref NvdecRegisters state)
public static void Decode(NvdecDecoderContext context, ResourceManager rm, ref NvdecRegisters state)
{
PictureInfo pictureInfo = rm.Gmm.DeviceRead<PictureInfo>(state.SetPictureInfoOffset);
H264PictureInfo info = pictureInfo.Convert();
@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Nvdec
uint lumaOffset = state.SetSurfaceLumaOffset[surfaceIndex];
uint chromaOffset = state.SetSurfaceChromaOffset[surfaceIndex];
Decoder decoder = context.GetDecoder();
Decoder decoder = context.GetH264Decoder();
ISurface outputSurface = rm.Cache.Get(decoder, 0, 0, width, height);