[FFmpeg-cvslog] r26347 - in trunk: doc/filters.texi libavfilter/vf_yadif.c

bcoudurier subversion
Sat Jan 15 01:32:36 CET 2011


Author: bcoudurier
Date: Sat Jan 15 01:32:36 2011
New Revision: 26347

Log:
In yadif filter, default to top field first if interlacing is unknown

Modified:
   trunk/doc/filters.texi
   trunk/libavfilter/vf_yadif.c

Modified: trunk/doc/filters.texi
==============================================================================
--- trunk/doc/filters.texi	Sat Jan 15 00:58:55 2011	(r26346)
+++ trunk/doc/filters.texi	Sat Jan 15 01:32:36 2011	(r26347)
@@ -996,6 +996,8 @@ enable automatic detection
 @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
 

Modified: trunk/libavfilter/vf_yadif.c
==============================================================================
--- trunk/libavfilter/vf_yadif.c	Sat Jan 15 00:58:55 2011	(r26346)
+++ trunk/libavfilter/vf_yadif.c	Sat Jan 15 01:32:36 2011	(r26347)
@@ -167,7 +167,14 @@ static void return_frame(AVFilterContext
 {
     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 |



More information about the ffmpeg-cvslog mailing list