xv acceleration and the ps3

Matthias Hopf mhopf at suse.de
Tue Apr 10 11:05:08 PDT 2007


On Apr 10, 07 14:38:53 +0100, Alan Jones wrote:
> While I could add support to a player so that it could use the spus to
> handle rescaling it occured to me that I might be able to instead
> implement a virtual xv driver/plugin (sorry not sure what it's called)
> that uses the spus to accelerate graphics seeing we have no direct
> access to the graphics card in linux on the ps3.

If you want to do that, you can use the XVideo code from xgl (siting in
the xgl-0-0-1 branch of xserver) as a starting point. It uses OpenGL for
scaling and color conversion (encapsulated into glitz), the XVideo code
itself is relatively straight-forward and pretty small and self
contained.

OTOH if doing color space conversion and scaling on a spu, you should
probably go for the scaler code in the player, because that sounds like
the easier and cleaner approach. You can't get faster framebuffer access
than by MITShm (mplayer -vo x11 / xine -V xshm) anyway.

> I'm not sure how video players interact with xv - though most of them

They use MITShm extension for sending YUY2 or YV12 color space images to
the Xserver. The only difference to MITShm itself is the color space and
the scaling.

> this? It'd be nice to benefit all players rather than just one - plus
> not all of them support framebuffers. I guess it'd also help any other
> applications which happen to use xv to assist in drawing to screen.

It's not many players anyway. mplayer and libxine, that's about it.
Also the players will need general spu acceleration anyway.

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de



More information about the xorg mailing list