PipeWire 1.6.8

Loading...
Searching...
No Matches
color-types.h
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2025 PipeWire authors */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_VIDEO_COLOR_TYPES_H
6#define SPA_VIDEO_COLOR_TYPES_H
7
8#include <spa/utils/type.h>
9#include <spa/param/video/color.h>
10
11#define SPA_TYPE_INFO_VideColorRange SPA_TYPE_INFO_ENUM_BASE "VideoColorRange"
12#define SPA_TYPE_INFO_VIDEO_COLOR_RANGE_BASE SPA_TYPE_INFO_VideColorRange ":"
13
14 static const struct spa_type_info spa_type_video_color_range[] = {
15 { SPA_VIDEO_COLOR_RANGE_UNKNOWN, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_RANGE_BASE "unknown", NULL },
16 { SPA_VIDEO_COLOR_RANGE_0_255, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_RANGE_BASE "0-255", NULL },
17 { SPA_VIDEO_COLOR_RANGE_16_235, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_RANGE_BASE "16-235", NULL },
18 { 0, 0, NULL, NULL },
19};
20
21#define SPA_TYPE_INFO_VideoColorMatrix SPA_TYPE_INFO_ENUM_BASE "VideoColorMatrix"
22#define SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE SPA_TYPE_INFO_VideoColorMatrix ":"
23
24 static const struct spa_type_info spa_type_video_color_matrix[] = {
25 { SPA_VIDEO_COLOR_MATRIX_UNKNOWN, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "unknown", NULL },
26 { SPA_VIDEO_COLOR_MATRIX_RGB, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "rgb", NULL },
27 { SPA_VIDEO_COLOR_MATRIX_FCC, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "fcc", NULL },
28 { SPA_VIDEO_COLOR_MATRIX_BT709, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "bt709", NULL },
29 { SPA_VIDEO_COLOR_MATRIX_BT601, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "bt601", NULL },
30 { SPA_VIDEO_COLOR_MATRIX_SMPTE240M, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "smpte240m", NULL },
31 { SPA_VIDEO_COLOR_MATRIX_BT2020, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_MATRIX_BASE "bt2020", NULL },
32 { 0, 0, NULL, NULL },
33};
34
35#define SPA_TYPE_INFO_VideoTransferFunction SPA_TYPE_INFO_ENUM_BASE "VideoTransferFunction"
36#define SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE SPA_TYPE_INFO_VideoTransferFunction ":"
37
38 static const struct spa_type_info spa_type_video_transfer_function[] = {
39 { SPA_VIDEO_TRANSFER_UNKNOWN, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "unknown", NULL },
40 { SPA_VIDEO_TRANSFER_GAMMA10, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "gamma10", NULL },
41 { SPA_VIDEO_TRANSFER_GAMMA18, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "gamma18", NULL },
42 { SPA_VIDEO_TRANSFER_GAMMA20, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "gamma20", NULL },
43 { SPA_VIDEO_TRANSFER_GAMMA22, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "gamma22", NULL },
44 { SPA_VIDEO_TRANSFER_BT709, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "bt709", NULL },
45 { SPA_VIDEO_TRANSFER_SMPTE240M, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "smpte240m", NULL },
46 { SPA_VIDEO_TRANSFER_SRGB, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "srgb", NULL },
47 { SPA_VIDEO_TRANSFER_GAMMA28, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "gamma28", NULL },
48 { SPA_VIDEO_TRANSFER_LOG100, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "log100", NULL },
49 { SPA_VIDEO_TRANSFER_LOG316, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "log316", NULL },
50 { SPA_VIDEO_TRANSFER_BT2020_12, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "bt2020-12", NULL },
51 { SPA_VIDEO_TRANSFER_ADOBERGB, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "adobergb", NULL },
52 { SPA_VIDEO_TRANSFER_BT2020_10, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "bt2020-10", NULL },
53 { SPA_VIDEO_TRANSFER_SMPTE2084, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "smpte2084", NULL },
54 { SPA_VIDEO_TRANSFER_ARIB_STD_B67, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "arib-std-b67", NULL },
55 { SPA_VIDEO_TRANSFER_BT601, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_TRANSFER_FUNCTION_BASE "bt601", NULL },
56 { 0, 0, NULL, NULL },
57};
58
59#define SPA_TYPE_INFO_VideoColorPrimaries SPA_TYPE_INFO_ENUM_BASE "VideoColorPrimaries"
60#define SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE SPA_TYPE_INFO_VideoColorPrimaries ":"
61
62 static const struct spa_type_info spa_type_video_color_primaries[] = {
63 { SPA_VIDEO_COLOR_PRIMARIES_UNKNOWN, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "unknown", NULL },
64 { SPA_VIDEO_COLOR_PRIMARIES_BT709, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "bt709", NULL },
65 { SPA_VIDEO_COLOR_PRIMARIES_BT470M, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "bt470m", NULL },
66 { SPA_VIDEO_COLOR_PRIMARIES_BT470BG, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "bt470bg", NULL },
67 { SPA_VIDEO_COLOR_PRIMARIES_SMPTE170M, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "smpte170m", NULL },
68 { SPA_VIDEO_COLOR_PRIMARIES_SMPTE240M, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "smpte240m", NULL },
69 { SPA_VIDEO_COLOR_PRIMARIES_FILM, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "film", NULL },
70 { SPA_VIDEO_COLOR_PRIMARIES_BT2020, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "bt2020", NULL },
71 { SPA_VIDEO_COLOR_PRIMARIES_ADOBERGB, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "adobergb", NULL },
72 { SPA_VIDEO_COLOR_PRIMARIES_SMPTEST428, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "smptest428", NULL },
73 { SPA_VIDEO_COLOR_PRIMARIES_SMPTERP431, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "smpterp431", NULL },
74 { SPA_VIDEO_COLOR_PRIMARIES_SMPTEEG432, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "smpteeg432", NULL },
75 { SPA_VIDEO_COLOR_PRIMARIES_EBU3213, SPA_TYPE_Int, SPA_TYPE_INFO_VIDEO_COLOR_PRIMARIES_BASE "ebu3213", NULL },
76 { 0, 0, NULL, NULL },
77};
78
79#endif /* SPA_VIDEO_COLOR_TYPES_H */
color.h
spa/param/video/color.h
SPA_VIDEO_COLOR_MATRIX_FCC
@ SPA_VIDEO_COLOR_MATRIX_FCC
FCC color matrix.
Definition color.h:40
SPA_VIDEO_COLOR_MATRIX_BT709
@ SPA_VIDEO_COLOR_MATRIX_BT709
ITU BT.709 color matrix.
Definition color.h:41
SPA_VIDEO_COLOR_MATRIX_UNKNOWN
@ SPA_VIDEO_COLOR_MATRIX_UNKNOWN
unknown matrix
Definition color.h:38
SPA_VIDEO_COLOR_MATRIX_SMPTE240M
@ SPA_VIDEO_COLOR_MATRIX_SMPTE240M
SMTPE 240M color matrix.
Definition color.h:43
SPA_VIDEO_COLOR_MATRIX_BT601
@ SPA_VIDEO_COLOR_MATRIX_BT601
ITU BT.601 color matrix.
Definition color.h:42
SPA_VIDEO_COLOR_MATRIX_RGB
@ SPA_VIDEO_COLOR_MATRIX_RGB
identity matrix
Definition color.h:39
SPA_VIDEO_COLOR_MATRIX_BT2020
@ SPA_VIDEO_COLOR_MATRIX_BT2020
ITU-R BT.2020 color matrix.
Definition color.h:44
SPA_VIDEO_COLOR_RANGE_16_235
@ SPA_VIDEO_COLOR_RANGE_16_235
[16..235] for 8 bit components.
Definition color.h:29
SPA_VIDEO_COLOR_RANGE_UNKNOWN
@ SPA_VIDEO_COLOR_RANGE_UNKNOWN
unknown range
Definition color.h:27
SPA_VIDEO_COLOR_RANGE_0_255
@ SPA_VIDEO_COLOR_RANGE_0_255
[0..255] for 8 bit components
Definition color.h:28
SPA_VIDEO_COLOR_PRIMARIES_BT709
@ SPA_VIDEO_COLOR_PRIMARIES_BT709
BT709 primaries.
Definition color.h:85
SPA_VIDEO_COLOR_PRIMARIES_UNKNOWN
@ SPA_VIDEO_COLOR_PRIMARIES_UNKNOWN
unknown color primaries
Definition color.h:84
SPA_VIDEO_COLOR_PRIMARIES_SMPTE240M
@ SPA_VIDEO_COLOR_PRIMARIES_SMPTE240M
SMPTE240M primaries.
Definition color.h:89
SPA_VIDEO_COLOR_PRIMARIES_BT470M
@ SPA_VIDEO_COLOR_PRIMARIES_BT470M
BT470M primaries.
Definition color.h:86
SPA_VIDEO_COLOR_PRIMARIES_ADOBERGB
@ SPA_VIDEO_COLOR_PRIMARIES_ADOBERGB
Adobe RGB primaries.
Definition color.h:92
SPA_VIDEO_COLOR_PRIMARIES_SMPTERP431
@ SPA_VIDEO_COLOR_PRIMARIES_SMPTERP431
SMPTE RP 431 primaries (ST 431-2 (2011) / DCI P3).
Definition color.h:94
SPA_VIDEO_COLOR_PRIMARIES_SMPTE170M
@ SPA_VIDEO_COLOR_PRIMARIES_SMPTE170M
SMPTE170M primaries.
Definition color.h:88
SPA_VIDEO_COLOR_PRIMARIES_FILM
@ SPA_VIDEO_COLOR_PRIMARIES_FILM
Generic film.
Definition color.h:90
SPA_VIDEO_COLOR_PRIMARIES_BT2020
@ SPA_VIDEO_COLOR_PRIMARIES_BT2020
BT2020 primaries.
Definition color.h:91
SPA_VIDEO_COLOR_PRIMARIES_SMPTEST428
@ SPA_VIDEO_COLOR_PRIMARIES_SMPTEST428
SMPTE ST 428 primaries (CIE 1931 XYZ).
Definition color.h:93
SPA_VIDEO_COLOR_PRIMARIES_SMPTEEG432
@ SPA_VIDEO_COLOR_PRIMARIES_SMPTEEG432
SMPTE EG 432 primaries (ST 432-1 (2010) / P3 D65).
Definition color.h:95
SPA_VIDEO_COLOR_PRIMARIES_BT470BG
@ SPA_VIDEO_COLOR_PRIMARIES_BT470BG
BT470BG primaries.
Definition color.h:87
SPA_VIDEO_COLOR_PRIMARIES_EBU3213
@ SPA_VIDEO_COLOR_PRIMARIES_EBU3213
EBU 3213 primaries (JEDEC P22 phosphors).
Definition color.h:96
SPA_VIDEO_TRANSFER_ADOBERGB
@ SPA_VIDEO_TRANSFER_ADOBERGB
Gamma 2.19921875.
Definition color.h:66
SPA_VIDEO_TRANSFER_LOG316
@ SPA_VIDEO_TRANSFER_LOG316
Logarithmic transfer characteristic 316.22777:1 range.
Definition color.h:62
SPA_VIDEO_TRANSFER_SRGB
@ SPA_VIDEO_TRANSFER_SRGB
Gamma 2.4 curve with a linear segment in the lower range.
Definition color.h:59
SPA_VIDEO_TRANSFER_SMPTE240M
@ SPA_VIDEO_TRANSFER_SMPTE240M
Gamma 2.2 curve with a linear segment in the lower range.
Definition color.h:58
SPA_VIDEO_TRANSFER_GAMMA28
@ SPA_VIDEO_TRANSFER_GAMMA28
Gamma 2.8 curve.
Definition color.h:60
SPA_VIDEO_TRANSFER_GAMMA10
@ SPA_VIDEO_TRANSFER_GAMMA10
linear RGB, gamma 1.0 curve
Definition color.h:53
SPA_VIDEO_TRANSFER_BT2020_12
@ SPA_VIDEO_TRANSFER_BT2020_12
Gamma 2.2 curve with a linear segment in the lower range.
Definition color.h:63
SPA_VIDEO_TRANSFER_GAMMA22
@ SPA_VIDEO_TRANSFER_GAMMA22
Gamma 2.2 curve.
Definition color.h:56
SPA_VIDEO_TRANSFER_BT709
@ SPA_VIDEO_TRANSFER_BT709
Gamma 2.2 curve with a linear segment in the lower range.
Definition color.h:57
SPA_VIDEO_TRANSFER_BT2020_10
@ SPA_VIDEO_TRANSFER_BT2020_10
Rec.
Definition color.h:67
SPA_VIDEO_TRANSFER_UNKNOWN
@ SPA_VIDEO_TRANSFER_UNKNOWN
unknown transfer function
Definition color.h:52
SPA_VIDEO_TRANSFER_SMPTE2084
@ SPA_VIDEO_TRANSFER_SMPTE2084
SMPTE ST 2084 for 10, 12, 14, and 16-bit systems.
Definition color.h:70
SPA_VIDEO_TRANSFER_BT601
@ SPA_VIDEO_TRANSFER_BT601
also known as SMPTE170M / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC Functionally the same as the va...
Definition color.h:74
SPA_VIDEO_TRANSFER_LOG100
@ SPA_VIDEO_TRANSFER_LOG100
Logarithmic transfer characteristic 100:1 range.
Definition color.h:61
SPA_VIDEO_TRANSFER_ARIB_STD_B67
@ SPA_VIDEO_TRANSFER_ARIB_STD_B67
Association of Radio Industries and Businesses (ARIB) STD-B67 and Rec.
Definition color.h:72
SPA_VIDEO_TRANSFER_GAMMA20
@ SPA_VIDEO_TRANSFER_GAMMA20
Gamma 2.0 curve.
Definition color.h:55
SPA_VIDEO_TRANSFER_GAMMA18
@ SPA_VIDEO_TRANSFER_GAMMA18
Gamma 1.8 curve.
Definition color.h:54
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition type.h:45
type.h
spa/utils/type.h
spa_type_info
Definition type.h:156