]> git.sesse.net Git - mlt/blobdiff - src/modules/core/transition_composite.c
Add service locks for parallelism.
[mlt] / src / modules / core / transition_composite.c
index a88c1d6a309c65502f196a776272043918617c9e..14e00575519a52f53c2bdc6c9c8ba34bae5088b1 100644 (file)
@@ -859,6 +859,11 @@ static int get_b_frame_image( mlt_transition this, mlt_frame b_frame, uint8_t **
 
        ret = mlt_frame_get_image( b_frame, image, &format, width, height, 1 );
 
+       // composite_yuv uses geometry->sw to determine source stride, which
+       // should equal the image width if not using crop property.
+       if ( !mlt_properties_get( properties, "crop" ) )
+               geometry->sw = *width;
+
        // Set the frame back
        mlt_properties_set_int( b_props, "resize_alpha", resize_alpha );
 
@@ -1218,7 +1223,9 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f
                        int field;
                        
                        double luma_softness = mlt_properties_get_double( properties, "softness" );
+                       mlt_service_lock( MLT_TRANSITION_SERVICE( this ) );
                        uint16_t *luma_bitmap = get_luma( this, properties, width_b, height_b );
+                       mlt_service_unlock( MLT_TRANSITION_SERVICE( this ) );
                        char *operator = mlt_properties_get( properties, "operator" );
 
                        alpha_b = alpha_b == NULL ? mlt_frame_get_alpha_mask( b_frame ) : alpha_b;
@@ -1341,6 +1348,9 @@ mlt_transition transition_composite_init( mlt_profile profile, mlt_service_type
                // Use alignment (and hence alpha of b frame)
                mlt_properties_set_int( properties, "aligned", 1 );
 
+               // Default to progressive rendering
+               mlt_properties_set_int( properties, "progressive", 1 );
+               
                // Inform apps and framework that this is a video only transition
                mlt_properties_set_int( properties, "_transition_type", 1 );
        }