diff options
-rw-r--r-- | libswscale/rgb2rgb_template.c | 4 | ||||
-rw-r--r-- | libswscale/swscale-example.c | 4 | ||||
-rw-r--r-- | libswscale/swscale.c | 16 | ||||
-rw-r--r-- | libswscale/swscale_altivec_template.c | 12 | ||||
-rw-r--r-- | libswscale/swscale_template.c | 24 | ||||
-rw-r--r-- | libswscale/yuv2rgb_altivec.c | 2 |
6 files changed, 31 insertions, 31 deletions
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 5daf089..7d3dbdb 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -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(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u } #endif #endif - if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1) ) + if ((y&(vertLumPerChroma-1))==(vertLumPerChroma-1)) { usrc += chromStride; vsrc += chromStride; diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c index f9eefda..adfe7bc 100644 --- a/libswscale/swscale-example.c +++ b/libswscale/swscale-example.c @@ -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; } diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 3ef30c2..6ed0b06 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1597,9 +1597,9 @@ static int PlanarToNV12Wrapper(SwsContext *c, uint8_t* src[], int srcStride[], i } 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(SwsContext *c, uint8_t* src[], int srcStride[], i 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(SwsContext *c, uint8_t* src[], int srcStride[], i 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 srcH, int srcFormat, int dstW, int dstH } #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 srcH, int srcFormat, int dstW, int dstH /* 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 srcH, int srcFormat, int dstW, int dstH 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 variance, double quality){ 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); diff --git a/libswscale/swscale_altivec_template.c b/libswscale/swscale_altivec_template.c index 794533d..493f08b 100644 --- a/libswscale/swscale_altivec_template.c +++ b/libswscale/swscale_altivec_template.c @@ -387,7 +387,7 @@ static inline void hScale_altivec_real(int16_t *dst, int dstW, uint8_t *src, int 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_altivec(SwsContext *c, uint8_t* src[], int 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_altivec(SwsContext *c, uint8_t* src[], int 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_altivec(SwsContext *c, uint8_t* src[], int 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_altivec(SwsContext *c, uint8_t* src[], int 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_altivec(SwsContext *c, uint8_t* src[], int 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; } diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index b159830..526dd6e 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -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)(SwsContext *c, uint16_t *buf0, uint16_t * } #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)(SwsContext *c, uint16_t *buf0, uint16_t * } } #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)(uint8_t *dst, uint8_t *src, int width) 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)(uint8_t *dst, uint8_t *src, long width) 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)(uint8_t *dst, uint8_t *src, int width) 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)(uint8_t *dst, uint8_t *src, int width) 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, uint8_t* src[], int srcStride[], int s 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, uint8_t* src[], int srcStride[], int s 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 } diff --git a/libswscale/yuv2rgb_altivec.c b/libswscale/yuv2rgb_altivec.c index ccb3c73..ebc9a64 100644 --- a/libswscale/yuv2rgb_altivec.c +++ b/libswscale/yuv2rgb_altivec.c @@ -762,7 +762,7 @@ void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brig 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 |