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,21 +1,29 @@
using Ryujinx.Graphics.Nvdec.H264;
using System;
namespace Ryujinx.Graphics.Nvdec
{
class NvdecDecoderContext : IDisposable
{
private Decoder _decoder;
private FFmpeg.H264.Decoder _h264Decoder;
private FFmpeg.Vp8.Decoder _vp8Decoder;
public Decoder GetDecoder()
public FFmpeg.H264.Decoder GetH264Decoder()
{
return _decoder ??= new Decoder();
return _h264Decoder ??= new FFmpeg.H264.Decoder();
}
public FFmpeg.Vp8.Decoder GetVp8Decoder()
{
return _vp8Decoder ??= new FFmpeg.Vp8.Decoder();
}
public void Dispose()
{
_decoder?.Dispose();
_decoder = null;
_h264Decoder?.Dispose();
_h264Decoder = null;
_vp8Decoder?.Dispose();
_vp8Decoder = null;
}
}
}