| 608 | const DecimateAlpha* ytab, int ytab_size, const int* yofs); |
| 609 | |
| 610 | static GI_FORCEINLINE void interpolate_cubic(float x, float* coeffs) { |
| 611 | const float A = -0.75f; |
| 612 | |
| 613 | coeffs[0] = ((A * (x + 1) - 5 * A) * (x + 1) + 8 * A) * (x + 1) - 4 * A; |
| 614 | coeffs[1] = ((A + 2) * x - (A + 3)) * x * x + 1; |
| 615 | coeffs[2] = ((A + 2) * (1 - x) - (A + 3)) * (1 - x) * (1 - x) + 1; |
| 616 | coeffs[3] = 1.f - coeffs[0] - coeffs[1] - coeffs[2]; |
| 617 | } |
| 618 | static GI_FORCEINLINE void interpolate_lanczos4(float x, float* coeffs) { |
| 619 | static const double s45 = 0.70710678118654752440084436210485; |
| 620 | static const double cs[][2] = {{1, 0}, {-s45, -s45}, {0, 1}, {s45, -s45}, |