[FFmpeg-devel] [PATCH 2/5] x86: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED

Michael Niedermayer michaelni at gmx.at
Sat Mar 14 19:07:27 CET 2015


On Sat, Mar 14, 2015 at 03:30:25PM +0000, Christophe Gisquet wrote:
> The later may yield incorrect code for on-stack variables.
> ---
>  libavcodec/x86/ac3dsp_init.c  |  2 +-
>  libavcodec/x86/cavsdsp.c      |  4 ++--
>  libavcodec/x86/dct-test.c     |  4 ++--
>  libavcodec/x86/h264_qpel.c    | 22 +++++++++++-----------
>  libavcodec/x86/rv40dsp_init.c |  2 +-
>  libavcodec/x86/vc1dsp_mmx.c   |  2 +-
>  libavcodec/x86/vp8dsp_init.c  |  4 ++--
>  7 files changed, 20 insertions(+), 20 deletions(-)
[...]
> diff --git a/libavcodec/x86/dct-test.c b/libavcodec/x86/dct-test.c
> index d1a5067..8e8da0c 100644
> --- a/libavcodec/x86/dct-test.c
> +++ b/libavcodec/x86/dct-test.c
> @@ -28,8 +28,8 @@ void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
>  
>  #define PR_WRAP(INSN) \
>  static void ff_prores_idct_put_10_##INSN##_wrap(int16_t *dst){ \
> -    DECLARE_ALIGNED(16, static int16_t, qmat)[64]; \
> -    DECLARE_ALIGNED(16, static int16_t, tmp)[64]; \
> +    LOCAL_ALIGNED(16, static int16_t, qmat, [64]); \
> +    LOCAL_ALIGNED(16, static int16_t, tmp, [64]); \
>      int i; \

LOCAL_ALIGNED + static looks unintended

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150314/c8ae8044/attachment.asc>


More information about the ffmpeg-devel mailing list