[mythtv] [PATCH] XvMC playback patch

Daniel Thor Kristjansson danielk at cat.nyu.edu
Tue Apr 20 15:41:57 EDT 2004

This patch does five things
 * Rewrites the XvMC packet parsing in libavcodec to be more CPU friendly
 * Uses my XvMCSurfaceTypes class to find the best XvMC surface available
 * If XvMCSurfaceTypes finds a IDCT accelerated surface, then IDCT
   acceleration is used.
 * If the new frame skipping option is enabled in the setup then the
   player can now skip b-frames without leaking XV or XvMC acceleration
   surfaces as the current implementation does.
 * If the avcodec indicates that the frame is interlaced, or gives no
   indication and the surface is in a standard interlaced format, then
   a hint is given to the videoout class that the surface is interlaced.
   videoout_xvmc uses this hint to display only one field of in the
   surface to avoid tearing. A future implementation might use this hint
   to double the framerate and/or perform sophisticated de-interlacing
   at the display level; say if you implemented it in the new nvidia
   card's pixel processor. [This accounts for much of the patch's size
   as there are many videoout files to patch, though each of those
   changes is trivial.]

This was the robustness and hdtv-playback patches, but as I've worked on
them the two have merged since there is a lot of interaction between the
two. Also, most of the robustness patch was already applied to CVS. It's
not really appropriate to call it the hdtv-playback patch, since it
accelerates any MPEG2 stream.

The frame skipping is the only part of the patch that isn't working well
for testers, but it is disabled by default. I'm planning on improving
the frame skipping heuristic, but that will only touch one file once
this patch is accepted.

This patch is here:
 Place the XvMCSurfaceTypes file in libs/libmythtv

-- Daniel

More information about the mythtv-dev mailing list