[FFmpeg-cvslog] r29350 - in trunk/libswscale/ppc: swscale_altivec_template.c yuv2rgb_altivec.c

ramiro subversion
Fri Jun 5 00:50:38 CEST 2009


Author: ramiro
Date: Fri Jun  5 00:50:38 2009
New Revision: 29350

Log:
Use DECLARE_ALIGNED macro instead of __attribute__((aligned)) for ppc code.

Modified:
   trunk/libswscale/ppc/swscale_altivec_template.c
   trunk/libswscale/ppc/yuv2rgb_altivec.c

Modified: trunk/libswscale/ppc/swscale_altivec_template.c
==============================================================================
--- trunk/libswscale/ppc/swscale_altivec_template.c	Fri Jun  5 00:10:52 2009	(r29349)
+++ trunk/libswscale/ppc/swscale_altivec_template.c	Fri Jun  5 00:50:38 2009	(r29350)
@@ -92,7 +92,7 @@ yuv2yuvX_altivec_real(const int16_t *lum
     const vector signed int vini = {(1 << 18), (1 << 18), (1 << 18), (1 << 18)};
     register int i, j;
     {
-        int __attribute__ ((aligned (16))) val[dstW];
+        DECLARE_ALIGNED(16, int, val[dstW]);
 
         for (i = 0; i < (dstW -7); i+=4) {
             vec_st(vini, i << 2, val);
@@ -140,8 +140,8 @@ yuv2yuvX_altivec_real(const int16_t *lum
         altivec_packIntArrayToCharArray(val, dest, dstW);
     }
     if (uDest != 0) {
-        int  __attribute__ ((aligned (16))) u[chrDstW];
-        int  __attribute__ ((aligned (16))) v[chrDstW];
+        DECLARE_ALIGNED(16, int, u[chrDstW]);
+        DECLARE_ALIGNED(16, int, v[chrDstW]);
 
         for (i = 0; i < (chrDstW -7); i+=4) {
             vec_st(vini, i << 2, u);
@@ -214,7 +214,7 @@ static inline void hScale_altivec_real(i
                                        const int16_t *filterPos, int filterSize)
 {
     register int i;
-    int __attribute__ ((aligned (16))) tempo[4];
+    DECLARE_ALIGNED(16, int, tempo[4]);
 
     if (filterSize % 4) {
         for (i=0; i<dstW; i++) {

Modified: trunk/libswscale/ppc/yuv2rgb_altivec.c
==============================================================================
--- trunk/libswscale/ppc/yuv2rgb_altivec.c	Fri Jun  5 00:10:52 2009	(r29349)
+++ trunk/libswscale/ppc/yuv2rgb_altivec.c	Fri Jun  5 00:50:38 2009	(r29350)
@@ -753,7 +753,7 @@ SwsFunc ff_yuv2rgb_init_altivec(SwsConte
 void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4], int brightness, int contrast, int saturation)
 {
     union {
-        signed short tmp[8] __attribute__ ((aligned(16)));
+        DECLARE_ALIGNED(16, signed short, tmp[8]);
         vector signed short vec;
     } buf;
 
@@ -800,7 +800,7 @@ ff_yuv2packedX_altivec(SwsContext *c,
 
     vector signed short   RND = vec_splat_s16(1<<3);
     vector unsigned short SCL = vec_splat_u16(4);
-    unsigned long scratch[16] __attribute__ ((aligned (16)));
+    DECLARE_ALIGNED(16, unsigned long, scratch[16]);
 
     vector signed short *YCoeffs, *CCoeffs;
 



More information about the ffmpeg-cvslog mailing list