#include <stdlib.h>
#include <ctype.h>
#include <string.h>
+#include <math.h>
/** Luma class.
*/
// consumer property from the a_frame
mlt_properties_set_double( b_props, "consumer_aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
mlt_properties_set_double( b_props, "consumer_scale", mlt_properties_get_double( a_props, "consumer_scale" ) );
-
+
// Honour the reverse here
+ if ( mix >= 1.0 )
+ mix -= floor( mix );
+
mix = reverse ? 1 - mix : mix;
frame_delta *= reverse ? -1.0 : 1.0;
}
// Set the b frame properties
- mlt_properties_set_double( b_props, "image.mix", position_calculate( transition, b_frame ) );
- mlt_properties_set_double( b_props, "luma.delta", delta_calculate( transition, b_frame ) );
+ mlt_properties_set_double( b_props, "image.mix", position_calculate( transition, a_frame ) );
+ mlt_properties_set_double( b_props, "luma.delta", delta_calculate( transition, a_frame ) );
mlt_properties_set_int( b_props, "luma.width", this->width );
mlt_properties_set_int( b_props, "luma.height", this->height );
mlt_properties_set_data( b_props, "luma.bitmap", this->bitmap, 0, NULL, NULL );