Enable HEVC RFI for CUDA, VAAPI, and VDPAU decoders

This commit is contained in:
Cameron Gutman 2022-10-05 18:47:43 -05:00
parent a1694ab951
commit 413ef42a34
6 changed files with 18 additions and 0 deletions

View file

@ -57,6 +57,11 @@ bool CUDARenderer::isDirectRenderingSupported()
return false;
}
int CUDARenderer::getDecoderCapabilities()
{
return CAPABILITY_REFERENCE_FRAME_INVALIDATION_HEVC;
}
CUDAGLInteropHelper::CUDAGLInteropHelper(AVHWDeviceContext* context)
: m_Funcs(nullptr),
m_Context((AVCUDADeviceContext*)context->hwctx)

View file

@ -17,6 +17,7 @@ public:
virtual void renderFrame(AVFrame* frame) override;
virtual bool needsTestFrame() override;
virtual bool isDirectRenderingSupported() override;
virtual int getDecoderCapabilities() override;
private:
AVBufferRef* m_HwContext;

View file

@ -477,6 +477,11 @@ int VAAPIRenderer::getDecoderColorspace()
return COLORSPACE_REC_601;
}
int VAAPIRenderer::getDecoderCapabilities()
{
return CAPABILITY_REFERENCE_FRAME_INVALIDATION_HEVC;
}
void VAAPIRenderer::notifyOverlayUpdated(Overlay::OverlayType type)
{
AVHWDeviceContext* deviceContext = (AVHWDeviceContext*)m_HwContext->data;

View file

@ -42,6 +42,7 @@ public:
virtual bool needsTestFrame() override;
virtual bool isDirectRenderingSupported() override;
virtual int getDecoderColorspace() override;
virtual int getDecoderCapabilities() override;
virtual void notifyOverlayUpdated(Overlay::OverlayType) override;
#ifdef HAVE_EGL

View file

@ -437,6 +437,11 @@ int VDPAURenderer::getDecoderColorspace()
return COLORSPACE_REC_601;
}
int VDPAURenderer::getDecoderCapabilities()
{
return CAPABILITY_REFERENCE_FRAME_INVALIDATION_HEVC;
}
void VDPAURenderer::renderOverlay(VdpOutputSurface destination, Overlay::OverlayType type)
{
VdpStatus status;

View file

@ -20,6 +20,7 @@ public:
virtual void renderFrame(AVFrame* frame) override;
virtual bool needsTestFrame() override;
virtual int getDecoderColorspace() override;
virtual int getDecoderCapabilities() override;
private:
void renderOverlay(VdpOutputSurface destination, Overlay::OverlayType type);