[FFmpeg-cvslog] Revert "ppc: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED"

Michael Niedermayer git at videolan.org
Sun Mar 15 02:14:13 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 15 02:02:21 2015 +0100| [b8535b273fcbf83c8aeffa3d6cae54882eaed364] | committer: Michael Niedermayer

Revert "ppc: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED"

This broke build, note, LOCAL_ALIGNED_16() does not work either

Found-by: James Almer <jamrial at gmail.com>
This reverts commit 98cccdd91c9aab9e031753f6feb81be0c44a9c8e.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8535b273fcbf83c8aeffa3d6cae54882eaed364
---

 libavcodec/ppc/h264dsp.c        |   10 ++++----
 libavcodec/ppc/h264qpel.c       |   50 +++++++++++++++++++--------------------
 libavcodec/ppc/vp8dsp_altivec.c |    2 +-
 3 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c
index fabdc2f..da118a4 100644
--- a/libavcodec/ppc/h264dsp.c
+++ b/libavcodec/ppc/h264dsp.c
@@ -262,7 +262,7 @@ static av_always_inline void h264_idct_dc_add_internal(uint8_t *dst, int16_t *bl
     vec_u8 dcplus, dcminus, v0, v1, v2, v3, aligner;
     vec_s32 v_dc32;
     LOAD_ZERO;
-    LOCAL_ALIGNED(16, int, dc);
+    DECLARE_ALIGNED(16, int, dc);
     int i;
 
     dc = (block[0] + 32) >> 6;
@@ -391,7 +391,7 @@ static void h264_idct_add8_altivec(uint8_t **dest, const int *block_offset,
 static inline void write16x4(uint8_t *dst, int dst_stride,
                              register vec_u8 r0, register vec_u8 r1,
                              register vec_u8 r2, register vec_u8 r3) {
-    LOCAL_ALIGNED(16, unsigned char, result, [64]);
+    DECLARE_ALIGNED(16, unsigned char, result)[64];
     uint32_t *src_int = (uint32_t *)result, *dst_int = (uint32_t *)dst;
     int int_dst_stride = dst_stride/4;
 
@@ -571,7 +571,7 @@ static inline vec_u8 h264_deblock_q1(register vec_u8 p0,
 }
 
 #define h264_loop_filter_luma_altivec(p2, p1, p0, q0, q1, q2, alpha, beta, tc0) {            \
-    LOCAL_ALIGNED(16, unsigned char, temp, [16]);                                            \
+    DECLARE_ALIGNED(16, unsigned char, temp)[16];                                             \
     register vec_u8 alphavec;                                                              \
     register vec_u8 betavec;                                                               \
     register vec_u8 mask;                                                                  \
@@ -652,7 +652,7 @@ void weight_h264_W_altivec(uint8_t *block, int stride, int height,
     vec_u8 vblock;
     vec_s16 vtemp, vweight, voffset, v0, v1;
     vec_u16 vlog2_denom;
-    LOCAL_ALIGNED(16, int32_t, temp, [4]);
+    DECLARE_ALIGNED(16, int32_t, temp)[4];
     LOAD_ZERO;
 
     offset <<= log2_denom;
@@ -701,7 +701,7 @@ void biweight_h264_W_altivec(uint8_t *dst, uint8_t *src, int stride, int height,
     vec_u8 vsrc, vdst;
     vec_s16 vtemp, vweights, vweightd, voffset, v0, v1, v2, v3;
     vec_u16 vlog2_denom;
-    LOCAL_ALIGNED(16, int32_t, temp, [4]);
+    DECLARE_ALIGNED(16, int32_t, temp)[4];
     LOAD_ZERO;
 
     offset = ((offset + 1) | 1) << log2_denom;
diff --git a/libavcodec/ppc/h264qpel.c b/libavcodec/ppc/h264qpel.c
index ecf99c8..575f504 100644
--- a/libavcodec/ppc/h264qpel.c
+++ b/libavcodec/ppc/h264qpel.c
@@ -73,7 +73,7 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## CODETYPE (uint8_t *dst, con
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 { \
-    LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
 }\
@@ -85,14 +85,14 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+1, half, stride, stride, SIZE);\
 }\
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
 }\
@@ -104,15 +104,15 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+stride, half, stride, stride, SIZE);\
 }\
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
@@ -120,8 +120,8 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
@@ -129,8 +129,8 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
@@ -138,8 +138,8 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
+    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
@@ -147,15 +147,15 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
+    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
     OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(dst, tmp, src, stride, SIZE, stride);\
 }\
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
+    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
     put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfHV, stride, SIZE, SIZE);\
@@ -163,9 +163,9 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
+    DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
     put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
     put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfHV, stride, SIZE, SIZE);\
@@ -173,9 +173,9 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
+    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
     put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\
@@ -183,9 +183,9 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## CODETYPE(uint8_t *dst, cons
 \
 static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
 {\
-    LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
-    LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
+    DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
+    DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
     put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
     put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
     OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\
diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c
index 82e7c2b..23e4ace 100644
--- a/libavcodec/ppc/vp8dsp_altivec.c
+++ b/libavcodec/ppc/vp8dsp_altivec.c
@@ -270,7 +270,7 @@ void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst
 #define EPEL_HV(WIDTH, HTAPS, VTAPS) \
 static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \
 { \
-    LOCAL_ALIGNED(16, uint8_t, tmp, [(2*WIDTH+5)*16]); \
+    DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \
     if (VTAPS == 6) { \
         put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16,      src-2*sstride, sstride, h+5, mx, my); \
         put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, dstride, tmp+2*16,      16,      h,   mx, my); \



More information about the ffmpeg-cvslog mailing list