[Ffmpeg-devel] [PATCH] fix mpegaudiodec on ARM and benchmark
Siarhei Siamashka
siarhei.siamashka
Thu Aug 24 01:16:25 CEST 2006
On Thursday 24 August 2006 01:16, Aurelien Jacobs wrote:
> > I also have a simple patch for MULS/MACS macro, it provides quite a
> > noticeable performance improvement (with
> > --disable-libavcodec_mpegaudio_hp option at least), but requires armv5
> > edsp instructions support which is not available on some machines (but
> > intel xscale should have them). If you are interested to try it, I can
> > post it here, though it is quite trivial.
>
> Yes please, post it.
> Also it would probably be enough to add a --enable-edsp switch to
> the configure to enable those optimisations.
The patch is attached. This code will only be used
with --disable-libavcodec_mpegaudio_hp.
ARCH_ARM5E should be defined for this code to be used. Right now I
assume that if cpu supports IWMMX instructions, it should also support
armv5 (don't know if it is always true). It should be probably really added
as an additional configure option.
Please test if this patch improves performance for you.
> > I think none of & are required, it would just force the compiler not to
> > use input registers for output arguments restricting optimization
> > possibilities a bit.
>
> See my previous mail. It just don't compile without them.
I see, I just missed a notice in SMULL instruction description about its
operands restriction:
<RdHi>, <RdLo> and <Rm> must be three distinct registers, or the results are
UNPREDICTABLE
In my tests the compiler just did not try to use the same registers for these
operands, so I did not notice the problem.
So "=&r" are really needed, sorry for causing confusion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpegaudiodec-armv5.diff
Type: text/x-diff
Size: 1206 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060824/d96977eb/attachment.diff>
More information about the ffmpeg-devel
mailing list