[MPlayer-dev-eng] DMA or not DMA

Arpi arpi at mplayerhq.hu
Wed Nov 24 18:59:33 CET 2004


Hi,

> > > MPlayer has either to sleep until the buffer is coppied or
> > > that the codec has to use a copy of the buffer to work on.
> > > Both options are not very exciting.
> > 
> > in case of dma, codecs decode to system memory, then copy it
> > over dma. the only trick is that you need 2 (or more) buffers
> > for B frames, so while decoding second B frame, it wont overwrite
> > the buffer of first B (which is being transferred by dma)
> > it mean a little bit more memory, but doesnt mean speed loss.
> 
> How do i get the information whether i have to do an extra copy
> or not from the vo module? Or can i tell the codec not to write to
> a buffer until the next is ready ?

codecs call mp_get_image() for B frames, just have 2 buffers
and return them alternating. (by implementing get_buffer() in vo)

> > anyway, i have a sponsor interested in a dma-capable mga_vid.
> > they need to drive 5 or 6 matrox g450 cards (pci version) in a pc,
> > all playing back 800x600x25fps or 720x576x25fps video (possibly
> > on both heads, so total 12 video streams).
> 
> Oh.. sounds fun. 5 DMA channels, all correctly set up and coordinated.

yeah :)

btw, is it possible at all to run multiple dma transfers (to
different cards) in the same time? or bus-mastering is about it?
(ie only one dma transfer over pci bus)

> > we done some initial tests last weekend, and found that a 3ghz
> > p4 is fully loaded by playing 4 streams over mga_vid.
> > (agp mga_vid was 17% cpu usg, pci ones eat 25% each)
> > using fbdev in 32bpp, only 2 playbacks possible, at 16bpp only 3.
> > the decoding was only 9% cpu per stream, the rest was eaten up by
> > video data transfers. so dma could help here a lot.
> 
> That would be a nice testing enviroment. I guess i have to do
> the DMA stuff a bit earlier :)
sure :)
 
> BTW: where do you get all those sponsores ?

they get me, not in reverse.
i keep getting various funny offers from companies all over the
world, but mostly from hungary.
i always wonder how crazy ideas they have for using mplayer in
embedded environments...
unfortunatelly most of them require keeping their plans in secret,
so i cant tell you all these - sometimes funny - ideas :(


A'rpi / MPlayer, Astral & ESP-team

--
Girls are like internet domain names, the ones I like are already taken.




More information about the MPlayer-dev-eng mailing list