mlt_properties_set_int( properties, "width", *width );
mlt_properties_set_int( properties, "height", *height );
- mlt_properties_set_int( properties, "aspect_ratio", 1 );
+ mlt_properties_set_int( properties, "aspect_ratio", 0 );
switch( *format )
{
// Fetch the cuts parent properties
parent = MLT_PRODUCER_PROPERTIES( mlt_producer_cut_parent( producer ) );
+ // Remove fezzik normalisers for fx cuts
+ if ( mlt_properties_get_int( parent, "meta.fx_cut" ) )
+ {
+ mlt_service service = MLT_PRODUCER_SERVICE( mlt_producer_cut_parent( producer ) );
+ mlt_filter filter = mlt_service_filter( service, 0 );
+ while ( filter != NULL && mlt_properties_get_int( MLT_FILTER_PROPERTIES( filter ), "_fezzik" ) )
+ {
+ mlt_service_detach( service, filter );
+ filter = mlt_service_filter( service, 0 );
+ }
+ }
+
// Check that we have room
if ( this->count >= this->size )
{
int width_b = *width;
int height_b = *height;
+ // Vars for alphas
+ uint8_t *alpha_a = NULL;
+ uint8_t *alpha_b = NULL;
+
// Composites always need scaling... defaulting to lowest
char *rescale = mlt_properties_get( a_props, "rescale.interp" );
if ( rescale == NULL || !strcmp( rescale, "none" ) )
}
if ( a_frame == b_frame )
+ {
get_b_frame_image( this, b_frame, &image_b, &width_b, &height_b, &result );
+ alpha_b = mlt_frame_get_alpha_mask( b_frame );
+ }
// Get the image from the a frame
mlt_frame_get_image( a_frame, image, format, width, height, 1 );
+ alpha_a = mlt_frame_get_alpha_mask( a_frame );
// Optimisation - no compositing required
if ( result.item.mix == 0 || ( result.item.w == 0 && result.item.h == 0 ) )
{
uint8_t *dest = *image;
uint8_t *src = image_b;
- uint8_t *alpha_b = mlt_frame_get_alpha_mask( b_frame );
- uint8_t *alpha_a = mlt_frame_get_alpha_mask( a_frame );
int progressive =
mlt_properties_get_int( a_props, "consumer_deinterlace" ) ||
mlt_properties_get_int( properties, "progressive" );
int32_t luma_softness = mlt_properties_get_double( properties, "softness" ) * ( 1 << 16 );
uint16_t *luma_bitmap = get_luma( properties, width_b, height_b );
+
+ alpha_b = alpha_b == NULL ? mlt_frame_get_alpha_mask( b_frame ) : alpha_b;
+
composite_line_fn line_fn = composite_line_yuv;
if ( mlt_properties_get_int( properties, "or" ) )
int reverse = mlt_properties_get_int( properties, "reverse" );
int invert = mlt_properties_get_int( properties, "invert" );
- if ( mlt_properties_get( a_props, "rescale.interp" ) == NULL )
+ if ( mlt_properties_get( a_props, "rescale.interp" ) == NULL || !strcmp( mlt_properties_get( a_props, "rescale.interp" ), "none" ) )
mlt_properties_set( a_props, "rescale.interp", "nearest" );
// Since we are the consumer of the b_frame, we must pass along this
mlt_properties_set_double( a_props, "aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
if ( mlt_properties_get_double( b_props, "aspect_ratio" ) == 0.0 )
mlt_properties_set_double( b_props, "aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
- if ( !strcmp( mlt_properties_get( a_props, "rescale.interp" ), "none" ) )
- mlt_properties_set_double( b_props, "consumer_aspect_ratio", mlt_properties_get_double( a_props, "aspect_ratio" ) );
- else
- 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_aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
// Honour the reverse here
if ( mix >= 1.0 )
frame_delta *= reverse || invert ? -1.0 : 1.0;
// Ensure we get scaling on the b_frame
- mlt_properties_set( b_props, "rescale.interp", "nearest" );
+ if ( mlt_properties_get( b_props, "rescale.interp" ) == NULL || !strcmp( mlt_properties_get( b_props, "rescale.interp" ), "none" ) )
+ mlt_properties_set( b_props, "rescale.interp", "nearest" );
if ( mlt_properties_get( properties, "fixed" ) )
mix = mlt_properties_get_double( properties, "fixed" );
*.dif=mcdv,libdv
*.gif=pixbuf
*.graphics=westley
+*.jfx=westley
+*.jef=westley
*.jpg=pixbuf
*.jpeg=pixbuf
*.kino=westley
// Set the default properties
mlt_properties_set( properties, "resource", filename );
mlt_properties_set_int( properties, "ttl", 25 );
+ mlt_properties_set_int( properties, "aspect_ratio", 1 );
+ mlt_properties_set_int( properties, "progressive", 1 );
return producer;
}
// Get the real structure for this producer
producer_pixbuf this = producer->child;
- if ( this->count == 0 && mlt_properties_get( MLT_PRODUCER_PROPERTIES( producer ), "resource" ) != NULL )
+ // Fetch the producers properties
+ mlt_properties producer_properties = MLT_PRODUCER_PROPERTIES( producer );
+
+ if ( this->count == 0 && mlt_properties_get( producer_properties, "resource" ) != NULL )
{
- mlt_properties properties = MLT_PRODUCER_PROPERTIES( producer );
- char *filename = mlt_properties_get( properties, "resource" );
+ char *filename = mlt_properties_get( producer_properties, "resource" );
// Read xml string
if ( strstr( filename, "<svg" ) )
this->filenames[ this->count ++ ] = strdup( fullname );
// Teehe - when the producer closes, delete the temp file and the space allo
- mlt_properties_set_data( properties, "__temporary_file__", this->filenames[ this->count - 1 ], 0, ( mlt_destructor )unlink, NULL );
+ mlt_properties_set_data( producer_properties, "__temporary_file__", this->filenames[ this->count - 1 ], 0, ( mlt_destructor )unlink, NULL );
}
}
// Obtain filenames
else if ( strchr( filename, '%' ) != NULL )
{
// handle picture sequences
- int i = mlt_properties_get_int( properties, "begin" );
+ int i = mlt_properties_get_int( producer_properties, "begin" );
int gap = 0;
char full[1024];
refresh_image( *frame, 0, 0 );
// Set producer-specific frame properties
- mlt_properties_set_int( properties, "progressive", 1 );
- mlt_properties_set_double( properties, "aspect_ratio", 1 );
+ mlt_properties_set_int( properties, "progressive", mlt_properties_get_int( producer_properties, "progressive" ) );
+ mlt_properties_set_double( properties, "aspect_ratio", mlt_properties_get_double( producer_properties, "aspect_ratio" ) );
// Set alpha call back
( *frame )->get_alpha_mask = producer_get_alpha_mask;
qualify_property( context, properties, "resource" );
char *resource = mlt_properties_get( properties, "resource" );
+ int fx_cut = mlt_properties_get_int( properties, "meta.fx_cut" );
// Let Kino-SMIL src be a synonym for resource
if ( resource == NULL )
}
// Instantiate the producer
- if ( mlt_properties_get( properties, "mlt_service" ) != NULL )
+ if ( !fx_cut && mlt_properties_get( properties, "mlt_service" ) != NULL )
{
char temp[ 1024 ];
strncpy( temp, mlt_properties_get( properties, "mlt_service" ), 1024 );
}
producer = MLT_SERVICE( mlt_factory_producer( "fezzik", temp ) );
}
+ else
+ {
+ producer = MLT_SERVICE( mlt_factory_producer( mlt_properties_get( properties, "mlt_service" ), resource ) );
+ }
// Just in case the plugin requested doesn't exist...
if ( producer == NULL && resource != NULL )