History

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

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

Michael Niedermayer committed 11 years ago

Commit b8535b21 parent a994fc33 files · +31 −31Browse files

Showing the changes to libavcodec/ppc (3 of 3 files). Show all

Unified · Split

3 files
  1. libavcodec/ppc/h264dsp.c +5 −5
  2. libavcodec/ppc/h264qpel.c +25 −25
  3. libavcodec/ppc/vp8dsp_altivec.c +1 −1
libavcodec/ppc/h264dsp.c+5−5
@@ -262,7 +262,7 @@ static av_always_inline void h264_idct_dc_add_internal(uint8_t *dst, int16_t *bl · 261 unmodified lines
262262 vec_u8 dcplus, dcminus, v0, v1, v2, v3, aligner;
263263 vec_s32 v_dc32;
264264 LOAD_ZERO;
265− LOCAL_ALIGNED(16, int, dc);
265+ DECLARE_ALIGNED(16, int, dc);
266266 int i;
267267
268268 dc = (block[0] + 32) >> 6;
@@ -391,7 +391,7 @@ static void h264_idct_add8_altivec(uint8_t **dest, const int *block_offset, · 122 unmodified lines
391391 static inline void write16x4(uint8_t *dst, int dst_stride,
392392 register vec_u8 r0, register vec_u8 r1,
393393 register vec_u8 r2, register vec_u8 r3) {
394− LOCAL_ALIGNED(16, unsigned char, result, [64]);
394+ DECLARE_ALIGNED(16, unsigned char, result)[64];
395395 uint32_t *src_int = (uint32_t *)result, *dst_int = (uint32_t *)dst;
396396 int int_dst_stride = dst_stride/4;
397397
@@ -571,7 +571,7 @@ static inline vec_u8 h264_deblock_q1(register vec_u8 p0, · 173 unmodified lines
571571 }
572572
573573 #define h264_loop_filter_luma_altivec(p2, p1, p0, q0, q1, q2, alpha, beta, tc0) { \
574− LOCAL_ALIGNED(16, unsigned char, temp, [16]); \
574+ DECLARE_ALIGNED(16, unsigned char, temp)[16]; \
575575 register vec_u8 alphavec; \
576576 register vec_u8 betavec; \
577577 register vec_u8 mask; \
@@ -652,7 +652,7 @@ void weight_h264_W_altivec(uint8_t *block, int stride, int height, · 74 unmodified lines
652652 vec_u8 vblock;
653653 vec_s16 vtemp, vweight, voffset, v0, v1;
654654 vec_u16 vlog2_denom;
655− LOCAL_ALIGNED(16, int32_t, temp, [4]);
655+ DECLARE_ALIGNED(16, int32_t, temp)[4];
656656 LOAD_ZERO;
657657
658658 offset <<= log2_denom;
@@ -701,7 +701,7 @@ void biweight_h264_W_altivec(uint8_t *dst, uint8_t *src, int stride, int height, · 42 unmodified lines
701701 vec_u8 vsrc, vdst;
702702 vec_s16 vtemp, vweights, vweightd, voffset, v0, v1, v2, v3;
703703 vec_u16 vlog2_denom;
704− LOCAL_ALIGNED(16, int32_t, temp, [4]);
704+ DECLARE_ALIGNED(16, int32_t, temp)[4];
705705 LOAD_ZERO;
706706
707707 offset = ((offset + 1) | 1) << log2_denom;
libavcodec/ppc/h264qpel.c+25−25
@@ -73,7 +73,7 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## CODETYPE (uint8_t *dst, con · 72 unmodified lines
7373 \
7474 static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
7575 { \
76− LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
76+ DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
7777 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
7878 OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
7979 }\
@@ -85,14 +85,14 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## CODETYPE(uint8_t *dst, cons · 5 unmodified lines
8585 \
8686 static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
8787 {\
88− LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
88+ DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
8989 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
9090 OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+1, half, stride, stride, SIZE);\
9191 }\
9292 \
9393 static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
9494 {\
95− LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
95+ DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
9696 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
9797 OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\
9898 }\
@@ -104,15 +104,15 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## CODETYPE(uint8_t *dst, cons · 5 unmodified lines
104104 \
105105 static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
106106 {\
107− LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\
107+ DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\
108108 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\
109109 OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+stride, half, stride, stride, SIZE);\
110110 }\
111111 \
112112 static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
113113 {\
114− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
115− LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
114+ DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
115+ DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
116116 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
117117 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
118118 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 · 1 unmodified line
120120 \
121121 static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
122122 {\
123− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
124− LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
123+ DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
124+ DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
125125 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
126126 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
127127 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 · 1 unmodified line
129129 \
130130 static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
131131 {\
132− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
133− LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
132+ DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
133+ DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
134134 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
135135 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
136136 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 · 1 unmodified line
138138 \
139139 static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
140140 {\
141− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
142− LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\
141+ DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
142+ DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
143143 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
144144 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
145145 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 · 1 unmodified line
147147 \
148148 static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
149149 {\
150− LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
150+ DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
151151 OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(dst, tmp, src, stride, SIZE, stride);\
152152 }\
153153 \
154154 static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
155155 {\
156− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
157− LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
158− LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
156+ DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
157+ DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
158+ DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
159159 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\
160160 put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
161161 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 · 1 unmodified line
163163 \
164164 static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
165165 {\
166− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
167− LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
168− LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
166+ DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\
167+ DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
168+ DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
169169 put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src + stride, SIZE, stride);\
170170 put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
171171 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 · 1 unmodified line
173173 \
174174 static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
175175 {\
176− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
177− LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
178− LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
176+ DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
177+ DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
178+ DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
179179 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\
180180 put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
181181 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 · 1 unmodified line
183183 \
184184 static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
185185 {\
186− LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\
187− LOCAL_ALIGNED(16, uint8_t, halfHV, [SIZE*SIZE]);\
188− LOCAL_ALIGNED(16, int16_t, tmp, [SIZE*(SIZE+8)]);\
186+ DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\
187+ DECLARE_ALIGNED(16, uint8_t, halfHV)[SIZE*SIZE];\
188+ DECLARE_ALIGNED(16, int16_t, tmp)[SIZE*(SIZE+8)];\
189189 put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src+1, SIZE, stride);\
190190 put_h264_qpel ## SIZE ## _hv_lowpass_ ## CODETYPE(halfHV, tmp, src, SIZE, SIZE, stride);\
191191 OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfV, halfHV, stride, SIZE, SIZE);\
libavcodec/ppc/vp8dsp_altivec.c+1−1
@@ -270,7 +270,7 @@ void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst · 269 unmodified lines
270270 #define EPEL_HV(WIDTH, HTAPS, VTAPS) \
271271 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) \
272272 { \
273− LOCAL_ALIGNED(16, uint8_t, tmp, [(2*WIDTH+5)*16]); \
273+ DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \
274274 if (VTAPS == 6) { \
275275 put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16, src-2*sstride, sstride, h+5, mx, my); \
276276 put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, dstride, tmp+2*16, 16, h, mx, my); \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t