7#if defined(SUNSHINE_BUILD_CUDA)
18 class avcodec_encode_device_t;
25 std::vector<std::string>
28 std::unique_ptr<platf::avcodec_encode_device_t>
29 make_avcodec_encode_device(
int width,
int height,
bool vram);
39 std::unique_ptr<platf::avcodec_encode_device_t>
46typedef struct cudaArray *cudaArray_t;
48 #if !defined(__CUDACC__)
49typedef struct CUstream_st *cudaStream_t;
50typedef unsigned long long cudaTextureObject_t;
52typedef __location__(device_builtin)
struct CUstream_st *cudaStream_t;
53typedef __location__(device_builtin)
unsigned long long cudaTextureObject_t;
61 operator()(
void *ptr);
64 class freeCudaStream_t {
67 operator()(cudaStream_t ptr);
70 using ptr_t = std::unique_ptr<void, freeCudaPtr_t>;
71 using stream_t = std::unique_ptr<CUstream_st, freeCudaStream_t>;
74 make_stream(
int flags = 0);
83 static std::optional<tex_t>
84 make(
int height,
int pitch);
90 operator=(tex_t &&other);
95 copy(std::uint8_t *src,
int height,
int pitch);
100 cudaTextureObject_t point;
101 cudaTextureObject_t linear;
108 sws_t(
int in_width,
int in_height,
int out_width,
int out_height,
int pitch,
int threadsPerBlock, ptr_t &&color_matrix);
116 static std::optional<sws_t>
117 make(
int in_width,
int in_height,
int out_width,
int out_height,
int pitch);
121 convert(std::uint8_t *Y, std::uint8_t *UV, std::uint32_t pitchY, std::uint32_t pitchUV, cudaTextureObject_t texture, stream_t::pointer stream);
123 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:508
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:721
Definition video_colorspace.h:20
Declarations for colorspace functions.