summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-23 16:10:06 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-23 16:10:06 +0000
commit163b63b1c87813306a59e1c1162d90894dfa8b04 (patch)
tree77c2fc1f75cf05b5caebec41a5a14b9d0c82fe09 /libmpcodecs
parentaed11583b470eeb563e2f4c9fc4733091a8bf225 (diff)
downloadmpv-163b63b1c87813306a59e1c1162d90894dfa8b04.tar.bz2
mpv-163b63b1c87813306a59e1c1162d90894dfa8b04.tar.xz
try to break pattern at scene changes to prevent merging pictures that
don't belong together! this fixes the problem reported with flcl-detc.avi. the conditions for this may need more tuning but seem to work ok. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9666 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_detc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpcodecs/vf_detc.c b/libmpcodecs/vf_detc.c
index 1fc422b6ef..57893fccc0 100644
--- a/libmpcodecs/vf_detc.c
+++ b/libmpcodecs/vf_detc.c
@@ -190,6 +190,13 @@ static int analyze_aggressive(struct vf_priv_s *p, mp_image_t *new, mp_image_t *
p->pm = m;
if (p->frame == 4) {
+ /* We need to break at scene changes, but is this a valid test? */
+ if ((m.even > p->thres[2]) && (m.odd > p->thres[2]) && (m.temp > p->thres[3])
+ && (m.temp > 5*pm.temp) && (m.temp*2 > m.noise)) {
+ mp_msg(MSGT_VFILTER, MSGL_V, "scene change breaking telecine!\n");
+ p->frame = -1;
+ return TC_DROP;
+ }
/* Thres. is to compensate for quantization errors when noise is low */
if (m.noise - m.temp > -p->thres[4]) {
if (COMPARABLE(m.even, pm.odd)) {