-
-/** Calculate the position for this frame.
-*/
-
-static float position_calculate( mlt_transition this, mlt_frame frame )
-{
- // Get the in and out position
- mlt_position in = mlt_transition_get_in( this );
- mlt_position out = mlt_transition_get_out( this );
-
- // Get the position of the frame
- char *name = mlt_properties_get( mlt_transition_properties( this ), "_unique_id" );
- mlt_position position = mlt_properties_get_position( mlt_frame_properties( frame ), name );
-
- // Now do the calcs
- return ( float )( position - in ) / ( float )( out - in + 1 );
-}
-
-/** Calculate the field delta for this frame - position between two frames.
-*/
-
-static float delta_calculate( mlt_transition this, mlt_frame frame )
-{
- // Get the in and out position
- mlt_position in = mlt_transition_get_in( this );
- mlt_position out = mlt_transition_get_out( this );
-
- // Get the position of the frame
- mlt_position position = mlt_frame_get_position( frame );
-
- // Now do the calcs
- float x = ( float )( position - in ) / ( float )( out - in + 1 );
- float y = ( float )( position + 1 - in ) / ( float )( out - in + 1 );
-
- return ( y - x ) / 2.0;
-}