[MPlayer-cvslog] r25777 - in trunk/libswscale: rgb2rgb_template.c swscale-example.c swscale.c swscale_altivec_template.c swscale_template.c yuv2rgb_altivec.c
benoit
subversion at mplayerhq.hu
Thu Jan 17 09:57:15 CET 2008
Author: benoit
Date: Thu Jan 17 09:57:15 2008
New Revision: 25777
Log:
Remove non cosmetic spaces inside parentheses.
Modified:
trunk/libswscale/rgb2rgb_template.c
trunk/libswscale/swscale-example.c
trunk/libswscale/swscale.c
trunk/libswscale/swscale_altivec_template.c
trunk/libswscale/swscale_template.c
trunk/libswscale/yuv2rgb_altivec.c
Modified: trunk/libswscale/rgb2rgb_template.c
==============================================================================
--- trunk/libswscale/rgb2rgb_template.c (original)
+++ trunk/libswscale/rgb2rgb_template.c Thu Jan 17 09:57:15 2008
@@ -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 @@ static inline void RENAME(yuvPlanartouyv
}
#endif
#endif
- if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1) )
+ if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1))
{
usrc += chromStride;
vsrc += chromStride;
Modified: trunk/libswscale/swscale-example.c
==============================================================================
--- trunk/libswscale/swscale-example.c (original)
+++ trunk/libswscale/swscale-example.c Thu Jan 17 09:57:15 2008
@@ -217,13 +217,13 @@ int main(int argc, char **argv){
#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;
}
Modified: trunk/libswscale/swscale.c
==============================================================================
--- trunk/libswscale/swscale.c (original)
+++ trunk/libswscale/swscale.c Thu Jan 17 09:57:15 2008
@@ -1597,9 +1597,9 @@ static int PlanarToNV12Wrapper(SwsContex
}
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 @@ static int PlanarToYuy2Wrapper(SwsContex
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 @@ static int PlanarToUyvyWrapper(SwsContex
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 @@ SwsContext *sws_getContext(int srcW, int
}
#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 @@ SwsContext *sws_getContext(int srcW, int
/* simple copy */
if ( srcFormat == dstFormat
|| (isPlanarYUV(srcFormat) && isGray(dstFormat))
- || (isPlanarYUV(dstFormat) && isGray(srcFormat)) )
+ || (isPlanarYUV(dstFormat) && isGray(srcFormat)))
{
c->swScale= simpleCopy;
}
@@ -2373,7 +2373,7 @@ SwsContext *sws_getContext(int srcW, int
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 @@ SwsVector *sws_getGaussianVec(double var
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);
Modified: trunk/libswscale/swscale_altivec_template.c
==============================================================================
--- trunk/libswscale/swscale_altivec_template.c (original)
+++ trunk/libswscale/swscale_altivec_template.c Thu Jan 17 09:57:15 2008
@@ -387,7 +387,7 @@ static inline void hScale_altivec_real(i
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 @@ static inline int yv12toyuy2_unscaled_al
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 @@ static inline int yv12toyuy2_unscaled_al
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 yv12toyuy2_unscaled_al
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 @@ static inline int yv12touyvy_unscaled_al
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 @@ static inline int yv12touyvy_unscaled_al
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;
}
Modified: trunk/libswscale/swscale_template.c
==============================================================================
--- trunk/libswscale/swscale_template.c (original)
+++ trunk/libswscale/swscale_template.c Thu Jan 17 09:57:15 2008
@@ -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 @@ static inline void RENAME(yuv2packed1)(S
}
#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 @@ static inline void RENAME(yuv2packed1)(S
}
}
#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 @@ static inline void RENAME(bgr32ToY)(uint
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 @@ static inline void RENAME(bgr24ToY)(uint
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 @@ static inline void RENAME(rgb32ToY)(uint
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 @@ static inline void RENAME(rgb24ToY)(uint
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 @@ FUNNY_UV_CODE
/* 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 @@ static int RENAME(swScale)(SwsContext *c
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 @@ static int RENAME(swScale)(SwsContext *c
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
}
Modified: trunk/libswscale/yuv2rgb_altivec.c
==============================================================================
--- trunk/libswscale/yuv2rgb_altivec.c (original)
+++ trunk/libswscale/yuv2rgb_altivec.c Thu Jan 17 09:57:15 2008
@@ -762,7 +762,7 @@ void yuv2rgb_altivec_init_tables (SwsCon
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
More information about the MPlayer-cvslog
mailing list