changeset 25749:8d082a234a6d

Remove non cosmetic spaces inside parentheses.
author benoit
date Thu, 17 Jan 2008 08:57:15 +0000
parents 28a006b3d912
children 06bf0eb70a55
files libswscale/rgb2rgb_template.c libswscale/swscale-example.c libswscale/swscale.c libswscale/swscale_altivec_template.c libswscale/swscale_template.c libswscale/yuv2rgb_altivec.c
diffstat 6 files changed, 31 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/rgb2rgb_template.c	Thu Jan 17 08:12:23 2008 +0000
+++ b/libswscale/rgb2rgb_template.c	Thu Jan 17 08:57:15 2008 +0000
@@ -53,7 +53,7 @@
 #define PREFETCH  "prefetch"
 #define PREFETCHW "prefetchw"
 #define PAVGB     "pavgusb"
-#elif defined ( HAVE_MMX2 )
+#elif defined (HAVE_MMX2)
 #define PREFETCH "prefetchnta"
 #define PREFETCHW "prefetcht0"
 #define PAVGB     "pavgb"
@@ -1727,7 +1727,7 @@
         }
 #endif
 #endif
-        if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1) )
+        if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1))
         {
             usrc += chromStride;
             vsrc += chromStride;
--- a/libswscale/swscale-example.c	Thu Jan 17 08:12:23 2008 +0000
+++ b/libswscale/swscale-example.c	Thu Jan 17 08:57:15 2008 +0000
@@ -217,13 +217,13 @@
 #else
     sws_rgb2rgb_init(0);
 #endif
-    sws_scale(sws, rgb_src, rgb_stride, 0, H   , src, stride);
+    sws_scale(sws, rgb_src, rgb_stride, 0, H, src, stride);
 
 #if defined(ARCH_X86)
     asm volatile ("emms\n\t");
 #endif
 
-    selfTest(src,  stride, W, H);
+    selfTest(src, stride, W, H);
 
     return 123;
 }
--- a/libswscale/swscale.c	Thu Jan 17 08:12:23 2008 +0000
+++ b/libswscale/swscale.c	Thu Jan 17 08:57:15 2008 +0000
@@ -1597,9 +1597,9 @@
     }
     dst = dstParam[1] + dstStride[1]*srcSliceY/2;
     if (c->dstFormat == PIX_FMT_NV12)
-        interleaveBytes( src[1],src[2],dst,c->srcW/2,srcSliceH/2,srcStride[1],srcStride[2],dstStride[0] );
+        interleaveBytes(src[1],src[2],dst,c->srcW/2,srcSliceH/2,srcStride[1],srcStride[2],dstStride[0]);
     else
-        interleaveBytes( src[2],src[1],dst,c->srcW/2,srcSliceH/2,srcStride[2],srcStride[1],dstStride[0] );
+        interleaveBytes(src[2],src[1],dst,c->srcW/2,srcSliceH/2,srcStride[2],srcStride[1],dstStride[0]);
 
     return srcSliceH;
 }
@@ -1608,7 +1608,7 @@
                                int srcSliceH, uint8_t* dstParam[], int dstStride[]){
     uint8_t *dst=dstParam[0] + dstStride[0]*srcSliceY;
 
-    yv12toyuy2( src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0] );
+    yv12toyuy2(src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0]);
 
     return srcSliceH;
 }
@@ -1617,7 +1617,7 @@
                                int srcSliceH, uint8_t* dstParam[], int dstStride[]){
     uint8_t *dst=dstParam[0] + dstStride[0]*srcSliceY;
 
-    yv12touyvy( src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0] );
+    yv12touyvy(src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0]);
 
     return srcSliceH;
 }
@@ -2158,7 +2158,7 @@
         }
 #endif
 
-        if ( srcFormat==PIX_FMT_YUV410P && dstFormat==PIX_FMT_YUV420P )
+        if (srcFormat==PIX_FMT_YUV410P && dstFormat==PIX_FMT_YUV420P)
         {
             c->swScale= yvu9toyv12Wrapper;
         }
