10#include <libavutil/pixfmt.h>
31 const char *colorspace_to_string(colorspace_e colorspace);
FFmpeg colorimetry values used by AVCodec encoders.
Definition video_colorspace.h:65
AVColorRange range
FFmpeg full-range or limited-range flag selected for the encoded stream.
Definition video_colorspace.h:69
AVColorPrimaries primaries
FFmpeg color primaries selected for the encoded stream.
Definition video_colorspace.h:66
AVColorTransferCharacteristic transfer_function
FFmpeg transfer function selected for the encoded stream.
Definition video_colorspace.h:67
int software_format
FFmpeg software pixel format used when hardware frames are not supplied.
Definition video_colorspace.h:70
AVColorSpace matrix
FFmpeg YUV matrix coefficients selected for the encoded stream.
Definition video_colorspace.h:68
Pair of Sunshine and AVCodec colorimetry descriptions.
Definition video_colorspace.h:84
std::array< float, 4 > color_vec_y
Color vec y.
Definition video_colorspace.h:85
std::array< float, 2 > range_y
Range y.
Definition video_colorspace.h:88
std::array< float, 4 > color_vec_u
Color vec u.
Definition video_colorspace.h:86
std::array< float, 2 > range_uv
Range uv.
Definition video_colorspace.h:89
std::array< float, 4 > color_vec_v
Color vec v.
Definition video_colorspace.h:87
Encoding configuration requested by a remote client.
Definition video.h:33
Sunshine colorimetry values derived from stream configuration.
Definition video_colorspace.h:36
unsigned bit_depth
Bit depth.
Definition video_colorspace.h:39
bool full_range
Whether the video range is full-range instead of limited.
Definition video_colorspace.h:38
colorspace_e colorspace
Colorspace.
Definition video_colorspace.h:37
sunshine_colorspace_t colorspace_from_client_config(const config_t &config, bool hdr_display)
Derive Sunshine colorspace metadata from client stream configuration.
Definition video_colorspace.cpp:49
const color_t * color_vectors_from_colorspace(const sunshine_colorspace_t &colorspace, bool unorm_output)
Select static RGB-to-YUV conversion vectors for the requested colorspace and range.
Definition video_colorspace.cpp:158
avcodec_colorspace_t avcodec_colorspace_from_sunshine_colorspace(const sunshine_colorspace_t &sunshine_colorspace)
Convert Sunshine colorspace metadata to FFmpeg AVCodec fields.
Definition video_colorspace.cpp:110
bool colorspace_is_hdr(const sunshine_colorspace_t &colorspace)
Check whether a Sunshine colorspace represents HDR video.
Definition video_colorspace.cpp:42
colorspace_e
Enumerates supported colorspace options.
Definition video_colorspace.h:18
@ bt2020
Rec. 2020 HDR.
Definition video_colorspace.h:22
@ rec709
Rec. 709.
Definition video_colorspace.h:20
@ bt2020sdr
Rec. 2020 SDR.
Definition video_colorspace.h:21
@ rec601
Rec. 601.
Definition video_colorspace.h:19