libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
colorspaceconverter.h
Go to the documentation of this file.
1
8#pragma once
9
11
13
21struct CSC {
22 float matrix[3][3];
23 float offset[3];
24};
25
28 {
29 {0.2126f, 0.7152f, 0.0722f},
30 {-0.1146f, -0.3854f, 0.5f},
31 {0.5f, -0.4542f, -0.0458f}
32 },
33 {16.0f / 255.0f, 128.0f / 255.0f, 128.0f / 255.0f}
34};
35
38 {
39 {1.0f, 0.0f, 1.5748f},
40 {1.0f, -0.1873f, -0.4681f},
41 {1.0f, 1.8556f, 0.0f}
42 },
43 {-16.0f / 255.0f, -128.0f / 255.0f, -128.0f / 255.0f}
44};
45
47
const CSC RGB_to_YCbCr_Rec709
Conversion matrix from RGB to YCbCr using ITU-R BT.709 coefficients.
Definition colorspaceconverter.h:27
const CSC YCbCr_Rec709_to_RGB
Conversion matrix from YCbCr (BT.709) to RGB.
Definition colorspaceconverter.h:37
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19
Color Space Conversion matrix and offset.
Definition colorspaceconverter.h:21
float offset[3]
Per-channel offset applied before or after the matrix.
Definition colorspaceconverter.h:23
float matrix[3][3]
3x3 color conversion matrix.
Definition colorspaceconverter.h:22