mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 06:03:45 +01:00
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
This commit is contained in:
parent
aed11583b4
commit
163b63b1c8
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user