Commit baf0c79a authored by Michael Niedermayer's avatar Michael Niedermayer

vf_idet: set interlaced flags

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2941a937
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment