X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fplus%2Ftransition_affine.c;h=9c3883c8ca73e7cbe3665ca279d21b866305c5ab;hb=de09bd0b00071c23666dc21bb15c619c0c9095d6;hp=e04f9ff690d4dcd68726887459fd86d3a2fbba4d;hpb=ec2805bbb985b387c4346bd86f05596cb1da18ea;p=melted diff --git a/src/modules/plus/transition_affine.c b/src/modules/plus/transition_affine.c index e04f9ff..9c3883c 100644 --- a/src/modules/plus/transition_affine.c +++ b/src/modules/plus/transition_affine.c @@ -517,7 +517,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f 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 ); @@ -620,14 +620,14 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f { 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 ); }