[FFmpeg-devel] [PATCH 0/5] Of {LOCAL_,DECLARE_}ALIGNED

Christophe Gisquet christophe.gisquet at gmail.com
Sat Mar 14 16:30:23 CET 2015


LOCAL_ALIGNED has been introduced around 2010 because some compilers
didn't obey the alignment request for addresses on the stack. Please
see d96cd429 or 0bbb1cdc for instance.

There are some remnants being fixed in the 4 first patches. The very
first one has some issues (merging lavc and lavc/x86 changes).

There are however a few caveats unsolved in that patch series:
1) You can't mix LOCAL_ALIGNED and initialization (cases are left as is)
2) LOCAL​_ALIGNED is "buggy" as it allows taking more than 2 dimension
   arguments (eg "ARGS, [DIM0], [DIM1], [DIM2], [DIM3]"), but it
   actually requires dimensions beyond the first to be concatenated
   (eg "ARGS, [DIM0], [DIM1][DIM2][DIM3]").
The later can be somewhat improved, but that's through some macro hell
that may itself not be supported by all compilers.

To avoid further code duplication, the last patch simply removes all
LOCAL_ALIGNED_* macros.

All changes (core+x86) tested with:
fate-vfilter fate-vcodec fate-h264 fate-ac3 fate-vp8 fate-cavs fate-vc1
for Win32 and Win64.

Christophe Gisquet (5):
  lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
  x86: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
  ppc: libswscale: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
  ppc: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
  lavc/lavu: remove LOCAL_ALIGNED_*

 configure                              |  8 ++----
 libavcodec/aacps.c                     |  6 ++--
 libavcodec/aacsbr.c                    |  6 ++--
 libavcodec/ac3enc.c                    |  2 +-
 libavcodec/ac3enc_template.c           |  4 +--
 libavcodec/bink.c                      | 10 +++----
 libavcodec/dcadec.c                    |  2 +-
 libavcodec/dct-test.c                  |  2 +-
 libavcodec/dnxhdenc.c                  |  2 +-
 libavcodec/dvdec.c                     |  6 ++--
 libavcodec/dvenc.c                     |  4 +--
 libavcodec/h264_loopfilter.c           | 10 +++----
 libavcodec/imc.c                       |  2 +-
 libavcodec/ituh263dec.c                |  2 +-
 libavcodec/me_cmp.c                    | 16 +++++------
 libavcodec/mips/aacsbr_mips.c          |  6 ++--
 libavcodec/mpc7.c                      |  2 +-
 libavcodec/mpegvideo_enc.c             |  2 +-
 libavcodec/mpegvideo_motion.c          |  2 +-
 libavcodec/ppc/h264dsp.c               | 10 +++----
 libavcodec/ppc/h264qpel.c              | 50 +++++++++++++++++-----------------
 libavcodec/ppc/mpegaudiodsp_altivec.c  |  8 +++---
 libavcodec/ppc/vp8dsp_altivec.c        |  2 +-
 libavcodec/proresdec2.c                |  6 ++--
 libavcodec/proresenc_anatoliy.c        |  3 +-
 libavcodec/rv34.c                      |  4 +--
 libavcodec/vp8.c                       |  2 +-
 libavcodec/vp9.c                       |  4 +--
 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/hevcdsp_init.c          |  4 +--
 libavcodec/x86/mpegaudiodsp.c          | 10 +++----
 libavcodec/x86/mpegvideoenc_template.c |  2 +-
 libavcodec/x86/rv40dsp_init.c          |  2 +-
 libavcodec/x86/simple_idct.c           |  2 +-
 libavcodec/x86/vc1dsp_mmx.c            |  2 +-
 libavcodec/x86/vp8dsp_init.c           |  4 +--
 libavcodec/x86/vp9dsp_init.c           |  2 +-
 libavutil/internal.h                   | 20 ++------------
 libswscale/ppc/swscale_altivec.c       |  4 +--
 42 files changed, 126 insertions(+), 141 deletions(-)

-- 
1.9.2.msysgit.0



More information about the ffmpeg-devel mailing list