diff options
| author | bunnei <bunneidev@gmail.com> | 2021-02-18 15:12:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 15:12:07 -0800 |
| commit | 0872ba7130c7b8d09efe754ef3cf4f18c14a8a7d (patch) | |
| tree | 79511308066a4fbc11aa2e9058b0aa65772cc30a /src/video_core/command_classes/nvdec.cpp | |
| parent | 91126fd7a9efa72c93a4009099f71ece7d55ea11 (diff) | |
| parent | 01dec35df344367254cfa658f8a1113f9e512c9d (diff) | |
Merge pull request #4973 from ameerj/nvdec-opt
nvdec: Reuse allocated buffers and general cleanup
Diffstat (limited to 'src/video_core/command_classes/nvdec.cpp')
| -rw-r--r-- | src/video_core/command_classes/nvdec.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/command_classes/nvdec.cpp b/src/video_core/command_classes/nvdec.cpp index 79e1f4e137..e4f919afd1 100644 --- a/src/video_core/command_classes/nvdec.cpp +++ b/src/video_core/command_classes/nvdec.cpp @@ -12,16 +12,16 @@ Nvdec::Nvdec(GPU& gpu_) : gpu(gpu_), codec(std::make_unique<Codec>(gpu)) {} Nvdec::~Nvdec() = default; -void Nvdec::ProcessMethod(Method method, const std::vector<u32>& arguments) { +void Nvdec::ProcessMethod(Method method, u32 argument) { if (method == Method::SetVideoCodec) { - codec->StateWrite(static_cast<u32>(method), arguments[0]); + codec->StateWrite(static_cast<u32>(method), argument); } else { - codec->StateWrite(static_cast<u32>(method), static_cast<u64>(arguments[0]) << 8); + codec->StateWrite(static_cast<u32>(method), static_cast<u64>(argument) << 8); } switch (method) { case Method::SetVideoCodec: - codec->SetTargetCodec(static_cast<NvdecCommon::VideoCodec>(arguments[0])); + codec->SetTargetCodec(static_cast<NvdecCommon::VideoCodec>(argument)); break; case Method::Execute: Execute(); |
