Thursday, August 11, 2005

Xv support on the PVR350

The PVR350 X driver didn't used to support the Xvideo extension that video players such as xine, mplayer and realplayer try to use. Instead, display was limited to using standard X11 or Xshm which was just too slow/inefficient to display video in realtime.

Having spent a considerable amount of time testing and debugging the new Xv support for the 350, I'm happy to say that it's now working really quite nicely.

Initially, I saw problems with MPEG recordings when simultaneously watching video via the YUV decoder. The MPEG encoder appeared to drop frames with the resulting video looking (and sounding) like it was speeded up. Increasing the MPEG encoder buffer size from the 4Mb default to 8Mb (as suggested by John Harvey, author of the X driver) cured the problem. However, that started triggering buffer allocation problems, so I reverted to using static buffer allocation in ivtv, ie. where all of the codec stream buffers are allocated on module load rather than allocated and freed on-the-fly.

Here are my Xv-friendly ivtv module options:
# buffer stuff to help simultaneous YUV decode/MPG encode
options ivtv mpg_buffers=8 dec_yuv_buffers=4 ivtv_dynbuf=0

So, using the changes above with 0.3.7c ivtv driver and the latest X driver allows me to play DVDs and watch pre-recorded AVI and QT video. mplayer started causing me problems during testing and I switched to xine. They may well both work fine but I've stuck with xine for now.

Some videos still show a few dropped/discarded frames and I'm trying to figure out if there is any further optimisation I can make to cure this. Additionally, there is also occassional 'frame stalls' which show as a subtle jerkiness in panning movement, however DVD straight off the disc is now almost pefect. If only I could get the digital audio out working on my Shuttle...

0 Comments:

Post a Comment

<< Home