[Openchrome-users] MythTv judder: XvMCPutSurface using a lot of CPU

Terry Barnaby terry1
Sat Dec 22 15:07:15 PST 2007


Terry Barnaby wrote:
> Hi,
> 
> I am trying to track down a problem I have with MythTv under Fedora 8 using
> the openchrome driver and libchromeXvMC library.
> MythTv has a lot of juddering and glitches even though the XvMC VLD
> acceleration is in use.
> This is also present with the stock via driver and libviaXvMC library.
> 
> Using the old mp2decoder XvMC test program I see that sending one
> frame at 25Hz uses about 12% CPU. If I modify  mp2decoder to send
> two frames at 50Hz (Just calling XvMCPutSurface twice with the same
> frame) the CPU usage shoots up to 98%. This is equivalent to
> MythTv outputting in BOB de-interlace mode and appears to show the
> same problem I have with MythTv.
> 
> I guess this could be a libchromeXvMC/libviaXvMC or DRM issue.
> Has anyone any idaes on this ?
> 
> Cheers
> 
> 
> Terry
> 
> 
> _______________________________________________
> openchrome-users mailing list
> openchrome-users at openchrome.org
> http://wiki.openchrome.org/mailman/listinfo/openchrome-users
> Main page:
> http://www.openchrome.org
> Wiki:
> http://wiki.openchrome.org
> User Forum:
> http://wiki.openchrome.org/tikiwiki/tiki-view_forum.php?forumId=1
> 

I have tracked this down a bit further.
The syncVideo() routine is being called from pciFlush() with doSleep = 0.
This is sitting in a tight loop for 20ms (I guess until the next VSYNC ??).
Even setting doSleep to 1 does not fix the issue as in MythTv the
output thread is a Realtime thread and nanosleep() is, I believe, implemented
as a tight loop when call from a real-time thread.

I'm not sure of exactly the best way to fix this issue ...
Does syncVideo() wait for the next VSYNC period ?

Cheers


Terry




More information about the Openchrome-users mailing list