* Copyright (C) 2003-2004 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Local header files
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 );