Go to the documentation of this file.
   21 #ifndef SWSCALE_CSPUTILS_H 
   22 #define SWSCALE_CSPUTILS_H 
   35 #define fmixf(a, b, x) ((b) * (x) + (a) * (1 - (x))) 
   37 static inline float smoothstepf(
float edge0, 
float edge1, 
float x)
 
   41     x = (x - edge0) / (edge1 - edge0);
 
   43     return x * x * (3.0f - 2.0f * x);
 
   81 static const float PQ_M1 = 2610./4096 * 1./4,
 
   94     float fpart = idxf - ipart;
 
  
Struct that contains both white point location and primaries location, providing the complete descrip...
static __device__ float floorf(float a)
static float smoothstepf(float edge0, float edge1, float x)
Struct defining the red, green, and blue primary locations in terms of CIE 1931 chromaticity x and y.
SwsMatrix3x3 ff_sws_ipt_rgb2lms(const AVColorPrimariesDesc *prim)
void ff_sws_matrix3x3_mul(SwsMatrix3x3 *a, const SwsMatrix3x3 *b)
static float pq_eotf(float x)
SwsMatrix3x3 ff_sws_get_adaptation(const AVPrimaryCoefficients *prim, AVWhitepointCoefficients from, AVWhitepointCoefficients to)
Struct containing chromaticity x and y values for the standard CIE 1931 chromaticity definition.
void ff_sws_matrix3x3_invert(SwsMatrix3x3 *mat)
bool ff_prim_superset(const AVPrimaryCoefficients *a, const AVPrimaryCoefficients *b)
Returns true if 'b' is entirely contained in 'a'.
float fmaxf(float, float)
SwsMatrix3x3 ff_sws_xyz2rgb(const AVColorPrimariesDesc *prim)
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
SwsMatrix3x3 ff_sws_ipt_lms2rgb(const AVColorPrimariesDesc *prim)
void ff_sws_matrix3x3_apply(const SwsMatrix3x3 *mat, float vec[3])
SwsMatrix3x3 ff_sws_rgb2xyz(const AVColorPrimariesDesc *prim)
static float pq_oetf(float x)
const float ff_pq_eotf_lut[PQ_LUT_SIZE+1]