dsputil: Move LOCAL_ALIGNED macros to libavutil

pull/9/merge
Diego Biurrun 12 years ago
parent 059866eb17
commit 218aefce44
  1. 2
      libavcodec/aacps.c
  2. 1
      libavcodec/aacsbr.c
  3. 2
      libavcodec/ac3enc.c
  4. 1
      libavcodec/ac3enc_template.c
  5. 1
      libavcodec/bink.c
  6. 2
      libavcodec/dcadec.c
  7. 1
      libavcodec/dnxhdenc.c
  8. 1
      libavcodec/dsputil.c
  9. 26
      libavcodec/dsputil.h
  10. 1
      libavcodec/dv.c
  11. 2
      libavcodec/dvdec.c
  12. 2
      libavcodec/h264_loopfilter.c
  13. 1
      libavcodec/imc.c
  14. 1
      libavcodec/ituh263dec.c
  15. 1
      libavcodec/mpc7.c
  16. 1
      libavcodec/mpegvideo_enc.c
  17. 2
      libavcodec/mpegvideo_motion.c
  18. 2
      libavcodec/ppc/mpegaudiodec_altivec.c
  19. 1
      libavcodec/ra288.c
  20. 1
      libavcodec/rv34.c
  21. 1
      libavcodec/simple_idct.c
  22. 1
      libavcodec/takdec.c
  23. 2
      libavcodec/x86/mpegaudiodec.c
  24. 26
      libavutil/internal.h

@ -21,13 +21,13 @@
#include <stdint.h>
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "get_bits.h"
#include "aacps.h"
#include "aacps_tablegen.h"
#include "aacpsdata.c"
#include "dsputil.h"
#define PS_BASELINE 0 ///< Operate in Baseline PS mode
///< Baseline implies 10 or 20 stereo bands,

@ -33,6 +33,7 @@
#include "fft.h"
#include "aacps.h"
#include "sbrdsp.h"
#include "libavutil/internal.h"
#include "libavutil/libm.h"
#include <stdint.h>

@ -34,10 +34,10 @@
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "put_bits.h"
#include "dsputil.h"
#include "ac3dsp.h"
#include "ac3.h"
#include "fft.h"

@ -28,6 +28,7 @@
#include <stdint.h>
#include "libavutil/internal.h"
/* prototypes for static functions in ac3enc_fixed.c and ac3enc_float.c */

@ -21,6 +21,7 @@
*/
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "dsputil.h"
#include "binkdata.h"

@ -29,12 +29,12 @@
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
#include "libavutil/intmath.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/samplefmt.h"
#include "avcodec.h"
#include "dsputil.h"
#include "fft.h"
#include "get_bits.h"
#include "put_bits.h"

@ -26,6 +26,7 @@
//#define DEBUG
#define RC_VARIANCE 1 // use variance or ssd for fast rc
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dsputil.h"

@ -28,6 +28,7 @@
*/
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "copy_block.h"
#include "dsputil.h"

@ -417,30 +417,4 @@ void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
# define STRIDE_ALIGN 8
#endif
// Some broken preprocessors need a second expansion
// to be forced to tokenize __VA_ARGS__
#define E(x) x
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...) \
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) \
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v
#define LOCAL_ALIGNED(a, t, v, ...) E(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
#if HAVE_LOCAL_ALIGNED_8
# define LOCAL_ALIGNED_8(t, v, ...) E(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,))
#else
# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
#endif
#if HAVE_LOCAL_ALIGNED_16
# define LOCAL_ALIGNED_16(t, v, ...) E(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,))
#else
# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
#endif
#endif /* AVCODEC_DSPUTIL_H */

@ -38,6 +38,7 @@
* DV codec.
*/
#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dsputil.h"

@ -35,9 +35,9 @@
* DV decoder
*/
#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"

@ -25,9 +25,9 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "internal.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "h264.h"

@ -37,6 +37,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"

@ -30,6 +30,7 @@
//#define DEBUG
#include <limits.h>
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "dsputil.h"
#include "avcodec.h"

@ -26,6 +26,7 @@
*/
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "avcodec.h"
#include "get_bits.h"

@ -27,6 +27,7 @@
* The simplest mpeg encoder (well, it was the simplest!).
*/
#include "libavutil/internal.h"
#include "libavutil/intmath.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"

@ -22,6 +22,8 @@
*/
#include <string.h>
#include "libavutil/internal.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"

@ -21,8 +21,8 @@
#include "dsputil_altivec.h"
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegaudiodsp.h"
#define MACS(rt, ra, rb) rt+=(ra)*(rb)

@ -21,6 +21,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "internal.h"
#define BITSTREAM_READER_LE

@ -27,7 +27,6 @@
#include "libavutil/internal.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "golomb.h"
#include "internal.h"

@ -27,7 +27,6 @@
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mathops.h"
#include "simple_idct.h"

@ -25,6 +25,7 @@
* @author Paul B Mahol
*/
#include "libavutil/internal.h"
#include "libavutil/samplefmt.h"
#include "tak.h"
#include "avcodec.h"

@ -21,9 +21,9 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegaudiodsp.h"
void ff_imdct36_float_sse(float *out, float *buf, float *in, float *win);

@ -57,6 +57,32 @@
# define INT_BIT (CHAR_BIT * sizeof(int))
#endif
// Some broken preprocessors need a second expansion
// to be forced to tokenize __VA_ARGS__
#define E(x) x
#define LOCAL_ALIGNED_A(a, t, v, s, o, ...) \
uint8_t la_##v[sizeof(t s o) + (a)]; \
t (*v) o = (void *)FFALIGN((uintptr_t)la_##v, a)
#define LOCAL_ALIGNED_D(a, t, v, s, o, ...) \
DECLARE_ALIGNED(a, t, la_##v) s o; \
t (*v) o = la_##v
#define LOCAL_ALIGNED(a, t, v, ...) E(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,))
#if HAVE_LOCAL_ALIGNED_8
# define LOCAL_ALIGNED_8(t, v, ...) E(LOCAL_ALIGNED_D(8, t, v, __VA_ARGS__,,))
#else
# define LOCAL_ALIGNED_8(t, v, ...) LOCAL_ALIGNED(8, t, v, __VA_ARGS__)
#endif
#if HAVE_LOCAL_ALIGNED_16
# define LOCAL_ALIGNED_16(t, v, ...) E(LOCAL_ALIGNED_D(16, t, v, __VA_ARGS__,,))
#else
# define LOCAL_ALIGNED_16(t, v, ...) LOCAL_ALIGNED(16, t, v, __VA_ARGS__)
#endif
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)\
{\
p = av_malloc(size);\

Loading…
Cancel
Save