]> git.sesse.net Git - mlt/commitdiff
remove output_ratio property - use profile instead
authorDan Dennedy <dan@dennedy.org>
Thu, 1 Mar 2012 05:27:34 +0000 (21:27 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 5 Mar 2012 07:08:07 +0000 (23:08 -0800)
src/framework/mlt_tractor.c
src/modules/core/filter_watermark.c
src/modules/core/transition_composite.c
src/modules/kdenlive/filter_freeze.c

index 3f02461c35153a102532e7ca38fe22114e8fc0df..e2164586392e7dfa2dd016609b4c95fb37c19e65 100644 (file)
@@ -479,10 +479,6 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra
                                        if ( first_video == NULL )
                                                first_video = temp;
 
-                                       // Ensure that all frames know the aspect ratio of the background
-                                       mlt_properties_set_double( temp_properties, "output_ratio",
-                                                                                          mlt_properties_get_double( MLT_FRAME_PROPERTIES( first_video ), "aspect_ratio" ) );
-
                                        mlt_properties_set_int( MLT_FRAME_PROPERTIES( temp ), "image_count", ++ image_count );
                                        image_count = 1;
                                }
index 217a3bec3b9dba45e99f9ef54c9d6ce4b7761a3a..31e8e06933826a952fb2a370d346619391d894fe 100644 (file)
@@ -148,7 +148,6 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                        mlt_frame_set_position( b_frame, position );
                        mlt_properties_set_double( b_props, "consumer_aspect_ratio", mlt_properties_get_double( a_props, "consumer_aspect_ratio" ) );
                        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_double( b_props, "output_ratio", mlt_properties_get_double( a_props, "output_ratio" ) );
 
                        // Check for the special case - no aspect ratio means no problem :-)
                        if ( mlt_frame_get_aspect_ratio( b_frame ) == 0 )
index aa3b2360e88302d023faa9fc83a88c80da98a5a0..83d21d31d19251e858fb37d7110667d28aec8683 100644 (file)
@@ -766,7 +766,7 @@ static int get_b_frame_image( mlt_transition self, mlt_frame b_frame, uint8_t **
        mlt_properties b_props = MLT_FRAME_PROPERTIES( b_frame );
        mlt_properties properties = MLT_TRANSITION_PROPERTIES( self );
        uint8_t resize_alpha = mlt_properties_get_int( b_props, "resize_alpha" );
-       double consumer_ar = mlt_profile_sar( mlt_service_profile( MLT_TRANSITION_SERVICE(self) ) );
+       double output_ar = mlt_profile_sar( mlt_service_profile( MLT_TRANSITION_SERVICE(self) ) );
 
        // Do not scale if we are cropping - the compositing rectangle can crop the b image
        // TODO: Use the animatable w and h of the crop geometry to scale independently of crop rectangle
@@ -775,8 +775,6 @@ static int get_b_frame_image( mlt_transition self, mlt_frame b_frame, uint8_t **
                int real_width = get_value( b_props, "real_width", "width" );
                int real_height = get_value( b_props, "real_height", "height" );
                double input_ar = mlt_properties_get_double( b_props, "aspect_ratio" );
-               double background_ar = mlt_properties_get_double( b_props, "output_ratio" );
-               double output_ar = background_ar != 0.0 ? background_ar : consumer_ar;
                int scaled_width = rint( ( input_ar == 0.0 ? output_ar : input_ar ) / output_ar * real_width );
                int scaled_height = real_height;
                geometry->sw = scaled_width;
@@ -791,13 +789,11 @@ static int get_b_frame_image( mlt_transition self, mlt_frame b_frame, uint8_t **
                int real_width = get_value( b_props, "real_width", "width" );
                int real_height = get_value( b_props, "real_height", "height" );
                double input_ar = mlt_properties_get_double( b_props, "aspect_ratio" );
-               double background_ar = mlt_properties_get_double( b_props, "output_ratio" );
-               double output_ar = background_ar != 0.0 ? background_ar : consumer_ar;
                int scaled_width = rint( ( input_ar == 0.0 ? output_ar : input_ar ) / output_ar * real_width );
                int scaled_height = real_height;
-// fprintf(stderr, "%s: scaled %dx%d norm %dx%d real %dx%d output_ar %f => %f\n", __FILE__,
+// fprintf(stderr, "%s: scaled %dx%d norm %dx%d real %dx%d output_ar %f\n", __FILE__,
 // scaled_width, scaled_height, normalised_width, normalised_height, real_width, real_height,
-// background_ar, output_ar);
+// output_ar);
 
                // Now ensure that our images fit in the normalised frame
                if ( scaled_width > normalised_width )
index e853c9040eae244f4e8e98152d234614d6a2c9a0..ceede0f9de71cd50e77aa9fdbc50418dd508fb9d 100755 (executable)
@@ -73,7 +73,6 @@ static int filter_get_image( mlt_frame frame, uint8_t **image, mlt_image_format
                        mlt_properties_set_double( freeze_properties, "aspect_ratio", mlt_frame_get_aspect_ratio( frame ) );
                        mlt_properties_set_int( freeze_properties, "progressive", mlt_properties_get_int( props, "progressive" ) );
                        mlt_properties_set_int( freeze_properties, "consumer_deinterlace", mlt_properties_get_int( props, "consumer_deinterlace" ) || mlt_properties_get_int( properties, "deinterlace" ) );
-                       mlt_properties_set_double( freeze_properties, "output_ratio", mlt_properties_get_double( props, "output_ratio" ) );
                        mlt_properties_set_data( properties, "freeze_frame", freeze_frame, 0, ( mlt_destructor )mlt_frame_close, NULL );
                        mlt_properties_set_position( properties, "_frame", pos );
                }