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

Guillaume POIRIER poirierg at gmail.com
Mon May 7 23:54:58 CEST 2007


Hi,

On 5/7/07, Siarhei Siamashka <siarhei.siamashka at gmail.com> wrote:
> On Monday 07 May 2007 15:17, Guillaume POIRIER wrote:
>
> > On 5/5/07, Guillaume POIRIER <poirierg at gmail.com> wrote:
> > > Hi there,
> > >
> > > Attached patch features $SUBJ. It's just a re post of a patch posted
> > > by David Bateman while I was on hollidays, but never made it to SVN.
> > > It was advised to send these changes to libmpeg2 team directly, but
> > > since this project hasn't even acknowledged the message, I plan to
> > > apply attached patch in a few days.
> >
> > No objection? I'll apply it tonite unless there's ojection since then.
>
> This patch breaks compilation:

ouchy!


> motion_comp.c: In function `mpeg2_mc_init':
> motion_comp.c:71: error: `MPEG2_ACCEL_ARM' undeclared (first use in this
> function)
> motion_comp.c:71: error: (Each undeclared identifier is reported only once
> motion_comp.c:71: error: for each function it appears in.)
>
> These MPEG2_ACCEL_ARM and MPEG2_ACCEL_ARM_IWMMXT are not
> defined anywhere.

Please try attached patch, that pulls the define from original source:
http://atty.skr.jp/WebSVN/filedetails.php?repname=mplayer-w100&path=%2Ftrunk%2Flibmpeg2%2Fmpeg2.h&rev=0&sc=0


> 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!
https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/libmpeg2/motion_comp_arm_s.S?root=mplayer&rev=82&view=markup

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


> 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! :-)


> 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.

Guillaume
--
Rich, you're forgetting one thing here: *everybody* except you is
stupid.
   Måns Rullgård
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_undefined_MPEG2_ACCEL_ARM...patch
Type: application/octet-stream
Size: 427 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070507/5f04ac2a/attachment.obj>


More information about the MPlayer-dev-eng mailing list