aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_idet.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-04 16:27:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-04 16:27:24 +0200
commitbaf0c79a4da265320e77af78a2810e254baa4110 (patch)
treece121ac0e2665da08eae7bed76fadbe30452de96 /libavfilter/vf_idet.c
parent2941a937f23fcad39c4829157213c2a21d5b4ba5 (diff)
downloadffmpeg-baf0c79a4da265320e77af78a2810e254baa4110.tar.gz
vf_idet: set interlaced flags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_idet.c')
-rw-r--r--libavfilter/vf_idet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index d0682b4b5c..f4030a639e 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -103,15 +103,22 @@ static void filter(AVFilterContext *ctx)
if (alpha[0] / (float)alpha[1] > idet->interlace_threshold){
av_log(ctx, AV_LOG_INFO, "Interlaced, top field first\n");
idet->stat_tff++;
+ idet->cur->video->top_field_first = 1;
+ idet->cur->video->interlaced = 1;
}else if(alpha[1] / (float)alpha[0] > idet->interlace_threshold){
av_log(ctx, AV_LOG_INFO, "Interlaced, bottom field first\n");
idet->stat_bff++;
+ idet->cur->video->top_field_first = 0;
+ idet->cur->video->interlaced = 1;
}else if(alpha[1] / (float)delta > idet->progressive_threshold){
av_log(ctx, AV_LOG_INFO, "Progressive\n");
idet->stat_progressive++;
+ idet->cur->video->interlaced = 0;
}else{
av_log(ctx, AV_LOG_INFO, "Undetermined\n");
idet->stat_undetermined++;
+ idet->cur->video->interlaced = idet->prev->video->interlaced;
+ idet->cur->video->top_field_first = idet->prev->video->top_field_first;
}
// av_log(ctx,0, "t%d b%d p%d u%d\n", t,b,p,u);
}