Go to the documentation of this file.
33 #define AVR(d) { (int)(d * 100000 + 0.5), 100000 }
66 #define WP_D65 { AVR(0.3127), AVR(0.3290) }
67 #define WP_C { AVR(0.3100), AVR(0.3160) }
68 #define WP_DCI { AVR(0.3140), AVR(0.3510) }
69 #define WP_E { {1, 3}, {1, 3} }
111 if (!
ref->prim.r.x.num)
static av_always_inline AVRational abs_sub_q(AVRational r1, AVRational r2)
AVWhitepointCoefficients wp
Struct that contains both white point location and primaries location, providing the complete descrip...
const struct AVLumaCoefficients * av_csp_luma_coeffs_from_avcsp(enum AVColorSpace csp)
Retrieves the Luma coefficients necessary to construct a conversion matrix from an enum constant desc...
@ AVCOL_SPC_NB
Not part of ABI.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
Struct containing luma coefficients to be used for RGB to YUV/YCoCg, or similar calculations.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
AVRational av_sub_q(AVRational b, AVRational c)
Subtract one rational from another.
@ AVCOL_SPC_BT2020_CL
ITU-R BT2020 constant luminance system.
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
@ AVCOL_PRI_NB
Not part of ABI.
const AVColorPrimariesDesc * av_csp_primaries_desc_from_id(enum AVColorPrimaries prm)
Retrieves a complete gamut description from an enum constant describing the color primaries.
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
@ AVCOL_PRI_SMPTE428
SMPTE ST 428-1 (CIE 1931 XYZ)
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm)
Detects which enum AVColorPrimaries constant corresponds to the given complete gamut description.
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Rational number (pair of numerator and denominator).
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
@ AVCOL_PRI_BT2020
ITU-R BT2020.
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
@ AVCOL_PRI_FILM
colour filters using Illuminant C
static AVRational av_make_q(int num, int den)
Create an AVRational.
@ AVCOL_SPC_SMPTE240M
derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
AVColorSpace
YUV colorspace type.
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
@ AVCOL_SPC_FCC
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
static int ref[MAX_W *MAX_W]
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
static av_always_inline int diff(const uint32_t a, const uint32_t b)
AVRational av_add_q(AVRational b, AVRational c)
Add two rationals.
AVPrimaryCoefficients prim
static const struct AVLumaCoefficients luma_coefficients[AVCOL_SPC_NB]
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B