[MPlayer-dev-eng] [PATCH] Optimized libmpeg2 routines for ARM/Xscale

Siarhei Siamashka siarhei.siamashka at gmail.com
Sun May 13 15:16:52 CEST 2007


On Tuesday 08 May 2007 00:54, Guillaume POIRIER wrote:

> > In addition, there is a problem with PLD (cache prefetch) instruction, it
> > is only available on ARMv5TE, but this code is also getting compiled in
> > when configured for ARMv4. The same problem exists in ffmpeg as well, and
> > it was raised on ffmpeg-devel mailing list recently.
>
> Fine, but you already have it on your fork!

What fork? ;-) It's more like a branch. I'm subscribed to both mplayer-dev-eng
and ffmpeg-developers mailing lists since the very beginning and tracking
what's happening here related to ARM support. All public MPlayer releases
get imported into maemo garage SVN and ARM/maemo related improvements 
are initially developed there. When I consider that something is ready for
inclusion into the official tree, it gets posted here or in the
ffmpeg-developers mailing list as a patch.

Branching only public releases is important to save time and be sure that 
all the regressions introduced in the sequential maemo builds are only my 
fault. Everything would become much harder if constantly keeping code in 
sync with official MPlayer SVN trunk. I'm interested not only in bleeding edge
features and optimizations (which can be always verified and backported), but
in having reliable and end user ready packages as well.

Can you suggest a better development model considering that I usually have
only a handful hours each week (mostly on weekends) to work on this free
project?

> https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/libmpeg2/motion_c
>omp_arm_s.S?root=mplayer&rev=82&view=markup

They were kept there as both Nokia 770 and N800 support ARMv5TE 
instructions and I did not have enough spare time to clean up this code, 
especially considering the issues with real upstream activity.

> I'm open to all suggestions as to what is better to fix this.

There are 3 options:
1. Keep it as is and wait for someone interested in proper armv4 support to
propose a fix :-)
2. Just remove these PLD instructions (but first benchmarking the code to
estimate how useful they are)
3. Fix this code to conditionally include PLD instructions only when 
HAVE_ARMV5TE is defined

> > Other than that, I don't have any ARM device with IWMMXT support to test
> > (only have Nokia 770 and N800 here), so can't provide further feedback
> > regarding IWMMXT code.
>
> Neither do I. I'm in contact with a company which seem to be willing
> to give an xscale-equiped PDA, but I haven't heard from them for a few
> days...
> I just figure that if these somewhat clean optimizations don't make it
> to mainline, there's little chance that people benefit from them,
> there are chances that people will duplicate this work elsewhere if
> they don't have it right under their noze (i.e. under MPlayer source
> tree).
>
> Also, since I know little about ARM, trying to get these patches
> merged is a really good learning experience! :-)

Having more people with ARM devices to test mplayer/ffmpeg code is always 
a good news :-)

> > Would you like to have ARMv5 optimizations [1] merged in MPlayer as well?
> > I was not sure if it would be a good idea to submit them to MPlayer
> > instead of upstream libmpeg2, so did not try that earlier.
> >
> > 1.
> > https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/libmpeg2/?root=
> >mplayer
>
> libmpeg2 project doesn't seem too reactive these days. Feel free to
> send patches to improve libmpeg2 ARM support on MPlayer's fork.
> I'll do my best to review them and merge them.

The patch is attached. This code is used in maemo builds since revision 28:
https://garage.maemo.org/plugins/scmsvn/viewcvs.php?root=mplayer&view=rev&rev=28

It passed my '-vo md5sum' tests. Also it reduces decoding time to ~105 seconds
for the video file that was used for older benchmarks:
http://article.gmane.org/gmane.comp.video.mplayer.devel/43038
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libmpeg2-armv5te.diff
Type: text/x-diff
Size: 14686 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070513/edad57f3/attachment.diff>


More information about the MPlayer-dev-eng mailing list