summaryrefslogtreecommitdiff
path: root/libavfilter/vf_idet.c
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2014-11-01 04:10:15 -0700
committerMichael Niedermayer <michaelni@gmx.at>2014-11-01 18:04:35 +0100
commitae6118de19a5fc02631842baf20675fa370f7a94 (patch)
tree7979fb528ff36d21c8886c7d4bc6b6624ff59e68 /libavfilter/vf_idet.c
parent2847843868c9d7d7e75e771fd79136a00840a8aa (diff)
avfilter/idet: add current frame classification to metadata
Fixes ticket 3832 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_idet.c')
-rw-r--r--libavfilter/vf_idet.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 56d4cfabb6..6f99f39f00 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -40,10 +40,10 @@ AVFILTER_DEFINE_CLASS(idet);
static const char *type2str(Type type)
{
switch(type) {
- case TFF : return "Top Field First ";
- case BFF : return "Bottom Field First";
- case PROGRESSIVE : return "Progressive ";
- case UNDETERMINED : return "Undetermined ";
+ case TFF : return "tff";
+ case BFF : return "bff";
+ case PROGRESSIVE : return "progressive";
+ case UNDETERMINED : return "undetermined";
}
return NULL;
}
@@ -149,13 +149,15 @@ static void filter(AVFilterContext *ctx)
idet->prestat [ type] ++;
idet->poststat[idet->last_type] ++;
- av_log(ctx, AV_LOG_DEBUG, "Single frame:%s, Multi frame:%s\n", type2str(type), type2str(idet->last_type));
+ av_log(ctx, AV_LOG_DEBUG, "Single frame:%12s, Multi frame:%12s\n", type2str(type), type2str(idet->last_type));
+ av_dict_set (metadata, "lavfi.idet.single.current_frame", type2str(type), 0);
av_dict_set_int(metadata, "lavfi.idet.single.tff", idet->prestat[TFF], 0);
av_dict_set_int(metadata, "lavfi.idet.single.bff", idet->prestat[BFF], 0);
av_dict_set_int(metadata, "lavfi.idet.single.progressive", idet->prestat[PROGRESSIVE], 0);
av_dict_set_int(metadata, "lavfi.idet.single.undetermined", idet->prestat[UNDETERMINED], 0);
+ av_dict_set (metadata, "lavfi.idet.multiple.current_frame", type2str(idet->last_type), 0);
av_dict_set_int(metadata, "lavfi.idet.multiple.tff", idet->poststat[TFF], 0);
av_dict_set_int(metadata, "lavfi.idet.multiple.bff", idet->poststat[BFF], 0);
av_dict_set_int(metadata, "lavfi.idet.multiple.progressive", idet->poststat[PROGRESSIVE], 0);