X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ftransition_composite.c;h=9104073b9f52ce3092b3b3029c9112e01dc390b9;hb=1ea14d21b89c84e7766fba4f6aea0f852c906594;hp=fdad2cfec6e1fa140aebb428621ec05108baf045;hpb=bf3264b9e340ba5c11cbf59835a8af3db94e0cc2;p=melted diff --git a/src/modules/core/transition_composite.c b/src/modules/core/transition_composite.c index fdad2cf..9104073 100644 --- a/src/modules/core/transition_composite.c +++ b/src/modules/core/transition_composite.c @@ -581,7 +581,7 @@ scale_luma ( uint16_t *dest_buf, int dest_width, int dest_height, const uint16_t } } -static uint16_t* get_luma( mlt_properties properties, int width, int height ) +static uint16_t* get_luma( mlt_transition this, mlt_properties properties, int width, int height ) { // The cached luma map information int luma_width = mlt_properties_get_int( properties, "_luma.width" ); @@ -604,7 +604,7 @@ static uint16_t* get_luma( mlt_properties properties, int width, int height ) { // TODO: Clean up quick and dirty compressed/existence check 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 ) strcat( temp, ".png" ); @@ -647,7 +647,8 @@ static uint16_t* get_luma( mlt_properties properties, int width, int height ) char *factory = mlt_properties_get( properties, "factory" ); // Create the producer - mlt_producer producer = mlt_factory_producer( factory, resource ); + mlt_profile profile = mlt_service_profile( MLT_TRANSITION_SERVICE( this ) ); + mlt_producer producer = mlt_factory_producer( profile, factory, resource ); // If we have one if ( producer != NULL ) @@ -857,7 +858,7 @@ static mlt_geometry composite_calculate( mlt_transition this, struct geometry_s mlt_frame composite_copy_region( mlt_transition this, mlt_frame a_frame, mlt_position frame_position ) { // Create a frame to return - mlt_frame b_frame = mlt_frame_init( ); + mlt_frame b_frame = mlt_frame_init( MLT_TRANSITION_SERVICE( this ) ); // Get the properties of the a frame mlt_properties a_props = MLT_FRAME_PROPERTIES( a_frame ); @@ -1036,7 +1037,7 @@ 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 these // consumer properties from the a_frame - mlt_properties_set_double( b_props, "consumer_deinterlace", mlt_properties_get_double( a_props, "consumer_deinterlace" ) ); + mlt_properties_set_int( b_props, "consumer_deinterlace", mlt_properties_get_int( a_props, "consumer_deinterlace" ) || mlt_properties_get_int( properties, "deinterlace" ) ); mlt_properties_set( b_props, "consumer_deinterlace_method", mlt_properties_get( a_props, "consumer_deinterlace_method" ) ); mlt_properties_set_double( b_props, "consumer_aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) ); @@ -1099,7 +1100,7 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f int field; int32_t luma_softness = mlt_properties_get_double( properties, "softness" ) * ( 1 << 16 ); - uint16_t *luma_bitmap = get_luma( properties, width_b, height_b ); + uint16_t *luma_bitmap = get_luma( this, properties, width_b, height_b ); char *operator = mlt_properties_get( properties, "operator" ); alpha_b = alpha_b == NULL ? mlt_frame_get_alpha_mask( b_frame ) : alpha_b; @@ -1190,7 +1191,7 @@ static mlt_frame composite_process( mlt_transition this, mlt_frame a_frame, mlt_ /** Constructor for the filter. */ -mlt_transition transition_composite_init( char *arg ) +mlt_transition transition_composite_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ) { mlt_transition this = calloc( sizeof( struct mlt_transition_s ), 1 ); if ( this != NULL && mlt_transition_init( this, NULL ) == 0 )