[mythtv-users] fps drops with DRM sync and bob

Hamish Moffatt hamish at cloud.net.au
Fri Jun 8 14:50:38 UTC 2007


On Wed, Jun 06, 2007 at 05:49:48PM -0400, Doug Larrick wrote:
> Hamish Moffatt wrote:
> > Maybe I need to measure my audio output rate too, though I don't see wy
> > bob and kerneldeint would differ in behaviour if audio was the cause of
> > the problem. My system has Intel HDA audio on board.
> 
> Hmm, my dev system is also Intel graphics (965) and Intel HDA audio; I
> run bob without a problem.  What kernel are you running? (I am at
> 2.6.21.1 currently.)  Intel HD Audio is new enough that maybe there are
> bugs in older drivers.

I have 2.6.21.1 also.

> Is it possible the progressive vs. interlaced detection is going wrong?
>  Can you try forcing one or the other from the OSD menu?

It appears to be correct. The menu says "Detect (I)". Forcing
progressive disables the deinterlacer, and the output is perfectly
stable (though it has tearing). Forcing interlacing (either normal or
reversed) causes the issues.

The frontend output says:
2007-06-08 20:11:24.334 detectInterlace(Detect Scan, Interlaced Scan, 25, 576) ->Interlaced Scan

I presume this is referring to the file itself rather than my video
output device? My output is progressive btw - 720p at 50Hz.

> Yeah, like I said it's working fine for me on my dev system (which
> granted is only one datapoint but still).  DRM vsync is also used by ATI
> folks.
> 
> The most recent Intel xorg drivers (I'm sure new Mesa is required as
> well) do support the OpenGL vsync extension (at least on 965), so you
> could rule out DRM sync problems that way.

Are you using the latest Intel driver from git.freedesktop.org, or the
2.0.0 release, or something else? 

I'm running the git code because it has improvements to TV out, but I'm
not using that right now anyway - I could try 2.0.0, if that's working
for you.

I tried disabling DRM (by removing /dev/dri/card0), where upon Myth fell
back to busy wait. This also lost sync after a few seconds, just like
DRM.

Also FWIW, I read on the xorg list that as of recently the Intel
drivers only allow DRM vsync when 3D is enabled. There is some
qualification of when OpenGL sync is enabled too. 

My drivers are about a week old. I wrote a simple program to measure the
interval between vsyncs using the DRM interface (ripped the code from
vsync.cpp in Myth) and it was very stable, regardless of what I had
playing in Myth.

The picture shimmers vertically when bob is enabled. I can't recall
whether this is meant to happen or not - surely not?

Here's some verbose log of a few tests. Firstly, forcing the video setup
to progressive through the OSD menu;

2007-06-09 00:19:26.908 TV: Changing from None to WatchingPreRecorded
2007-06-09 00:19:26.913 Set video sync frame interval to 40000
2007-06-09 00:19:26.933 Using audio as timebase
2007-06-09 00:19:26.934 Video timing method: DRM
2007-06-09 00:19:26.934 Refresh rate: 19955, frame interval: 40000
'video_output' mean = '39593.66', std. dev. = '2800.80', fps = '25.26'
2007-06-09 00:19:33.198 Set video sync frame interval to 40000
2007-06-09 00:19:33.198 Disabled deinterlacing
'video_output' mean = '39801.38', std. dev. = '1947.54', fps = '25.12'
'video_output' mean = '39995.86', std. dev. = '31.29', fps = '25.00'
'video_output' mean = '39996.10', std. dev. = '17.99', fps = '25.00'
[etc. Perfect! But tearing.]

Change it back to interlacing while still playing the same file:

'video_output' mean = '39996.95', std. dev. = '33.87', fps = '25.00'
2007-06-09 00:25:24.799 Set video sync frame interval to 40000
2007-06-09 00:25:24.800 Enabled deinterlacing
'video_output' mean = '40191.36', std. dev. = '1951.47', fps = '24.88'
'video_output' mean = '39995.09', std. dev. = '28.36', fps = '25.00'
'video_output' mean = '39996.17', std. dev. = '30.46', fps = '25.00'
'video_output' mean = '39996.12', std. dev. = '33.39', fps = '25.00'
'video_output' mean = '39996.04', std. dev. = '31.12', fps = '25.00'
'video_output' mean = '39996.21', std. dev. = '115.36', fps = '25.00'
'video_output' mean = '39996.33', std. dev. = '130.42', fps = '25.00'
'video_output' mean = '39995.96', std. dev. = '37.29', fps = '25.00'
'video_output' mean = '39996.34', std. dev. = '17.38', fps = '25.00'
'video_output' mean = '39996.28', std. dev. = '24.19', fps = '25.00'
'video_output' mean = '39996.11', std. dev. = '25.79', fps = '25.00'
2007-06-09 00:26:09.198 NVP: Video is 3.129 frames behind audio (too slow), dropping frame to catch up.
2007-06-09 00:26:09.199 NVP: Video is 3.05925 frames behind audio (too slow), dropping frame to catch up.
[...]

Disabling DRM;

2007-06-09 00:28:15.228 Using deinterlace method bobdeint
2007-06-09 00:28:15.228 nVidiaVideoSync: Could not open device /dev/nvidia0, No such file or directory
2007-06-09 00:28:15.228 TV: StartPlayer(): took 1241 ms to start player.
2007-06-09 00:28:15.228 DRMVideoSync: Could not open device /dev/dri/card0, No such file or directory
2007-06-09 00:28:15.228 RTCVideoSync: Could not set RTC frequency, Permission denied.
2007-06-09 00:28:15.228 Set video sync frame interval to 40000
2007-06-09 00:28:15.228 Using audio as timebase
2007-06-09 00:28:15.228 Video timing method: USleep with busy wait
2007-06-09 00:28:15.229 Refresh rate: 19955, frame interval: 40000
2007-06-09 00:28:15.229 NVP: Waiting for prebuffer.. 0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2007-06-09 00:28:15.229 TV: Changing from None to WatchingPreRecorded
'video_output' mean = '40004.23', std. dev. = '468.07', fps = '25.00'
'video_output' mean = '39999.82', std. dev. = '568.91', fps = '25.00'
'video_output' mean = '39999.82', std. dev. = '566.44', fps = '25.00'
2007-06-09 00:28:31.129 NVP: 400 interlaced frames seen.
'video_output' mean = '40000.20', std. dev. = '616.90', fps = '25.00'
'video_output' mean = '40000.81', std. dev. = '671.07', fps = '25.00'
'video_output' mean = '39981.86', std. dev. = '686.27', fps = '25.01'
'video_output' mean = '40016.78', std. dev. = '726.70', fps = '24.99'
2007-06-09 00:28:47.131 NVP: 800 interlaced frames seen.
'video_output' mean = '39984.42', std. dev. = '732.81', fps = '25.01'
'video_output' mean = '39992.83', std. dev. = '762.60', fps = '25.00'
'video_output' mean = '39998.79', std. dev. = '857.27', fps = '25.00'
2007-06-09 00:28:59.135 NVP: Video is 3.21795 frames behind audio (too slow), dropping frame to catch up.
2007-06-09 00:28:59.136 NVP: Video is 3.15095 frames behind audio (too slow), dropping frame to catch up.
'video_output' mean = '41011.37', std. dev. = '7280.94', fps = '24.38'
2007-06-09 00:28:59.492 NVP: Video is 3.17403 frames behind audio (too slow), dropping frame to catch up.
2007-06-09 00:28:59.493 NVP: Video is 3.068 frames behind audio (too slow), dropping frame to catch up.
[...]



Hamish
-- 
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>


More information about the mythtv-users mailing list