Revert "Remove manual hwframe ctx setup for D3D11VA"

We need this back to avoid the copy that's tanking performance on Intel iGPUs.

This reverts commit 2cef09471b.
This commit is contained in:
Cameron Gutman
2024-06-22 12:34:10 -05:00
parent 3aaa09bb7d
commit b6bb96223d
2 changed files with 58 additions and 4 deletions
@@ -16,6 +16,7 @@ public:
virtual ~D3D11VARenderer() override;
virtual bool initialize(PDECODER_PARAMETERS params) override;
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary**) override;
virtual bool prepareDecoderContextInGetFormat(AVCodecContext* context, AVPixelFormat pixelFormat) override;
virtual void renderFrame(AVFrame* frame) override;
virtual void notifyOverlayUpdated(Overlay::OverlayType) override;
virtual int getRendererAttributes() override;
@@ -47,6 +48,7 @@ private:
SDL_mutex* m_ContextLock;
DECODER_PARAMETERS m_DecoderParams;
int m_TextureAlignment;
int m_DisplayWidth;
int m_DisplayHeight;
int m_LastColorSpace;
@@ -70,5 +72,6 @@ private:
ID3D11PixelShader* m_OverlayPixelShader;
AVBufferRef* m_HwDeviceContext;
AVBufferRef* m_HwFramesContext;
};