comparison libswscale/ppc/swscale_altivec_template.c @ 29308:880c5d014d37

Use DECLARE_ALIGNED macro instead of __attribute__((aligned)) for ppc code.
author ramiro
date Thu, 04 Jun 2009 22:50:38 +0000
parents 882a1f5613e1
children c080f1f5c07e
comparison
equal deleted inserted replaced
29307:5efc5acb0f7c 29308:880c5d014d37
90 uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW) 90 uint8_t *dest, uint8_t *uDest, uint8_t *vDest, int dstW, int chrDstW)
91 { 91 {
92 const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)}; 92 const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)};
93 register int i, j; 93 register int i, j;
94 { 94 {
95 int __attribute__ ((aligned (16))) val[dstW]; 95 DECLARE_ALIGNED(16, int, val[dstW]);
96 96
97 for (i = 0; i < (dstW -7); i+=4) { 97 for (i = 0; i < (dstW -7); i+=4) {
98 vec_st(vini, i << 2, val); 98 vec_st(vini, i << 2, val);
99 } 99 }
100 for (; i < dstW; i++) { 100 for (; i < dstW; i++) {
138 } 138 }
139 } 139 }
140 altivec_packIntArrayToCharArray(val, dest, dstW); 140 altivec_packIntArrayToCharArray(val, dest, dstW);
141 } 141 }
142 if (uDest != 0) { 142 if (uDest != 0) {
143 int __attribute__ ((aligned (16))) u[chrDstW]; 143 DECLARE_ALIGNED(16, int, u[chrDstW]);
144 int __attribute__ ((aligned (16))) v[chrDstW]; 144 DECLARE_ALIGNED(16, int, v[chrDstW]);
145 145
146 for (i = 0; i < (chrDstW -7); i+=4) { 146 for (i = 0; i < (chrDstW -7); i+=4) {
147 vec_st(vini, i << 2, u); 147 vec_st(vini, i << 2, u);
148 vec_st(vini, i << 2, v); 148 vec_st(vini, i << 2, v);
149 } 149 }
212 const uint8_t *src, int srcW, 212 const uint8_t *src, int srcW,
213 int xInc, const int16_t *filter, 213 int xInc, const int16_t *filter,
214 const int16_t *filterPos, int filterSize) 214 const int16_t *filterPos, int filterSize)
215 { 215 {
216 register int i; 216 register int i;
217 int __attribute__ ((aligned (16))) tempo[4]; 217 DECLARE_ALIGNED(16, int, tempo[4]);
218 218
219 if (filterSize % 4) { 219 if (filterSize % 4) {
220 for (i=0; i<dstW; i++) { 220 for (i=0; i<dstW; i++) {
221 register int j; 221 register int j;
222 register int srcPos = filterPos[i]; 222 register int srcPos = filterPos[i];