MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / cubic_interp

Function cubic_interp

src/effects/SphericalProjection.cpp:51–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50namespace {
51 inline double cubic_interp(double p0, double p1, double p2, double p3,
52 double t)
53 {
54 double a0 = -0.5 * p0 + 1.5 * p1 - 1.5 * p2 + 0.5 * p3;
55 double a1 = p0 - 2.5 * p1 + 2.0 * p2 - 0.5 * p3;
56 double a2 = -0.5 * p0 + 0.5 * p2;
57 double a3 = p1;
58 return ((a0 * t + a1) * t + a2) * t + a3;
59 }
60} // namespace
61
62std::shared_ptr<openshot::Frame>

Callers 1

GetFrameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected