pgm scaling in transition_composite.
[melted] / src / modules / core / transition_luma.c
index 97b2266..9386b0b 100644 (file)
@@ -37,7 +37,8 @@ static float position_calculate( mlt_transition this, mlt_frame frame )
        mlt_position out = mlt_transition_get_out( this );
 
        // Get the position of the frame
-       mlt_position position = mlt_frame_get_position( 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 );
@@ -406,11 +407,8 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                                        uint8_t *luma_image;
                                        mlt_image_format luma_format = mlt_image_yuv422;
 
-                                       // Request a luma image the size of transition image request
-                                       luma_width = *width;
-                                       luma_height = *height;
-
                                        // Get image from the luma producer
+                                       mlt_properties_set( mlt_frame_properties( luma_frame ), "rescale.interp", "none" );
                                        mlt_frame_get_image( luma_frame, &luma_image, &luma_format, &luma_width, &luma_height, 0 );
 
                                        // Generate the luma map
@@ -449,7 +447,6 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
        // Since we are the consumer of the b_frame, we must pass along this
        // 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 )