projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework cpozer zoom slider
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
affine.C
diff --git
a/cinelerra-5.1/cinelerra/affine.C
b/cinelerra-5.1/cinelerra/affine.C
index 32f630fc7ef3f2ba33e0e1cfae8623678b745e2d..09f81f2ed6b9542d4377f0e2a825423bb1ba160d 100644
(file)
--- a/
cinelerra-5.1/cinelerra/affine.C
+++ b/
cinelerra-5.1/cinelerra/affine.C
@@
-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;
{
/* 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;
}
return result;
}
@@
-382,6
+372,11
@@
void AffineUnit::process_package(LoadPackage *package)
server->use_opengl)
{
#ifdef HAVE_GL
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();
server->output->to_texture();
server->output->enable_opengl();
server->output->init_screen();
@@
-882,8
+877,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;
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++)
{
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)
unsigned char *out_row = (unsigned char*)server->output->get_rows()[y];
if(!interpolate)