From ed2b3e0c6b5ab6ba6767e9d41fecb85431808401 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Wed, 15 Jun 2011 23:39:43 -0700 Subject: [PATCH] Fix regression in field rendering luma transition. Due to refactoring composite and luma into mlt_transition_get_progress_delta(). --- src/framework/mlt_transition.c | 2 +- src/modules/core/transition_composite.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/framework/mlt_transition.c b/src/framework/mlt_transition.c index 9be9e765..dc4bc0fb 100644 --- a/src/framework/mlt_transition.c +++ b/src/framework/mlt_transition.c @@ -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; } diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index 9cb37f02..f69ee2ff 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -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 -- 2.39.2