[MPlayer-dev-eng] [PATCH] mp3lib: Align output so that movaps can be used instead of movups

Zuxy Meng zuxy.meng at gmail.com
Mon Jun 4 09:21:35 CEST 2007


Hi,

2007/6/4, Alban Bedel <albeu at free.fr>:
> On Mon, 4 Jun 2007 14:54:01 +0800
> "Zuxy Meng" <zuxy.meng at gmail.com> wrote:
>
> > > > The attached patch aligns output address of dct64 functions to 16-byte
> > > > boundary, so movaps can be used instead of movups in dct64_sse,
> > > > resulting in 2.5% faster decode.
> > >
> > > I think it's better to use DECLARE_ALIGNED_16() macros. If they aren't
> > > available in mp3lib, then I think it's OK to add #include the relevant
> > > file from lavc.
> > >
> > > If someone disagrees with this, please speak up!
> >
> > I did a grep and found that outside ffmpeg, mplayer uses
> > __attribute__((aligned())) directly, as is the case for existing code
> > in mp3lib (see dct64_k7.c for example).
>
> I expected this :) MPlayer is full of various crap, the right solution is
> evidently to fix the crap and not propagating it.

OK I followed Guillaume's advice but got many warnings from
libavcodec/dsputil.h:
In file included from ../libavcodec/dsputil.h:33,
                 from dct64_sse.c:8:
../libavcodec/avcodec.h:2501: warning: 'ImgReSampleContext' is deprecated
../libavcodec/avcodec.h:2507: warning: 'ImgReSampleContext' is deprecated
In file included from dct64_sse.c:8:
../libavcodec/dsputil.h: In function 'copy_block2':
../libavcodec/dsputil.h:683: warning: implicit declaration of function 'ST16'
../libavcodec/dsputil.h:683: warning: implicit declaration of function 'LD16'
../libavcodec/dsputil.h: In function 'copy_block4':
../libavcodec/dsputil.h:694: warning: implicit declaration of function 'ST32'
../libavcodec/dsputil.h:694: warning: implicit declaration of function 'LD32'

I don't know if it's desirable.
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the MPlayer-dev-eng mailing list