PXA270 overlay patch for MPlayer-1.0rc4

2011-02-27 15:08
I have modified anarsoul's mplayer patch to work with the current MPlayer 1.0rc4. This patch adds support for the PXA27x video overlay which improves video playback performance a lot.


The patch can be applied against the official MPlayer 1.0rc4.

As it is not immediately obvious which options should be used when compiling mplayer for pxa270-based devices like the Zipit Z2, here is an example of a configure call:
./configure --enable-cross-compile --target=arm-linux \
--host-cc=gcc --cc=arm-none-linux-gnueabi-gcc \
--as=arm-none-linux-gnueabi-as --ar=arm-none-linux-gnueabi-ar \
--ranlib=arm-none-linux-gnueabi-ranlib \
--enable-armv5te --enable-iwmmxt --enable-pxa \
--enable-faad-fixed --enable-tremor-low \
--disable-mp3lib --disable-libvorbis --disable-vidix \
--extra-cflags="-march=iwmmxt -I/path/to/additional/includes/" \
--disable-runtime-cpudetection --disable-sighandler \
--disable-live --enable-alsa --enable-mpg123 \
--extra-ldflags="-L/path/to/additional/libs/ -lmpg123" 
It is important to disable mplayer's mp3lib and to use an external integer-only mp3 decoder instead. I recommend using mpg123 in fixed point configuration. For Vorbis audio mplayer's internal Tremor Vorbis decoder library should be used.

To play a video using the pxa video overlay on the Zipit Z2 you would run mplayer as follows:
$ mplayer -vo pxa -vf rotate=2 video.mkv
The video should have a resolution of 320x240 pixels.

Leave a comment