[mythtv-firehose] mythtv/master commit: 3870b0777 by Daniel Thor Kristjansson (daniel-kristjansson)
noreply at mythtv.org
Sun Sep 25 21:06:58 UTC 2011
Author: Daniel Thor Kristjansson <dkristjansson at mythtv.org>
Change Date: 2011-09-25T14:02:29-07:00
Push Date: 2011/09/25 14:06:48 -0700
New Revision: 3870b0777309258e45f5ae56245adc5b181343f1
Fix interlacing detection.
AutoDeint() was using m_scan_locked to lock in the current detected
interlaced vs progressive detection which totally broke it's intended
functionality, on top of that the MythDVDPlayer had disabled this
broken-ness but only for DVD's. Also the comments said that
progressive video would be detected on the first progressive frame,
but that wasn't the case. The m_scan_locked hack was further broken
by some threading changes so it didn't even work as a hack anymore.
Anyway this was a mess so I've just rewritten the AutoDeint code.
Now AutoDeint() tracks the last 30 frames and if any of them are
interlaced we decide that the video is interlaced and conversely
if all are progressive we decide the video is progressive. Thirty
frames is very arbritary, generally three would be enough as it
would account for 3-2 pulldown and all variations there of. But
Video that is progressive and accidentally deinterlaced looks a
lot better than video that is interlaced and not deinterlaced for
I've also added a small hack for NTSC and PAL video, if the number
of lines in the video is 480 or 576 we assume the video is interlaced.
After watching a poorly mastered DVD one too many times I decided
this hack was necessary. The DVD override for still frames will
still ensure that those are not deinterlaced, this is just for the
autodetection in the video.
More information about the mythtv-firehose