changeset 109:4c5594af9816 libpostproc

Remove AltiVec vector declaration compiler compatibility macros. The original problem was that FSF and Apple gcc used a different syntax for vector declarations, i.e. {} vs. (). Nowadays Apple gcc versions support the standard {} syntax and versions that support {} are available on all relevant Mac OS X versions. Thus the greater compatibility is no longer worth cluttering the code with macros.
author diego
date Thu, 24 Jul 2008 10:53:32 +0000
parents 83d51d1fb580
children 858be852c955
files postprocess_altivec_template.c
diffstat 1 files changed, 34 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/postprocess_altivec_template.c	Fri May 09 11:56:36 2008 +0000
+++ b/postprocess_altivec_template.c	Thu Jul 24 10:53:32 2008 +0000
@@ -184,11 +184,11 @@
 
     if (numEq > c->ppMode.flatnessThreshold){
         const vector unsigned char mmoP1 = (const vector unsigned char)
-            AVV(0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
-                0x00, 0x01, 0x12, 0x13, 0x08, 0x09, 0x1A, 0x1B);
+            {0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f,
+             0x00, 0x01, 0x12, 0x13, 0x08, 0x09, 0x1A, 0x1B};
         const vector unsigned char mmoP2 = (const vector unsigned char)
-            AVV(0x04, 0x05, 0x16, 0x17, 0x0C, 0x0D, 0x1E, 0x1F,
-                0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f);
+            {0x04, 0x05, 0x16, 0x17, 0x0C, 0x0D, 0x1E, 0x1F,
+             0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f};
         const vector unsigned char mmoP = (const vector unsigned char)
             vec_lvsl(8, (unsigned char*)0);
 
@@ -350,8 +350,8 @@
         COMPUTE_VR(7, 8, 9);
 
         const vector signed char neg1 = vec_splat_s8(-1);
-        const vector unsigned char permHH = (const vector unsigned char)AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                                                                            0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
+        const vector unsigned char permHH = (const vector unsigned char){0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                                                                         0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
 
 #define PACK_AND_STORE(i)                                       \
 {   const vector unsigned char perms##i =                       \
@@ -505,8 +505,8 @@
      const vector unsigned char st5 = vec_packsu(vb5plusd,  (vector signed short)zero);
 
      const vector signed char neg1 = vec_splat_s8(-1);
-     const vector unsigned char permHH = (const vector unsigned char)AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                                                                         0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
+     const vector unsigned char permHH = (const vector unsigned char){0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                                                                      0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
 
 #define STORE(i)                                                \
 {    const vector unsigned char perms##i =                      \
@@ -566,8 +566,8 @@
     vector unsigned char v_avg;
     {
     const vector unsigned char trunc_perm = (vector unsigned char)
-        AVV(0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-            0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18);
+        {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+         0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18};
     const vector unsigned char trunc_src12 = vec_perm(src1, src2, trunc_perm);
     const vector unsigned char trunc_src34 = vec_perm(src3, src4, trunc_perm);
     const vector unsigned char trunc_src56 = vec_perm(src5, src6, trunc_perm);
@@ -605,11 +605,11 @@
     DECLARE_ALIGNED(16, signed int, S[8]);
     {
     const vector unsigned short mask1 = (vector unsigned short)
-        AVV(0x0001, 0x0002, 0x0004, 0x0008,
-            0x0010, 0x0020, 0x0040, 0x0080);
+                                        {0x0001, 0x0002, 0x0004, 0x0008,
+                                         0x0010, 0x0020, 0x0040, 0x0080};
     const vector unsigned short mask2 = (vector unsigned short)
-        AVV(0x0100, 0x0200, 0x0000, 0x0000,
-            0x0000, 0x0000, 0x0000, 0x0000);
+                                        {0x0100, 0x0200, 0x0000, 0x0000,
+                                         0x0000, 0x0000, 0x0000, 0x0000};
 
     const vector unsigned int vuint32_16 = vec_sl(vec_splat_u32(1), vec_splat_u32(4));
     const vector unsigned int vuint32_1 = vec_splat_u32(1);
@@ -706,33 +706,33 @@
     const vector unsigned int vuint32_4 = vec_splat_u32(4);
 
     const vector unsigned char permA1 = (vector unsigned char)
-        AVV(0x00, 0x01, 0x02, 0x10, 0x11, 0x12, 0x1F, 0x1F,
-            0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F);
+        {0x00, 0x01, 0x02, 0x10, 0x11, 0x12, 0x1F, 0x1F,
+         0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F};
     const vector unsigned char permA2 = (vector unsigned char)
-        AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x10, 0x11,
-            0x12, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F);
+        {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x10, 0x11,
+         0x12, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F};
     const vector unsigned char permA1inc = (vector unsigned char)
-        AVV(0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
-            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+        {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
+         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     const vector unsigned char permA2inc = (vector unsigned char)
-        AVV(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-            0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+        {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
+         0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     const vector unsigned char magic = (vector unsigned char)
-        AVV(0x01, 0x02, 0x01, 0x02, 0x04, 0x02, 0x01, 0x02,
-            0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+        {0x01, 0x02, 0x01, 0x02, 0x04, 0x02, 0x01, 0x02,
+         0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     const vector unsigned char extractPerm = (vector unsigned char)
-        AVV(0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01,
-            0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01);
+        {0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01,
+         0x10, 0x10, 0x10, 0x01, 0x10, 0x10, 0x10, 0x01};
     const vector unsigned char extractPermInc = (vector unsigned char)
-        AVV(0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-            0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01);
+        {0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+         0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01};
     const vector unsigned char identity = vec_lvsl(0,(unsigned char *)0);
     const vector unsigned char tenRight = (vector unsigned char)
-        AVV(0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+        {0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     const vector unsigned char eightLeft = (vector unsigned char)
-        AVV(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08);
+        {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08};
 
 
 #define F_INIT(i)                                       \
@@ -979,8 +979,8 @@
     }
 
     const vector signed char neg1 = vec_splat_s8(-1);
-    const vector unsigned char permHH = (const vector unsigned char)AVV(0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                                                                        0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F);
+    const vector unsigned char permHH = (const vector unsigned char){0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                                                                     0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
 
 #define PACK_AND_STORE(src, i)                                  \
     const vector unsigned char perms##src##i =                  \