mlt_properties_set_int( properties, "coder", 0 );
mlt_properties_set_int( properties, "context", 0 );
mlt_properties_set_int( properties, "predictor", 0 );
+ mlt_properties_set_int( properties, "ildct", 0 );
+ mlt_properties_set_int( properties, "ilme", 0 );
// Ensure termination at end of the stream
mlt_properties_set_int( properties, "terminate_on_pause", 1 );
c->context_model= mlt_properties_get_int( properties, "context" );
c->prediction_method= mlt_properties_get_int( properties, "predictor" );
c->me_method = mlt_properties_get_int( properties, "me_method" );
+ if ( mlt_properties_get_int( properties, "progressive" ) == 0 &&
+ mlt_properties_get_int( properties, "deinterlace" ) == 0 )
+ {
+ if ( mlt_properties_get_int( properties, "ildct" ) )
+ c->flags |= CODEC_FLAG_INTERLACED_DCT;
+ if ( mlt_properties_get_int( properties, "ilme" ) )
+ c->flags |= CODEC_FLAG_INTERLACED_ME;
+ }
}
else
{
// Set the quality
output->quality = video_st->quality;
+ // Set frame interlace hints
+ output->interlaced_frame = !mlt_properties_get_int( frame_properties, "progressive" );
+ output->top_field_first = mlt_properties_get_int( frame_properties, "top_field_first" );
+
// Encode the image
out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, output );