X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fgtk2%2Ffilter_rescale.c;h=92b2b7b6713c9de90daae075afd9204f622f9d82;hb=8de8411c3af4b5746e9040a67e928364be9ac058;hp=c57e33d1bd3a86ad59b5a9c00b65f950b82ae3e0;hpb=3f7c53230945e427b019ba5df4fec587e19e29c1;p=melted diff --git a/src/modules/gtk2/filter_rescale.c b/src/modules/gtk2/filter_rescale.c index c57e33d..92b2b7b 100644 --- a/src/modules/gtk2/filter_rescale.c +++ b/src/modules/gtk2/filter_rescale.c @@ -65,8 +65,17 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * } // Let the producer know what we are actually requested to obtain - mlt_properties_set_int( properties, "rescale_width", *width ); - mlt_properties_set_int( properties, "rescale_height", *height ); + if ( *format == mlt_image_yuv422 && strcmp( interps, "none" ) ) + { + mlt_properties_set_int( properties, "rescale_width", *width ); + mlt_properties_set_int( properties, "rescale_height", *height ); + } + else + { + // When no scaling is requested, revert the requested dimensions if possible + mlt_properties_set_int( properties, "rescale_width", ( iwidth / 2 ) * 2 ); + mlt_properties_set_int( properties, "rescale_height", ( iheight / 2 ) * 2 ); + } // Get the image as requested mlt_frame_get_image( this, &input, format, &iwidth, &iheight, writable );