summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2013-06-16 17:22:37 +0200
committerRudolf Polzer <divverent@xonotic.org>2013-06-16 17:22:37 +0200
commitc6cbbd292aa59c4b88abcff85bd327606cf821de (patch)
tree01a1d2f0c169a97c72a756ba6dd000d3e6f4af05
parentfb04351f76d00d8d5e20ca172172921b2bb35f13 (diff)
downloadmpv-c6cbbd292aa59c4b88abcff85bd327606cf821de.tar.bz2
mpv-c6cbbd292aa59c4b88abcff85bd327606cf821de.tar.xz
vf_dlopen ildetect: fix numdecidedadjacentframes counter
-rw-r--r--TOOLS/vf_dlopen/ildetect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/TOOLS/vf_dlopen/ildetect.c b/TOOLS/vf_dlopen/ildetect.c
index 6aa62a1153..1ac1c08946 100644
--- a/TOOLS/vf_dlopen/ildetect.c
+++ b/TOOLS/vf_dlopen/ildetect.c
@@ -184,13 +184,17 @@ static int il_put_image(struct vf_dlopen_context *ctx)
double avgcombed = totalcombedframes / (double) totalpixels;
if (il->lastcombed >= 0) {
+ if (il->lastcombed < il->no_threshold ||
+ il->lastcombed > il->yes_threshold)
+ if (avgcombed < il->no_threshold ||
+ avgcombed > il->yes_threshold)
+ ++il->numdecidedadjacentframes;
if (il->lastcombed > il->yes_threshold &&
avgcombed < il->no_threshold)
++il->numjumpingadjacentframes;
if (il->lastcombed < il->no_threshold &&
avgcombed > il->yes_threshold)
++il->numjumpingadjacentframes;
- ++il->numdecidedadjacentframes;
}
il->lastcombed = avgcombed;