Originally committed as revision 26347 to svn://svn.ffmpeg.org/ffmpeg/trunk
@end table
Default value is -1.
+If interlacing is unknown or decoder does not export this information,
+top field first will be assumed.
@c man end VIDEO FILTERS
{
YADIFContext *yadif = ctx->priv;
AVFilterLink *link= ctx->outputs[0];
- int tff = yadif->parity == -1 ? yadif->cur->video->top_field_first : (yadif->parity^1);
+ int tff;
+
+ if (yadif->parity == -1) {
+ tff = yadif->cur->video->interlaced ?
+ yadif->cur->video->top_field_first : 1;
+ } else {
+ tff = yadif->parity^1;
+ }
if (is_second)
yadif->out = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE |