#include <framework/mlt_producer.h>
#include <framework/mlt_geometry.h>
-inline double smoothstep( const double e1, const double e2, const double a )
+static inline double smoothstep( const double e1, const double e2, const double a )
{
if ( a < e1 ) return 0.0;
if ( a > e2 ) return 1.0;
int invert = mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "invert" ) * 255;
// Render the frame
+ *format = mlt_image_yuv422;
if ( mlt_frame_get_image( this, image, format, width, height, writable ) == 0 && ( !use_luminance || ( int )mix != 1 ) )
{
// Get the alpha mask of the source
double alpha_mix = 0.0;
// Calculate the position and length
- int position = mlt_frame_get_position( frame ) - mlt_filter_get_in( this );
+ int position = mlt_filter_get_position( this, frame );
int in = mlt_filter_get_in( this );
int out = mlt_filter_get_out( this );
int length;
if ( strchr( resource, '%' ) )
{
FILE *test;
- sprintf( temp, "%s/lumas/%s/%s", mlt_factory_prefix( ), mlt_environment( "MLT_NORMALISATION" ), strchr( resource, '%' ) + 1 );
+ sprintf( temp, "%s/lumas/%s/%s", mlt_environment( "MLT_DATA" ), mlt_environment( "MLT_NORMALISATION" ), strchr( resource, '%' ) + 1 );
test = fopen( temp, "r" );
if ( test == NULL )