* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "filter_rescale.h"
-
+#include <framework/mlt_filter.h>
#include <framework/mlt_frame.h>
#include <stdio.h>
mlt_properties_set_int( properties, "rescale_width", iwidth );
mlt_properties_set_int( properties, "rescale_height", iheight );
}
-
+
+ // Deinterlace if height is changing to prevent fields mixing on interpolation
+ // One exception: non-interpolated, integral scaling
+ if ( iheight != oheight && ( strcmp( interps, "nearest" ) || ( iheight % oheight != 0 ) ) )
+ mlt_properties_set_int( properties, "consumer_deinterlace", 1 );
+
// Get the image as requested
mlt_frame_get_image( this, image, format, &iwidth, &iheight, writable );
/** Constructor for the filter.
*/
-mlt_filter filter_rescale_init( char *arg )
+mlt_filter filter_rescale_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
{
// Create a new scaler
mlt_filter this = mlt_filter_new( );