]> git.sesse.net Git - mlt/commitdiff
Fix regression in field rendering luma transition.
authorDan Dennedy <dan@dennedy.org>
Thu, 16 Jun 2011 06:39:43 +0000 (23:39 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 16 Jun 2011 06:39:43 +0000 (23:39 -0700)
Due to refactoring composite and luma into
mlt_transition_get_progress_delta().

src/framework/mlt_transition.c
src/modules/core/transition_composite.c

index 9be9e765934296e03ee973ec56fc8d1211d9ad09..dc4bc0fb2bdec3dc21256d3f188b616401355ce4 100644 (file)
@@ -285,7 +285,7 @@ double mlt_transition_get_progress_delta( mlt_transition self, mlt_frame frame )
                double length = out - in + 1;
                double x = ( double ) ( position - in ) / length;
                double y = ( double ) ( position + 1 - in ) / length;
-               progress = length * ( y - x ) / 2.0;
+               progress = ( y - x ) / 2.0;
        }
        return progress;
 }
index 9cb37f02081daa1b7099bf3a904b1ceaaae7b23b..f69ee2ff051064fb6db22941c61be9af26ac001a 100644 (file)
@@ -1120,6 +1120,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
 
                // Calculate the position
                double delta = mlt_transition_get_progress_delta( this, a_frame );
+               mlt_position length = mlt_transition_get_length( this );
 
                // Get the image from the b frame
                uint8_t *image_b = NULL;
@@ -1233,7 +1234,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                        for ( field = 0; field < ( progressive ? 1 : 2 ); field++ )
                        {
                                // Assume lower field (0) first
-                               double field_position = position + field * delta;
+                               double field_position = position + field * delta * length;
                                
                                // Do the calculation if we need to
                                // NB: Locks needed here since the properties are being modified