mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-22 05:47:50 +00:00
Slightly refactor NVDEC and codecs for readability and safety
This commit is contained in:
parent
783bfe6f32
commit
05fb3db000
10 changed files with 544 additions and 378 deletions
|
@ -14,16 +14,11 @@ class GPU;
|
|||
|
||||
class Nvdec {
|
||||
public:
|
||||
enum class Method : u32 {
|
||||
SetVideoCodec = 0x80,
|
||||
Execute = 0xc0,
|
||||
};
|
||||
|
||||
explicit Nvdec(GPU& gpu);
|
||||
~Nvdec();
|
||||
|
||||
/// Writes the method into the state, Invoke Execute() if encountered
|
||||
void ProcessMethod(Method method, u32 argument);
|
||||
void ProcessMethod(u32 method, u32 argument);
|
||||
|
||||
/// Return most recently decoded frame
|
||||
[[nodiscard]] AVFramePtr GetFrame();
|
||||
|
@ -33,6 +28,7 @@ private:
|
|||
void Execute();
|
||||
|
||||
GPU& gpu;
|
||||
NvdecCommon::NvdecRegisters state;
|
||||
std::unique_ptr<Codec> codec;
|
||||
};
|
||||
} // namespace Tegra
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue