- // Set the movit parameters
- bool ok = effect->set_float( "strength_first", reverse ? mix : inverse );
- ok |= effect->set_float( "strength_second", reverse ? inverse : mix );
- assert( ok );
-
- // Get the frames' textures
- GLuint* texture_id[2] = {0, 0};
- *format = mlt_image_glsl_texture;
- mlt_frame_get_image( a_frame, (uint8_t**) &texture_id[0], format, width, height, 0 );
- a_input->useFBOInput( chain, *texture_id[0] );
- *format = mlt_image_glsl_texture;
- mlt_frame_get_image( b_frame, (uint8_t**) &texture_id[1], format, width, height, 0 );
- b_input->useFBOInput( chain, *texture_id[1] );
-
- // Set resolution to that of the a_frame
- *width = mlt_properties_get_int( a_props, "width" );
- *height = mlt_properties_get_int( a_props, "height" );
-
- // Setup rendering to an FBO
- GlslManager* glsl = GlslManager::get_instance();
- if ( output_format == mlt_image_glsl_texture ) {
- error = glsl->render_frame_texture( service, a_frame, *width, *height, image );
- *format = output_format;
- }
- else {
- error = glsl->render_frame_rgba( service, a_frame, *width, *height, image );
- *format = mlt_image_rgb24a;
- }
- mlt_service_unlock( service );
+ // Set the Movit parameters.
+ mlt_properties_set_double( properties, "movit.parms.float.strength_first", reverse ? mix : inverse );
+ mlt_properties_set_double( properties, "movit.parms.float.strength_second", reverse ? inverse : mix );
+
+ uint8_t *a_image, *b_image;
+
+ // Get the two images.
+ *format = mlt_image_glsl;
+ error = mlt_frame_get_image( a_frame, &a_image, format, width, height, writable );
+ error = mlt_frame_get_image( b_frame, &b_image, format, width, height, writable );