X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ffilter_resize.c;h=627d9e0b933c1ee943f0d7dbb2c1d577bf36552c;hb=90da79f8e465d43102645de7323d15c12801515f;hp=dcaa2d0125a0ecd59fc3b77a704d656362f60d3c;hpb=2bdd20ae194e477238e5d44ddb5f77ad64e644cf;p=melted diff --git a/src/modules/core/filter_resize.c b/src/modules/core/filter_resize.c index dcaa2d0..627d9e0 100644 --- a/src/modules/core/filter_resize.c +++ b/src/modules/core/filter_resize.c @@ -62,6 +62,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * double input_ar = mlt_frame_get_aspect_ratio( this ) * real_width / real_height; double output_ar = mlt_properties_get_double( properties, "consumer_aspect_ratio" ) * owidth / oheight; + //fprintf( stderr, "normalised %dx%d output %dx%d %f %f\n", normalised_width, normalised_height, owidth, oheight, ( float )output_ar, ( float )mlt_properties_get_double( properties, "consumer_aspect_ratio" ) * owidth / oheight ); + // Optimised for the input_ar > output_ar case (e.g. widescreen on standard) int scaled_width = input_ar / output_ar * normalised_width + 0.5; int scaled_height = normalised_height;