[Mplayer-cvslog] CVS: main/libmpcodecs vf_detc.c,1.5,1.6

Richard Felker CVS rfelker at mplayerhq.hu
Sun Mar 23 17:10:32 CET 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv28337/libmpcodecs

Modified Files:
	vf_detc.c 
Log Message:
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.

Index: vf_detc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_detc.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_detc.c	23 Mar 2003 03:36:24 -0000	1.5
+++ vf_detc.c	23 Mar 2003 16:10:06 -0000	1.6
@@ -190,6 +190,13 @@
 	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)) {



More information about the MPlayer-cvslog mailing list