X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fcore%2Ffilter_rescale.c;h=25ca5fcff7d38ce347e7101ef7ba51f9c13bd184;hb=c4aaeedceb8ec6ca6feaea40cfad2504ce6de503;hp=e823616666b093a0ab77e15eea713513561994b0;hpb=46ccd5ad41f67bebfbe6f67b8b5733bf635089f6;p=melted diff --git a/src/modules/core/filter_rescale.c b/src/modules/core/filter_rescale.c index e823616..25ca5fc 100644 --- a/src/modules/core/filter_rescale.c +++ b/src/modules/core/filter_rescale.c @@ -18,8 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "filter_rescale.h" - +#include #include #include @@ -207,7 +206,12 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * 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 ); @@ -295,7 +299,7 @@ static mlt_frame filter_process( mlt_filter this, mlt_frame frame ) /** 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( );