23 return 0.75f - (
x *
x);
26 return 0.50f * (
x - 1.5f) * (
x - 1.5f);
40 return 0.5f *
x * x2 - x2 + 2.0f / 3.0f;
43 return (2.0f -
x) * (2.0f -
x) * (2.0f -
x) / 6.0f;
56 return 1.5f * x2 *
x - 2.5f * x2 + 1.0f;
59 return -0.5f * x2 *
x + 2.5f * x2 - 4.0f *
x + 2.0f;
66 float b = 1.0f / 3.0f, c = 1.0f / 3.0f;
67 float p0 = (6.0f - 2.0f *
b) / 6.0f;
68 float p2 = (-18.0f + 12.0f *
b + 6.0f * c) / 6.0f;
69 float p3 = (12.0f - 9.0f *
b - 6.0f * c) / 6.0f;
70 float q0 = (8.0f *
b + 24.0f * c) / 6.0f;
71 float q1 = (-12.0f *
b - 48.0f * c) / 6.0f;
72 float q2 = (6.0f *
b + 30.0f * c) / 6.0f;
73 float q3 = (-
b - 6.0f * c) / 6.0f;
79 return (q0 -
x * (q1 -
x * (q2 -
x * q3)));
82 return (p0 +
x *
x * (p2 -
x * p3));
85 return (p0 +
x *
x * (p2 +
x * p3));
88 return (q0 +
x * (q1 +
x * (q2 +
x * q3)));
95 constexpr float scale = 1.6f;
117 constexpr float two_scale2 = 2.0f *
scale *
scale;
119 return 1.0f /
sqrtf(
float(
M_PI) * two_scale2) *
expf(-
x *
x / two_scale2);
#define BLI_assert_unreachable()
static float filt_quadratic(float x)
MatBase< T, NumCol, NumRow > scale(const MatBase< T, NumCol, NumRow > &mat, const VectorT &scale)
static float filt_cubic(float x)
static float filt_mitchell(float x)
static float filt_catrom(float x)
float filter_kernel_value(FilterKernel kernel, float x)