mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_mpdecimate: debug logging of threshold stats
It's often really helpful to know why a frame wasn't decimated (lo or hi), and how much you exceeded the threshold by, if you're trying to tweak the thresholds to get what you want. mpdecimate already prints a line per input frame with -v debug, this just makes it longer. Signed-off-by: Peter Cordes <peter@cordes.ca>
This commit is contained in:
parent
fb1be6303d
commit
50f112c915
@ -84,15 +84,21 @@ static int diff_planes(AVFilterContext *ctx,
|
||||
for (x = 8; x < w-7; x += 4) {
|
||||
d = decimate->sad(cur + y*cur_linesize + x, cur_linesize,
|
||||
ref + y*ref_linesize + x, ref_linesize);
|
||||
if (d > decimate->hi)
|
||||
if (d > decimate->hi) {
|
||||
av_log(ctx, AV_LOG_DEBUG, "%d>=hi ", d);
|
||||
return 1;
|
||||
}
|
||||
if (d > decimate->lo) {
|
||||
c++;
|
||||
if (c > t)
|
||||
if (c > t) {
|
||||
av_log(ctx, AV_LOG_DEBUG, "lo:%d>=%d ", c, t);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
av_log(ctx, AV_LOG_DEBUG, "lo:%d<%d ", c, t);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user