[Mplayer-advusers] Bug? Anomalous CPU usage when playing HDTV clips.

D Richard Felker III dalias at aerifal.cx
Mon Apr 12 22:06:04 CEST 2004


On Mon, Apr 12, 2004 at 10:51:35AM -0700, John Stebbins wrote:
> > Proper hardware should never require a busy loop; it just has a
> > "switch buffers at next vblank" command you send to the card. Are you
> > sure you're using the real backend scaler and not a stupid
> > blitter-based xv port?
> > 
> Yes, very sure.  I've become far more familiar with the XFree86
> XV code than I'd like to be :-P
> 
> The driver does use a command to the hardware that says 
> "switch buffers at next vblank".  But the way the driver was
> implemented, they are only using one buffer at a time in this code
> path (though 2 are allocated).  Before copying data into the next
> buffer, they always wait for the previous buffer to become free. They
> sit in a busy wait loop reading a status register until the
> previous operation is complete.  Then they switch "current" buffers,
> fill the "current" buffer, issue the command to refresh on vsync and
> return.

Ah, this is brain damaged. The only correct way is triple-buffering.
Can you fix the driver to triple-buffer so that it doesn't matter?

Rich




More information about the MPlayer-advusers mailing list