// Set the width and height
mlt_properties_set_int( frame_properties, "width", codec_context->width );
mlt_properties_set_int( frame_properties, "height", codec_context->height );
+ mlt_properties_set_int( frame_properties, "real_width", codec_context->width );
+ mlt_properties_set_int( frame_properties, "real_height", codec_context->height );
mlt_properties_set_double( frame_properties, "aspect_ratio", aspect_ratio );
mlt_frame_push_get_image( frame, producer_get_image );
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 );
// Inform the normalizers about our video properties
mlt_properties frame_props = MLT_FRAME_PROPERTIES( *frame );
mlt_properties_set_double( frame_props, "aspect_ratio", mlt_profile_sar( cx->profile ) );
- mlt_properties_set_double( frame_props, "width", cx->profile->width );
- mlt_properties_set_double( frame_props, "height", cx->profile->height );
+ mlt_properties_set_int( frame_props, "width", cx->profile->width );
+ mlt_properties_set_int( frame_props, "height", cx->profile->height );
+ mlt_properties_set_int( frame_props, "real_width", cx->profile->width );
+ mlt_properties_set_int( frame_props, "real_height", cx->profile->height );
+ mlt_properties_set_int( frame_props, "progressive", cx->profile->progressive );
}
// Calculate the next timecode
// Update other info on the frame
mlt_properties_set_int( properties, "width", 720 );
mlt_properties_set_int( properties, "height", this->is_pal ? 576 : 480 );
+ mlt_properties_set_int( properties, "real_width", 720 );
+ mlt_properties_set_int( properties, "real_height", this->is_pal ? 576 : 480 );
mlt_properties_set_int( properties, "top_field_first", !this->is_pal ? 0 : ( data[ 5 ] & 0x07 ) == 0 ? 0 : 1 );
// Parse the header for meta info