[FFmpeg-devel] [PATCH] add DECLARE_ASM_CONST

mark cox melbournemark+ffmpeg
Mon Jan 28 05:35:28 CET 2008


wouldn't

+  #define DECLARE_ASM_CONST(n,t)     static const t attribute_used
__attribute__ ((aligned (n)))

be neater, and closer to the original syntax.

+DECLARE_ASM_CONST(8, uint64_t, bone)= 0x0101010101010101LL;

would become

+DECLARE_ASM_CONST(8, uint64_t) bone = 0x0101010101010101LL;

or, am i missing something?

Regards,
mark


On Jan 28, 2008 7:17 AM, Michael Niedermayer <michaelni at gmx.at> wrote:

> On Sun, Jan 27, 2008 at 09:09:57PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > not sure if this is really ideal, but here it is, the libavcodec part
> > only.
> > I put it in libavutil because it is needed (and a lot more) in
> > libswscale as well.
> > The h264.c case is a bit ugly, that array is not declared as aligned,
> > after the change it will be __attribute__((align(1))), I'd hope that
> > makes no difference, but I'm not sure.
> [...]
> > -static const int16_t __attribute__((aligned(8))) coeffs[]= {
> > +DECLARE_ALIGNED(static const int16_t, coeffs[])= {
>
> unrelated
>
> rest ok
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Observe your enemies, for they first find out your faults. -- Antisthenes
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHnObdYR7HhwQLD6sRAtAxAJ0Vsy4wNpKoklGKnW/10MQPBuJaQACgixVw
> QzbPF7I9CANnDiDILBFGtQ4=
> =oyNj
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>



More information about the ffmpeg-devel mailing list