Hermes
0.7.0
Linux game streaming host
Toggle main menu visibility
Loading...
Searching...
No Matches
video_colorspace.h
Go to the documentation of this file.
1
5
#pragma once
6
7
extern
"C"
{
8
#include <libavutil/pixfmt.h>
9
}
10
11
namespace
video {
12
13
enum class
colorspace_e
{
14
rec601
,
15
rec709
,
16
bt2020sdr
,
17
bt2020
,
18
};
19
20
struct
sunshine_colorspace_t
{
21
colorspace_e
colorspace;
22
bool
full_range;
23
unsigned
bit_depth;
24
};
25
26
bool
colorspace_is_hdr(
const
sunshine_colorspace_t
&colorspace);
27
28
// Declared in video.h
29
struct
config_t
;
30
31
sunshine_colorspace_t
colorspace_from_client_config(
const
config_t
&config,
bool
hdr_display);
32
33
struct
avcodec_colorspace_t
{
34
AVColorPrimaries primaries;
35
AVColorTransferCharacteristic transfer_function;
36
AVColorSpace matrix;
37
AVColorRange range;
38
int
software_format;
39
};
40
41
avcodec_colorspace_t
avcodec_colorspace_from_sunshine_colorspace(
const
sunshine_colorspace_t
&sunshine_colorspace);
42
43
struct
alignas
(16)
color_t
{
44
float
color_vec_y[4];
45
float
color_vec_u[4];
46
float
color_vec_v[4];
47
float
range_y[2];
48
float
range_uv[2];
49
};
50
51
const
color_t
*color_vectors_from_colorspace(
const
sunshine_colorspace_t
&colorspace);
52
53
const
color_t
*color_vectors_from_colorspace(
colorspace_e
colorspace,
bool
full_range);
54
66
const
color_t
*
new_color_vectors_from_colorspace
(
const
sunshine_colorspace_t
&colorspace);
67
}
// namespace video
video::avcodec_colorspace_t
Definition
video_colorspace.h:33
video::color_t
Definition
video_colorspace.h:43
video::config_t
Definition
video.h:37
video::sunshine_colorspace_t
Definition
video_colorspace.h:20
video::new_color_vectors_from_colorspace
const color_t * new_color_vectors_from_colorspace(const sunshine_colorspace_t &colorspace)
New version of color_vectors_from_colorspace() function that better adheres to the standards....
Definition
video_colorspace.cpp:183
video::colorspace_e
colorspace_e
Definition
video_colorspace.h:13
video::colorspace_e::bt2020
@ bt2020
Rec. 2020 HDR.
Definition
video_colorspace.h:17
video::colorspace_e::rec709
@ rec709
Rec. 709.
Definition
video_colorspace.h:15
video::colorspace_e::bt2020sdr
@ bt2020sdr
Rec. 2020 SDR.
Definition
video_colorspace.h:16
video::colorspace_e::rec601
@ rec601
Rec. 601.
Definition
video_colorspace.h:14
src
video_colorspace.h
Generated by
1.18.0