7#if defined(SUNSHINE_BUILD_CUDA)
19 class avcodec_encode_device_t;
26 std::vector<std::string> display_names();
29 std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_device(
int width,
int height,
bool vram);
44typedef struct cudaArray *cudaArray_t;
46 #if !defined(__CUDACC__)
47typedef struct CUstream_st *cudaStream_t;
48typedef unsigned long long cudaTextureObject_t;
50typedef __location__(device_builtin)
struct CUstream_st *cudaStream_t;
51typedef __location__(device_builtin)
unsigned long long cudaTextureObject_t;
58 void operator()(
void *ptr);
61 class freeCudaStream_t {
63 void operator()(cudaStream_t ptr);
66 using ptr_t = std::unique_ptr<void, freeCudaPtr_t>;
67 using stream_t = std::unique_ptr<CUstream_st, freeCudaStream_t>;
69 stream_t make_stream(
int flags = 0);
78 static std::optional<tex_t> make(
int height,
int pitch);
83 tex_t &operator=(tex_t &&other);
87 int copy(std::uint8_t *src,
int height,
int pitch);
92 cudaTextureObject_t point;
93 cudaTextureObject_t linear;
100 sws_t(
int in_width,
int in_height,
int out_width,
int out_height,
int pitch,
int threadsPerBlock, ptr_t &&color_matrix);
108 static std::optional<sws_t> make(
int in_width,
int in_height,
int out_width,
int out_height,
int pitch);
111 int convert(std::uint8_t *Y, std::uint8_t *UV, std::uint32_t pitchY, std::uint32_t pitchUV, cudaTextureObject_t texture, stream_t::pointer stream);
112 int convert(std::uint8_t *Y, std::uint8_t *UV, std::uint32_t pitchY, std::uint32_t pitchUV, cudaTextureObject_t texture, stream_t::pointer stream,
const viewport_t &viewport);
std::unique_ptr< platf::avcodec_encode_device_t > make_avcodec_gl_encode_device(int width, int height, int offset_x, int offset_y)
Create a GL->CUDA encoding device for consuming captured dmabufs.
Definition cuda.cpp:489
std::unique_ptr< platf::deinit_t > init(const std::filesystem::path &persistence_filepath, const config::video_t &video_config)
Initialize the implementation and perform the initial state recovery (if needed).
Definition display_device.cpp:704
Definition video_colorspace.h:20
Declarations for colorspace functions.