mlt_frame_get_image( a_frame, image, format, width, height, 1 );
// Calculate the region now
- composite_calculate( &result, this, a_frame, ( float )position / ( out - in + 1 ) );
+ composite_calculate( &result, this, a_frame, ( float )( position - in ) / ( out - in + 1 ) );
// Fetch the b frame image
result.w = ( int )( result.w * *width / result.nw );
{
if ( alpha == NULL )
{
- dx -= dx & 1;
+ dx += dx & 1;
*p ++ = *( b_image + dy * b_stride + ( dx << 1 ) );
*p ++ = *( b_image + dy * b_stride + ( dx << 1 ) + ( ( x & 1 ) << 1 ) + 1 );
}
else
{
- dx -= dx & 1;
mix = ( float )*( alpha + dy * b_width + dx ) / 255.0;
+ dx += dx & 1;
*p ++ = *p * ( 1 - mix ) + mix * *( b_image + dy * b_stride + ( dx << 1 ) );
*p ++ = *p * ( 1 - mix ) + mix * *( b_image + dy * b_stride + ( dx << 1 ) + ( ( x & 1 ) << 1 ) + 1 );
}