Sunshine master
Self-hosted game stream host for Moonlight.
nvenc_utils.h
Go to the documentation of this file.
1
5#pragma once
6
7// plafform includes
8#ifdef _WIN32
9 #include <dxgiformat.h>
10#endif
11
12// lib includes
13#include <ffnvcodec/nvEncodeAPI.h>
14
15// local includes
16#include "nvenc_colorspace.h"
17#include "src/platform/common.h"
19
20namespace nvenc {
21
22#ifdef _WIN32
29 DXGI_FORMAT dxgi_format_from_nvenc_format(NV_ENC_BUFFER_FORMAT format);
30#endif
31
38 NV_ENC_BUFFER_FORMAT nvenc_format_from_sunshine_format(platf::pix_fmt_e format);
39
46 nvenc_colorspace_t nvenc_colorspace_from_sunshine_colorspace(const video::sunshine_colorspace_t &sunshine_colorspace);
47
48} // namespace nvenc
Declarations for common platform specific utilities.
pix_fmt_e
Enumerates supported pix fmt options.
Definition common.h:316
Standalone NVENC encoder.
Definition nvenc_base.cpp:94
NV_ENC_BUFFER_FORMAT nvenc_format_from_sunshine_format(platf::pix_fmt_e format)
Convert a Sunshine pixel format to the matching NVENC buffer format.
Definition nvenc_utils.cpp:40
DXGI_FORMAT dxgi_format_from_nvenc_format(NV_ENC_BUFFER_FORMAT format)
Convert an NVENC buffer format to the matching DXGI format.
Definition nvenc_utils.cpp:17
nvenc_colorspace_t nvenc_colorspace_from_sunshine_colorspace(const video::sunshine_colorspace_t &sunshine_colorspace)
Convert Sunshine colorspace metadata to NVENC VUI metadata.
Definition nvenc_utils.cpp:65
Declarations for NVENC YUV colorspace.
Sunshine colorimetry values derived from stream configuration.
Definition video_colorspace.h:26
Declarations for colorspace functions.