@@ -2214,7 +2214,7 @@
         /* simple copy */
         if (  srcFormat == dstFormat
             || (isPlanarYUV(srcFormat) && isGray(dstFormat))
-            || (isPlanarYUV(dstFormat) && isGray(srcFormat)) )
+            || (isPlanarYUV(dstFormat) && isGray(srcFormat)))
         {
             c->swScale= simpleCopy;
         }
@@ -2373,7 +2373,7 @@
         nextSlice>>= c->chrSrcVSubSample;
         nextSlice<<= c->chrSrcVSubSample;
         if (c->vLumFilterPos[i   ] + c->vLumBufSize < nextSlice)
-            c->vLumBufSize= nextSlice - c->vLumFilterPos[i   ];
+            c->vLumBufSize= nextSlice - c->vLumFilterPos[i];
         if (c->vChrFilterPos[chrI] + c->vChrBufSize < (nextSlice>>c->chrSrcVSubSample))
             c->vChrBufSize= (nextSlice>>c->chrSrcVSubSample) - c->vChrFilterPos[chrI];
     }
@@ -2657,7 +2657,7 @@
     for (i=0; i<length; i++)
     {
         double dist= i-middle;
-        coeff[i]= exp( -dist*dist/(2*variance*variance) ) / sqrt(2*variance*PI);
+        coeff[i]= exp(-dist*dist/(2*variance*variance)) / sqrt(2*variance*PI);
     }
 
     sws_normalizeVec(vec, 1.0);
--- a/libswscale/swscale_altivec_template.c	Thu Jan 17 08:12:23 2008 +0000
+++ b/libswscale/swscale_altivec_template.c	Thu Jan 17 08:57:15 2008 +0000
@@ -387,7 +387,7 @@
 static inline int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
                                               int srcSliceH, uint8_t* dstParam[], int dstStride_a[]) {
     uint8_t *dst=dstParam[0] + dstStride_a[0]*srcSliceY;
-    // yv12toyuy2( src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0] );
+    // yv12toyuy2(src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0]);
     uint8_t *ysrc = src[0];
     uint8_t *usrc = src[1];
     uint8_t *vsrc = src[2];
@@ -401,7 +401,7 @@
     register unsigned int y;
 
     if (width&15) {
-        yv12toyuy2( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
+        yv12toyuy2(ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
         return srcSliceH;
     }
 
@@ -450,7 +450,7 @@
             vec_st(v_yuy2_0, (i << 1), dst);
             vec_st(v_yuy2_1, (i << 1) + 16, dst);
         }
-        if ( (y&(vertLumPerChroma-1))==(vertLumPerChroma-1) ) {
+        if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1)) {
             usrc += chromStride;
             vsrc += chromStride;
         }
@@ -464,7 +464,7 @@
 static inline int yv12touyvy_unscaled_altivec(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
                                               int srcSliceH, uint8_t* dstParam[], int dstStride_a[]) {
     uint8_t *dst=dstParam[0] + dstStride_a[0]*srcSliceY;
-    // yv12toyuy2( src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0] );
+    // yv12toyuy2(src[0],src[1],src[2],dst,c->srcW,srcSliceH,srcStride[0],srcStride[1],dstStride[0]);
     uint8_t *ysrc = src[0];
     uint8_t *usrc = src[1];
     uint8_t *vsrc = src[2];
@@ -478,7 +478,7 @@
     register unsigned int y;
 
     if (width&15) {
-        yv12touyvy( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
+        yv12touyvy(ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
         return srcSliceH;
     }
 
@@ -527,7 +527,7 @@
             vec_st(v_uyvy_0, (i << 1), dst);
             vec_st(v_uyvy_1, (i << 1) + 16, dst);
         }
-        if ( (y&(vertLumPerChroma-1))==(vertLumPerChroma-1) ) {
+        if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1)) {
             usrc += chromStride;
             vsrc += chromStride;
         }
--- a/libswscale/swscale_template.c	Thu Jan 17 08:12:23 2008 +0000
+++ b/libswscale/swscale_template.c	Thu Jan 17 08:57:15 2008 +0000
@@ -39,7 +39,7 @@
 #ifdef HAVE_3DNOW
 #define PREFETCH  "prefetch"
 #define PREFETCHW "prefetchw"
-#elif defined ( HAVE_MMX2 )
+#elif defined (HAVE_MMX2)
 #define PREFETCH "prefetchnta"
 #define PREFETCHW "prefetcht0"
 #else
@@ -1513,7 +1513,7 @@
     }
 
 #ifdef HAVE_MMX
-    if ( uvalpha < 2048 ) // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster
+    if (uvalpha < 2048) // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster
     {
         switch(dstFormat)
         {
@@ -1692,7 +1692,7 @@
         }
     }
 #endif /* HAVE_MMX */
-    if ( uvalpha < 2048 )
+    if (uvalpha < 2048)
     {
         YSCALE_YUV_2_ANYRGB_C(YSCALE_YUV_2_RGB1_C, YSCALE_YUV_2_PACKED1_C)
     }else{
@@ -1831,7 +1831,7 @@
         int g= (((uint32_t*)src)[i]>>8)&0xFF;
         int r= (((uint32_t*)src)[i]>>16)&0xFF;
 
-        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT);
+        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT);
     }
 }
 
