mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Add software fallback for YUV444 using libswscale
This commit is contained in:
@@ -7,6 +7,10 @@
|
||||
#include "cuda.h"
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
#include <libswscale/swscale.h>
|
||||
}
|
||||
|
||||
class SdlRenderer : public IFFmpegRenderer {
|
||||
public:
|
||||
SdlRenderer();
|
||||
@@ -23,6 +27,8 @@ public:
|
||||
private:
|
||||
void renderOverlay(Overlay::OverlayType type);
|
||||
|
||||
static void ffNoopFree(void *opaque, uint8_t *data);
|
||||
|
||||
int m_VideoFormat;
|
||||
SDL_Renderer* m_Renderer;
|
||||
SDL_Texture* m_Texture;
|
||||
@@ -30,6 +36,11 @@ private:
|
||||
SDL_Texture* m_OverlayTextures[Overlay::OverlayMax];
|
||||
SDL_Rect m_OverlayRects[Overlay::OverlayMax];
|
||||
|
||||
// Used for CPU conversion of YUV to RGB if needed
|
||||
bool m_NeedsYuvToRgbConversion;
|
||||
SwsContext* m_SwsContext;
|
||||
AVFrame* m_RgbFrame;
|
||||
|
||||
SwFrameMapper m_SwFrameMapper;
|
||||
|
||||
#ifdef HAVE_CUDA
|
||||
|
||||
Reference in New Issue
Block a user