Hi again. The affine transition is also having problems with aspect ratio. When using an "Affine" transition to display a full HD 1920x1080 video in a HDV (1440x1080) project, the result is a small picture, not using full screen. Using a Composite transition it works fine.
Problem can be seen using melt: melt -profile hdv_1080_50i color:white out=200 -track fullhdclip.mov - transition affine geometry="0/0:100%x100%" I tried several other combinations of profiles and video formats, and discovered many problems with images incorrectly scaled by the affine transition. My patch below fixes the issues and seems to work for all the cases I tested. regards jb ------------------------------------------------------------------------------ --- a/src/modules/plus/transition_affine.c +++ b/src/modules/plus/transition_affine.c @@ -487,18 +487,22 @@ static int transition_get_image( mlt_frame a_frame, uint8_t **image, mlt_image_f double consumer_dar = consumer_ar * normalised_width / normalised_height; double b_ar = mlt_properties_get_double( b_props, "aspect_ratio" ); double b_dar = b_ar * b_width / b_height; - + if ( abs( ( consumer_dar - b_dar ) * 1000 ) < 1 ) + { + // We consider aspect ratio is equal, no scaling + } if ( b_dar > consumer_dar ) { scale_x = geom_scale_x * ( scale_x == 0 ? 1 : scale_x ); scale_y = geom_scale_x * ( scale_y == 0 ? 1 : scale_y ); + scale_y /= consumer_ar / b_ar; } else { scale_x = geom_scale_y * ( scale_x == 0 ? 1 : scale_x ); scale_y = geom_scale_y * ( scale_y == 0 ? 1 : scale_y ); + scale_x *= consumer_ar / b_ar; } - scale_x *= consumer_ar / b_ar; } if ( scale ) { ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel