[mythtv-users] deinterlacing and non-smooth playback at 1080i
Seth Daniel
mythtv.org at sethdaniel.org
Tue May 22 03:06:51 UTC 2007
On Tue, May 22, 2007 at 12:28:23AM +0100, Mark Kendall wrote:
> On 5/21/07, Seth Daniel <mythtv.org at sethdaniel.org> wrote:
>
>> > Does that describe what you're seeing? Best to test with a
>> > clip/channel with a news ticker moving from right to left.
>>
>> I have tons of test material (lots of recordings of various shows that
>> are broadcast @ 1080i). All exhibit the problem I describe in the first
>> paragraph above.
>
> Seth
>
> I can't remember if you're compiling from source or not, so this may not
> help:)
>
> The attached patch may help - it's not perfect (it doesn't work 100%
> of the time and it will wreak havoc playing progressive scan content).
> It's against the mythtv-vid branch but shouldn't have any issues with
> other/older versions - and the important stuff is only a couple of
> lines.
>
> With this in place I get perfectly smooth/synced playback at 1080i
> most of the time - still trying to figure out if I can get 100%!
>
> I'll explain it in more detail when I've had some sleep.
It didn't apply cleanly to HEAD svn. So, I checked out mythtv-vid of
mythtv, applied the patch, and built it. After some problems with the DB
schema I got it to run. The sync problem still exists. I tried with
Bob and w/o any deinterlacing. FWIW, with Bob I received:
#---START
2007-05-21 19:41:14.042 Using realtime priority.
2007-05-21 19:41:14.044 TV: Changing from None to WatchingPreRecorded
2007-05-21 19:41:14.148 OpenGLVideoSync()
2007-05-21 19:41:14.168 Video sync method can't support double framerate (refresh rate too low for bob deint)
2007-05-21 19:41:14.170 FilterManager: failed to load filter 'none', nosuch filter exists
2007-05-21 19:41:14.170 Couldn't load deinterlace filter none
2007-05-21 19:41:14.175 Video timing method: SGI OpenGL
#---END
Attached is the reject file from patch when I attempted to apply it to
HEAD.
Here is the output when I ran patch:
patching file libs/libmythtv/NuppelVideoPlayer.cpp
Hunk #1 succeeded at 2186 (offset 49 lines).
Hunk #2 succeeded at 2208 (offset 49 lines).
Hunk #3 succeeded at 2217 (offset 49 lines).
patching file libs/libmythtv/vsync.cpp
Hunk #1 succeeded at 311 (offset 5 lines).
Hunk #2 succeeded at 411 (offset 5 lines).
Hunk #3 FAILED at 643.
Hunk #4 succeeded at 702 (offset 54 lines).
Hunk #5 FAILED at 723.
Hunk #6 FAILED at 733.
Hunk #7 succeeded at 797 (offset 56 lines).
Hunk #8 succeeded at 836 (offset 56 lines).
Hunk #9 succeeded at 887 (offset 56 lines).
3 out of 9 hunks FAILED -- saving rejects to file
libs/libmythtv/vsync.cpp.rej
patching file libs/libmythtv/vsync.h
Hunk #4 succeeded at 207 with fuzz 2.
--
seth / @sethdaniel.org
I either want less decadence or more chance to participate in it.
-------------- next part --------------
***************
*** 641,647 ****
unsigned int count;
X11S(err = gMythGLXGetVideoSyncSGI(&count));
checkGLSyncError("OpenGLVideoSync::Start(): Frame Number Query", err);
- X11S(err = gMythGLXWaitVideoSyncSGI(2, (count+1)%2 ,&count));
checkGLSyncError("OpenGLVideoSync::Start(): A/V Sync", err);
X11S(err = glXMakeCurrent(vo->XJ_disp, None, NULL));
--- 643,649 ----
unsigned int count;
X11S(err = gMythGLXGetVideoSyncSGI(&count));
checkGLSyncError("OpenGLVideoSync::Start(): Frame Number Query", err);
+ X11S(err = gMythGLXWaitVideoSyncSGI(2, 0, &count));
checkGLSyncError("OpenGLVideoSync::Start(): A/V Sync", err);
X11S(err = glXMakeCurrent(vo->XJ_disp, None, NULL));
***************
*** 721,726 ****
// Always sync to the next retrace execpt when we are very late.
if ((m_delay = CalcDelay()) > -(m_refresh_interval/2))
{
err = gMythGLXWaitVideoSyncSGI(2, (frameNum+1)%2 ,&frameNum);
checkGLSyncError(msg1, err);
m_delay = CalcDelay();
--- 723,729 ----
// Always sync to the next retrace execpt when we are very late.
if ((m_delay = CalcDelay()) > -(m_refresh_interval/2))
{
+ frameNum += syncToFrameStart ? frameNum % 2 : 0;
err = gMythGLXWaitVideoSyncSGI(2, (frameNum+1)%2 ,&frameNum);
checkGLSyncError(msg1, err);
m_delay = CalcDelay();
***************
*** 730,735 ****
if (m_delay > 0)
{
uint n = m_delay / m_refresh_interval + 1;
err = gMythGLXWaitVideoSyncSGI((n+1), (frameNum+n)%(n+1), &frameNum);
checkGLSyncError(msg2, err);
m_delay = CalcDelay();
--- 733,739 ----
if (m_delay > 0)
{
uint n = m_delay / m_refresh_interval + 1;
+ n += syncToFrameStart ? (n + 1) % 2 : 0;
err = gMythGLXWaitVideoSyncSGI((n+1), (frameNum+n)%(n+1), &frameNum);
checkGLSyncError(msg2, err);
m_delay = CalcDelay();
More information about the mythtv-users
mailing list