21#ifndef SWSCALE_CSPUTILS_H
22#define SWSCALE_CSPUTILS_H
35#define fmixf(a, b, x) ((b) * (x) + (a) * (1 - (x)))
37static inline float smoothstepf(
float edge0,
float edge1,
float x)
41 x = (x - edge0) / (edge1 - edge0);
43 return x * x * (3.0f - 2.0f * x);
81static const float PQ_M1 = 2610./4096 * 1./4,
94 float fpart = idxf - ipart;
common internal and external API header
Colorspace value utility functions for libavutil.
const float ff_pq_eotf_lut[PQ_LUT_SIZE+1]
void ff_sws_matrix3x3_invert(SwsMatrix3x3 *mat)
SwsMatrix3x3 ff_sws_get_adaptation(const AVPrimaryCoefficients *prim, AVWhitepointCoefficients from, AVWhitepointCoefficients to)
SwsMatrix3x3 ff_sws_ipt_lms2rgb(const AVColorPrimariesDesc *prim)
static float smoothstepf(float edge0, float edge1, float x)
bool ff_prim_superset(const AVPrimaryCoefficients *a, const AVPrimaryCoefficients *b)
Returns true if 'b' is entirely contained in 'a'.
SwsMatrix3x3 ff_sws_xyz2rgb(const AVColorPrimariesDesc *prim)
void ff_sws_matrix3x3_apply(const SwsMatrix3x3 *mat, float vec[3])
static float pq_oetf(float x)
SwsMatrix3x3 ff_sws_rgb2xyz(const AVColorPrimariesDesc *prim)
static float pq_eotf(float x)
SwsMatrix3x3 ff_sws_ipt_rgb2lms(const AVColorPrimariesDesc *prim)
void ff_sws_matrix3x3_mul(SwsMatrix3x3 *a, const SwsMatrix3x3 *b)
static __device__ float floorf(float a)
float fmaxf(float, float)
AVCIExy AVWhitepointCoefficients
Struct defining white point location in terms of CIE 1931 chromaticity x and y.
Macro definitions for various function/variable attributes.
Struct that contains both white point location and primaries location, providing the complete descrip...
Struct defining the red, green, and blue primary locations in terms of CIE 1931 chromaticity x and y.