Mercurial > mplayer.hg
changeset 9665:8f030cabf1d9
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.
author | rfelker |
---|---|
date | Sun, 23 Mar 2003 16:10:06 +0000 |
parents | eb9660b1f782 |
children | 09f5cc44bf34 |
files | libmpcodecs/vf_detc.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_detc.c Sun Mar 23 15:25:10 2003 +0000 +++ b/libmpcodecs/vf_detc.c Sun Mar 23 16:10:06 2003 +0000 @@ -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)) {