}
-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;
}
server->use_opengl)
{
#ifdef HAVE_GL
+ out_x1 -= pivot_offset_x; out_y1 -= pivot_offset_y;
+ out_x2 -= pivot_offset_x; out_y2 -= pivot_offset_y;
+ out_x3 -= pivot_offset_x; out_y3 -= pivot_offset_y;
+ out_x4 -= pivot_offset_x; out_y4 -= pivot_offset_y;
+
server->output->to_texture();
server->output->enable_opengl();
server->output->init_screen();
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)