aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/command_classes/codecs/codec.h
diff options
context:
space:
mode:
authoryzct12345 <87620833+yzct12345@users.noreply.github.com>2021-08-04 03:43:11 +0000
committerGitHub <noreply@github.com>2021-08-03 23:43:11 -0400
commit2868d4ba84f43c9bf3c7b6997ddcafb6e65c4a02 (patch)
tree7cb19f8de5b5b37db87fa331d9b3c951ce372b4b /src/video_core/command_classes/codecs/codec.h
parentd16a337d98979fd7bdda2a7b0482d5e0f5c76d22 (diff)
nvdec: Implement VA-API hardware video acceleration (#6713)
* nvdec: VA-API * Verify formatting * Forgot a semicolon for Windows * Clarify comment about AV_PIX_FMT_NV12 * Fix assert log spam from missing negation * vic: Remove forgotten debug code * Address lioncash's review * Mention VA-API is Intel/AMD * Address v1993's review * Hopefully fix CMakeLists style this time * vic: Improve cache locality * vic: Fix off-by-one error * codec: Async * codec: Forgot the GetValue() * nvdec: Address ameerj's review * codec: Fallback to CPU without VA-API support * cmake: Address lat9nq's review * cmake: Make VA-API optional * vaapi: Multiple GPU * Apply suggestions from code review Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com> * nvdec: Address ameerj's review * codec: Use anonymous instead of static * nvdec: Remove enum and fix memory leak * nvdec: Address ameerj's review * codec: Remove preparation for threading Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
Diffstat (limited to 'src/video_core/command_classes/codecs/codec.h')
-rw-r--r--src/video_core/command_classes/codecs/codec.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/command_classes/codecs/codec.h b/src/video_core/command_classes/codecs/codec.h
index 96c823c76..71936203f 100644
--- a/src/video_core/command_classes/codecs/codec.h
+++ b/src/video_core/command_classes/codecs/codec.h
@@ -22,7 +22,6 @@ extern "C" {
namespace Tegra {
class GPU;
-struct VicRegisters;
void AVFrameDeleter(AVFrame* ptr);
using AVFramePtr = std::unique_ptr<AVFrame, decltype(&AVFrameDeleter)>;
@@ -55,10 +54,13 @@ public:
[[nodiscard]] std::string_view GetCurrentCodecName() const;
private:
+ void InitializeHwdec();
+
bool initialized{};
NvdecCommon::VideoCodec current_codec{NvdecCommon::VideoCodec::None};
AVCodec* av_codec{nullptr};
+ AVBufferRef* av_hw_device{nullptr};
AVCodecContext* av_codec_ctx{nullptr};
GPU& gpu;