Yeelong and SiliconMotion driver: asking for developers

rixed at happyleptic.org rixed at happyleptic.org
Wed Mar 10 07:26:52 PST 2010


Apart from minor bugs that are already largely solved, Yeelong video driver
suffers from performance issues related to video decoding.

The main problem, as I understand it, appears to be that the LynxEM chipset 
can handle only packed YUV while most of the time frames are given as planar 
YUV (I'm not experienced with video decoding but I assume it's due to
YUV components being encoded separately). So the video driver have to
pack the data it receives from the Xv client in order for the chipset to
perform its YUV->RGB on-the-fly conversion.

The current smi driver does this by calling Xv helper function for this job,
which is dog slow and deprive mplayer of needed CPU horsepower.  Noticing this 
bottleneck, Lemote devs added a faster conversion routine using MMX loongson 
assembler right into smi driver. As far as I know all the patchs around that 
makes mplayed videos fast are based on this ugly hack.

So, since the paid professionals were not given appropriate time to fix the 
slowness issue the proper way, we the unpaid amateurs will have to work on it 
on our spare time :-)

Of course SMI driver must keep calling Xv generic conversion function.
But patching Xv with architecture specific assembly is not much better. Xv 
should instead use a library that offers this kind of image processing 
functions optimised for the running architecture. This library already exist,
is called libpixman and is in fact already used by some other parts of X11.

Unfortunately YUV conversion functions are not currently supported by 
libpixman, although some work is being done in this direction. Finishing this 
work, adding support for loongson MMX instructions and then patch Xv to
use libpixman would be the perfect solution to our problem.

I was about to try this path when I discovered that libpixman project is also 
considering another radically different evolution : to replace all architecture 
specific pieces of code by a more generic JIT compiler.

Of course I quickly dropped the idea of patching YUV + loongson into pixman 
and embraced the JIT thing instead.
Why hack for two weeks when you could be hacking for six months ?

 >8)





More information about the xorg mailing list