]> git.sesse.net Git - mlt/commitdiff
Fix shearing bug in affine transition & filter.
authorDan Dennedy <dan@dennedy.org>
Thu, 23 Dec 2010 07:35:47 +0000 (23:35 -0800)
committerDan Dennedy <dan@dennedy.org>
Thu, 23 Dec 2010 07:35:47 +0000 (23:35 -0800)
src/modules/plus/transition_affine.c

index 11c38b15822625c2e936e8a558004c763377e16b..63288322353aa407a95e6b16d634a807e78d02d9 100644 (file)
@@ -450,13 +450,12 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                float cx = result.x + result.w / 2.0;
                float cy = result.y + result.h / 2.0;
                float lower_x = - cx;
-               float upper_x = (float) *width - cx;
                float lower_y = - cy;
-               float upper_y = (float) *height - cy;
                float x_offset = (float) b_width / 2.0;
                float y_offset = (float) b_height / 2.0;
                affine_t affine;
                interpp interp = interpBL_b32;
+               int i, j; // loop counters
 
                affine_init( affine.matrix );
 
@@ -515,9 +514,9 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                        interp = interpBC_b32;
 
                // Do the transform with interpolation
-               for ( y = lower_y; y < upper_y; y ++ )
+               for ( i = 0, y = lower_y; i < *height; i++, y++ )
                {
-                       for ( x = lower_x; x < upper_x; x ++ )
+                       for ( j = 0, x = lower_x; j < *width; j++, x++ )
                        {
                                dx = MapX( affine.matrix, x, y ) / dz + x_offset;
                                dy = MapY( affine.matrix, x, y ) / dz + y_offset;