diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-29 15:05:31 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-29 15:07:08 +0300 |
commit | 3420e56d9a4a2c947c638087291d5b05ca3870f8 (patch) | |
tree | 46c158a97941992ef833ae054689e8b8c95d2c2b /libavfilter | |
parent | 4ce263a7fd1c8dc5625a9e0ca4ccba07c5ba90e4 (diff) |
avfilter/vf_vfrdet: also report average delta
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_vfrdet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c index 051b53babd..abfa19cdcd 100644 --- a/libavfilter/vf_vfrdet.c +++ b/libavfilter/vf_vfrdet.c @@ -29,6 +29,7 @@ typedef struct VFRDETContext { int64_t delta; int64_t min_delta; int64_t max_delta; + int64_t avg_delta; uint64_t vfr; uint64_t cfr; @@ -53,6 +54,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) s->delta = delta; s->min_delta = FFMIN(delta, s->min_delta); s->max_delta = FFMAX(delta, s->max_delta); + s->avg_delta += delta; } else { s->cfr++; } @@ -81,7 +83,7 @@ static av_cold void uninit(AVFilterContext *ctx) av_log(ctx, AV_LOG_INFO, "VFR:%f (%"PRIu64"/%"PRIu64")", s->vfr / (float)(s->vfr + s->cfr), s->vfr, s->cfr); if (s->vfr) - av_log(ctx, AV_LOG_INFO, " min: %"PRId64" max: %"PRId64")", s->min_delta, s->max_delta); + av_log(ctx, AV_LOG_INFO, " min: %"PRId64" max: %"PRId64" avg: %"PRId64, s->min_delta, s->max_delta, s->avg_delta / s->vfr); av_log(ctx, AV_LOG_INFO, "\n"); } |