mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-11-28 16:54:20 +00:00
Reject 10-bit and YUV 4:4:4 in the CUDA path
Vulkan Video supports these on all Nvidia GPUs.
This commit is contained in:
1 parent
1ced9dd9b0
commit
aa54ba2a05
2 files changed
+7
-2
No files matched your search
@@ -16,10 +16,15 @@ CUDARenderer::~CUDARenderer()
|
||||
}
|
||||
}
|
||||
|
||||
bool CUDARenderer::initialize(PDECODER_PARAMETERS)
|
||||
bool CUDARenderer::initialize(PDECODER_PARAMETERS params)
|
||||
{
|
||||
int err;
|
||||
|
||||
// This renderer only supports NV12 output
|
||||
if (params->videoFormat & (VIDEO_FORMAT_MASK_10BIT | VIDEO_FORMAT_MASK_YUV444)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
err = av_hwdevice_ctx_create(&m_HwContext, AV_HWDEVICE_TYPE_CUDA, nullptr, nullptr, 0);
|
||||
if (err != 0) {
|
||||
m_InitFailureReason = InitFailureReason::NoSoftwareSupport;
|
||||
|
||||
@@ -12,7 +12,7 @@ class CUDARenderer : public IFFmpegRenderer {
|
||||
public:
|
||||
CUDARenderer();
|
||||
virtual ~CUDARenderer() override;
|
||||
virtual bool initialize(PDECODER_PARAMETERS) override;
|
||||
virtual bool initialize(PDECODER_PARAMETERS params) override;
|
||||
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) override;
|
||||
virtual void renderFrame(AVFrame* frame) override;
|
||||
virtual bool isDirectRenderingSupported() override;
|
||||
|
||||
Reference in new issue
Block a user