@@ -1934,7 +1934,7 @@
         int g= src[i*3+1];
         int r= src[i*3+2];
 
-        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT);
+        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT);
     }
 #endif /* HAVE_MMX */
 }
@@ -2155,7 +2155,7 @@
         int g= (((uint32_t*)src)[i]>>8)&0xFF;
         int b= (((uint32_t*)src)[i]>>16)&0xFF;
 
-        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT);
+        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT);
     }
 }
 
@@ -2187,7 +2187,7 @@
         int g= src[i*3+1];
         int b= src[i*3+2];
 
-        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)) )>>RGB2YUV_SHIFT);
+        dst[i]= ((RY*r + GY*g + BY*b + (33<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT);
     }
 }
 
@@ -2891,7 +2891,7 @@
 
 /* GCC-3.3 makes MPlayer crash on IA-32 machines when using "g" operand here,
    which is needed to support GCC-4.0 */
-#if defined(ARCH_X86_64) && ((__GNUC__ > 3) || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#if defined(ARCH_X86_64) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
             :: "m" (src1), "m" (dst), "g" ((long)dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
 #else
             :: "m" (src1), "m" (dst), "m" ((long)dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
@@ -3077,8 +3077,8 @@
                 lastInChrBuf++;
             }
             //wrap buf index around to stay inside the ring buffer
-            if (lumBufIndex >= vLumBufSize ) lumBufIndex-= vLumBufSize;
-            if (chrBufIndex >= vChrBufSize ) chrBufIndex-= vChrBufSize;
+            if (lumBufIndex >= vLumBufSize) lumBufIndex-= vLumBufSize;
+            if (chrBufIndex >= vChrBufSize) chrBufIndex-= vChrBufSize;
         }
         else // not enough lines left in this slice -> load the rest in the buffer
         {
@@ -3118,8 +3118,8 @@
                 lastInChrBuf++;
             }
             //wrap buf index around to stay inside the ring buffer
-            if (lumBufIndex >= vLumBufSize ) lumBufIndex-= vLumBufSize;
-            if (chrBufIndex >= vChrBufSize ) chrBufIndex-= vChrBufSize;
+            if (lumBufIndex >= vLumBufSize) lumBufIndex-= vLumBufSize;
+            if (chrBufIndex >= vChrBufSize) chrBufIndex-= vChrBufSize;
             break; //we can't output a dstY line so let's try with the next slice
         }
 
--- a/libswscale/yuv2rgb_altivec.c	Thu Jan 17 08:12:23 2008 +0000
+++ b/libswscale/yuv2rgb_altivec.c	Thu Jan 17 08:57:15 2008 +0000
@@ -762,7 +762,7 @@
         vector signed short vec;
     } buf;
 
-    buf.tmp[0] =  ( (0xffffLL) * contrast>>8 )>>9;                      //cy
+    buf.tmp[0] =  ((0xffffLL) * contrast>>8)>>9;                        //cy
     buf.tmp[1] =  -256*brightness;                                      //oy
     buf.tmp[2] =  (inv_table[0]>>3) *(contrast>>16)*(saturation>>16);   //crv
     buf.tmp[3] =  (inv_table[1]>>3) *(contrast>>16)*(saturation>>16);   //cbu