summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-05 07:03:39 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-05 09:11:15 +0200
commit4d4df310f2dc5f1fc7deaac75a236b6e01c1697c (patch)
tree56c5ad2e128395672d3fc283d342a761b99e5066 /libavfilter
parentbfd30fa8a32c2d98340a17df878057fe0c67b9fa (diff)
vf_idet: print accumulated statistics for single and multi frame detection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_idet.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 1a2c36de2a..26a45cea11 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -39,6 +39,7 @@ typedef struct {
Type last_type;
Type prestat[4];
+ Type poststat[4];
AVFilterBufferRef *cur;
AVFilterBufferRef *next;
@@ -126,8 +127,6 @@ static void filter(AVFilterContext *ctx)
type = UNDETERMINED;
}
- idet->prestat[type] ++;
-
if (type != UNDETERMINED)
idet->last_type = type;
@@ -141,6 +140,8 @@ static void filter(AVFilterContext *ctx)
idet->cur->video->interlaced = 0;
}
+ idet->prestat [ type] ++;
+ idet->poststat[idet->last_type] ++;
av_log(ctx, AV_LOG_INFO, "Single frame:%s, Multi frame:%s\n", type2str(type), type2str(idet->last_type));
}
@@ -219,12 +220,18 @@ static av_cold void uninit(AVFilterContext *ctx)
{
IDETContext *idet = ctx->priv;
- av_log(ctx, AV_LOG_INFO, "TFF:%d BFF:%d Progressive:%d Undetermined:%d\n",
+ av_log(ctx, AV_LOG_INFO, "Single frame detection: TFF:%d BFF:%d Progressive:%d Undetermined:%d\n",
idet->prestat[TFF],
idet->prestat[BFF],
idet->prestat[PROGRSSIVE],
idet->prestat[UNDETERMINED]
);
+ av_log(ctx, AV_LOG_INFO, "Multi frame detection: TFF:%d BFF:%d Progressive:%d Undetermined:%d\n",
+ idet->poststat[TFF],
+ idet->poststat[BFF],
+ idet->poststat[PROGRSSIVE],
+ idet->poststat[UNDETERMINED]
+ );
if (idet->prev) avfilter_unref_buffer(idet->prev);
if (idet->cur ) avfilter_unref_buffer(idet->cur );