update cv static thirdparty lib build
[goodguy/history.git] / cinelerra-5.1 / cinelerra / affine.C
index 32f630fc7ef3f2ba33e0e1cfae8623678b745e2d..8c603bd60950f58de46a0c994fcf399a6a7e0820 100644 (file)
@@ -300,24 +300,14 @@ void AffineUnit::calculate_matrix(
 
 }
 
-float AffineUnit::transform_cubic(float dx,
-                               float jm1,
-                               float j,
-                               float jp1,
-                               float jp2)
+static inline float transform_cubic(float dx,
+               float jm1, float j, float jp1, float jp2)
 {
 /* Catmull-Rom - not bad */
        float result = ((( ( - jm1 + 3.0 * j - 3.0 * jp1 + jp2 ) * dx +
                       ( 2.0 * jm1 - 5.0 * j + 4.0 * jp1 - jp2 ) ) * dx +
                       ( - jm1 + jp1 ) ) * dx + (j + j) ) / 2.0;
-// printf("%f %f %f %f %f\n",
-// result,
-// jm1,
-// j,
-// jp1,
-// jp2);
-
-
+// printf("%f %f %f %f %f\n", result, jm1, j, jp1, jp2);
        return result;
 }
 
@@ -882,8 +872,11 @@ void AffineUnit::process_package(LoadPackage *package)
        unsigned char **in_rows = (unsigned char**)server->input->get_rows();
        float round_factor = 0.0;
        if(sizeof(unsigned char) < 4) round_factor = 0.5;
+
        for(int y = ty1; y < ty2; y++)
        {
+//printf("AffineUnit::process_package %d y=%d tx1=%d tx2=%d ty1=%d ty2=%d\n",
+//__LINE__, y, tx1, tx2, ty1, ty2);
                unsigned char *out_row = (unsigned char*)server->output->get_rows()[y];
 
                if(!interpolate)