57 #define BT709_alpha 1.099296826809442
58 #define BT709_beta 0.018053968510807
65 return (0.0 > Lc) ? 0.0
66 : ( b > Lc) ? 4.500 * Lc
67 : a * pow(Lc, 0.45) - (a - 1.0);
72 return (0.0 > Lc) ? 0.0 : pow(Lc, 1.0/ 2.2);
77 return (0.0 > Lc) ? 0.0 : pow(Lc, 1.0/ 2.8);
82 const double a = 1.1115;
83 const double b = 0.0228;
85 return (0.0 > Lc) ? 0.0
86 : ( b > Lc) ? 4.000 * Lc
87 : a * pow(Lc, 0.45) - (a - 1.0);
97 return (0.01 > Lc) ? 0.0 : 1.0 + log10(Lc) / 2.0;
103 return (0.00316227766 > Lc) ? 0.0 : 1.0 + log10(Lc) / 2.5;
111 return (-b >= Lc) ? -a * pow(-Lc, 0.45) + (a - 1.0)
112 : ( b > Lc) ? 4.500 * Lc
113 : a * pow( Lc, 0.45) - (a - 1.0);
121 return (-0.0045 >= Lc) ? -(a * pow(-4.0 * Lc, 0.45) + (a - 1.0)) / 4.0
122 : ( b > Lc) ? 4.500 * Lc
123 : a * pow( Lc, 0.45) - (a - 1.0);
128 const double a = 1.055;
129 const double b = 0.0031308;
131 return (0.0 > Lc) ? 0.0
132 : ( b > Lc) ? 12.92 * Lc
133 : a * pow(Lc, 1.0 / 2.4) - (a - 1.0);
138 const double c1 = 3424.0 / 4096.0;
139 const double c2 = 32.0 * 2413.0 / 4096.0;
140 const double c3 = 32.0 * 2392.0 / 4096.0;
141 const double m = 128.0 * 2523.0 / 4096.0;
142 const double n = 0.25 * 2610.0 / 4096.0;
143 const double L = Lc / 10000.0;
144 const double Ln = pow(L, n);
146 return (0.0 > Lc) ? 0.0
147 : pow((c1 + c2 * Ln) / (1.0 + c3 * Ln), m);
153 return (0.0 > Lc) ? 0.0
154 : pow(48.0 * Lc / 52.37, 1.0 / 2.6);
static double avpriv_trc_smpte_st428_1(double Lc)
ITU-R BT2020 for 12 bit system.
static double avpriv_trc_iec61966_2_1(double Lc)
"Linear transfer characteristics"
double(* avpriv_trc_function)(double)
static double avpriv_trc_smpte240M(double Lc)
static double avpriv_trc_smpte_st2084(double Lc)
AVColorTransferCharacteristic
Color Transfer Characteristic.
static double avpriv_trc_log(double Lc)
double avpriv_get_gamma_from_trc(enum AVColorTransferCharacteristic trc)
Determine a suitable 'gamma' value to match the supplied AVColorTransferCharacteristic.
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
static double avpriv_trc_iec61966_2_4(double Lc)
ITU-R BT1361 Extended Colour Gamut.
static double avpriv_trc_bt709(double Lc)
static double avpriv_trc_gamma28(double Lc)
static double avpriv_trc_log_sqrt(double Lc)
avpriv_trc_function avpriv_get_trc_function_from_trc(enum AVColorTransferCharacteristic trc)
Determine the function needed to apply the given AVColorTransferCharacteristic to linear input...
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
int(* func)(AVBPrint *dst, const char *in, const char *arg)
static double avpriv_trc_gamma22(double Lc)
static double avpriv_trc_bt1361(double Lc)
IEC 61966-2-1 (sRGB or sYCC)
SMPTE ST 2084 for 10, 12, 14 and 16 bit systems.
static double avpriv_trc_linear(double Lc)
ITU-R BT2020 for 10 bit system.
"Logarithmic transfer characteristic (100:1 range)"