[FFmpeg-cvslog] commit: In yadif filter, default to top field first if interlacing is unknown (Baptiste Coudurier )
git at videolan.org
git
Sat Jan 15 13:06:36 CET 2011
ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Sat Jan 15 00:32:36 2011 +0000| [a51c71bb54c53ccb22e7972f8f60819f7f4f2c9f] | committer: Baptiste Coudurier
In yadif filter, default to top field first if interlacing is unknown
Originally committed as revision 26347 to svn://svn.ffmpeg.org/ffmpeg/trunk
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a51c71bb54c53ccb22e7972f8f60819f7f4f2c9f
---
doc/filters.texi | 2 ++
libavfilter/vf_yadif.c | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index a66900e..3842886 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -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
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index d96e587..bd0a9de 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -167,7 +167,14 @@ static void return_frame(AVFilterContext *ctx, int is_second)
{
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