diff ppc/imgresample_altivec.c @ 7333:a8a79f5385f6 libavcodec

cosmetics: Reformat PPC code in libavcodec according to style guidelines. This includes indentation changes, comment reformatting, consistent brace placement and some prettyprinting.
author diego
date Sun, 20 Jul 2008 18:58:30 +0000
parents 09f99af1db40
children 4e58133ef122
line wrap: on
line diff
--- a/ppc/imgresample_altivec.c	Sun Jul 20 18:06:41 2008 +0000
+++ b/ppc/imgresample_altivec.c	Sun Jul 20 18:58:30 2008 +0000
@@ -46,8 +46,7 @@
     vector signed short zeros, sumhv, sumlv;
     s = src;
 
-    for(i=0;i<4;i++)
-    {
+    for(i=0;i<4;i++) {
         /*
            The vec_madds later on does an implicit >>15 on the result.
            Since FILTER_BITS is 8, and we have 15 bits of magnitude in
@@ -86,13 +85,11 @@
 
     /* Do our altivec resampling on 16 pixels at once. */
     while(dst_width>=16) {
-        /*
-           Read 16 (potentially unaligned) bytes from each of
+        /* Read 16 (potentially unaligned) bytes from each of
            4 lines into 4 vectors, and split them into shorts.
            Interleave the multipy/accumulate for the resample
            filter with the loads to hide the 3 cycle latency
-           the vec_madds have.
-        */
+           the vec_madds have. */
         tv = (vector unsigned char *) &s[0 * wrap];
         tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[i * wrap]));
         srchv[0].v = (vector signed short) vec_mergeh(zero, tmp);
@@ -121,10 +118,8 @@
         sumhv = vec_madds(srchv[3].v, fv[3].v, sumhv);
         sumlv = vec_madds(srclv[3].v, fv[3].v, sumlv);
 
-        /*
-           Pack the results into our destination vector,
-           and do an aligned write of that back to memory.
-        */
+        /* Pack the results into our destination vector,
+           and do an aligned write of that back to memory. */
         dstv = vec_packsu(sumhv, sumlv) ;
         vec_st(dstv, 0, (vector unsigned char *) dst);
 
@@ -133,10 +128,8 @@
         dst_width-=16;
     }
 
-    /*
-       If there are any leftover pixels, resample them
-       with the slow scalar method.
-    */
+    /* If there are any leftover pixels, resample them
+       with the slow scalar method. */
     while(dst_width>0) {
         sum = s[0 * wrap] * filter[0] +
         s[1 * wrap] * filter[1] +