X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Faffine.C;h=09f81f2ed6b9542d4377f0e2a825423bb1ba160d;hb=2162ee52e4d53d53ad5ce40af82784d8c8da0bad;hp=32f630fc7ef3f2ba33e0e1cfae8623678b745e2d;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/affine.C b/cinelerra-5.1/cinelerra/affine.C index 32f630fc..09f81f2e 100644 --- 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; -// 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; } @@ -382,6 +372,11 @@ void AffineUnit::process_package(LoadPackage *package) 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(); @@ -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; + 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)