Go to the documentation of this file.
27 printf(
" %s=(%d/%d, %d/%d)\n", label,
47 printf(
"Testing av_csp_luma_coeffs_from_avcsp()\n");
55 printf(
"csp=%-16s -> cr=%d/%d cg=%d/%d cb=%d/%d\n",
59 c->cb.num,
c->cb.den);
62 printf(
"csp=AVCOL_SPC_NB -> %s\n",
66 printf(
"\nTesting av_csp_primaries_desc_from_id() round trip\n");
101 printf(
" round-trip id=%-16s desc=%s\n",
102 back_name ? back_name :
"?",
status);
105 printf(
"prm=AVCOL_PRI_NB -> %s\n",
111 .wp = { { 0, 1 }, { 0, 1 } },
113 .r = { { 0, 1 }, { 0, 1 } },
114 .g = { { 0, 1 }, { 0, 1 } },
115 .b = { { 0, 1 }, { 0, 1 } },
119 printf(
"garbage desc -> %s (expect AVCOL_PRI_UNSPECIFIED)\n",
125 printf(
"\nTesting av_csp_approximate_{trc,eotf}_gamma()\n");
128 double g_trc, g_eotf;
136 printf(
"trc=%-16s trc_gamma=%.6f eotf_gamma=%.6f\n",
140 printf(
"trc=AVCOL_TRC_NB trc_gamma=%.6f eotf_gamma=%.6f\n",
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
__device__ int printf(const char *,...)
AVColorTransferCharacteristic
Color Transfer Characteristic.
AVWhitepointCoefficients wp
Struct that contains both white point location and primaries location, providing the complete descrip...
static void print_cie(const char *label, AVCIExy xy)
@ AVCOL_TRC_NB
Not part of ABI.
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.
Struct containing luma coefficients to be used for RGB to YUV/YCoCg, or similar calculations.
AVColorPrimaries
Chromaticity coordinates of the source primaries.
const char * av_color_space_name(enum AVColorSpace space)
static const uint8_t garbage[]
@ 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.
static int cie_eq(AVCIExy a, AVCIExy b)
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm)
Detects which enum AVColorPrimaries constant corresponds to the given complete gamut description.
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
Struct containing chromaticity x and y values for the standard CIE 1931 chromaticity definition.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
double av_csp_approximate_eotf_gamma(enum AVColorTransferCharacteristic trc)
Determine a suitable EOTF 'gamma' value to match the supplied AVColorTransferCharacteristic.
double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc)
Determine a suitable 'gamma' value to match the supplied AVColorTransferCharacteristic.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
@ AVCOL_TRC_EXT_NB
Not part of ABI.
AVColorSpace
YUV colorspace type.
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
static int desc_eq(const AVColorPrimariesDesc *a, const AVColorPrimariesDesc *b)
@ AVCOL_PRI_EXT_NB
Not part of ABI.
AVPrimaryCoefficients prim
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)