Commit c1ef2bd6 authored by diego's avatar diego

cosmetics attack, part III: Remove all tabs and prettyprint/reindent the code.


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@23175 b3059339-0415-0410-9bf9-f77b7e298cf2
parent f7a488fc
...@@ -258,11 +258,11 @@ static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSlic ...@@ -258,11 +258,11 @@ static int func_name(SwsContext *c, uint8_t* src[], int srcStride[], int srcSlic
int srcSliceH, uint8_t* dst[], int dstStride[]){\ int srcSliceH, uint8_t* dst[], int dstStride[]){\
int y;\ int y;\
\ \
if(c->srcFormat == PIX_FMT_YUV422P){\ if (c->srcFormat == PIX_FMT_YUV422P){\
srcStride[1] *= 2;\ srcStride[1] *= 2;\
srcStride[2] *= 2;\ srcStride[2] *= 2;\
}\ }\
for(y=0; y<srcSliceH; y+=2){\ for (y=0; y<srcSliceH; y+=2){\
dst_type *dst_1= (dst_type*)(dst[0] + (y+srcSliceY )*dstStride[0]);\ dst_type *dst_1= (dst_type*)(dst[0] + (y+srcSliceY )*dstStride[0]);\
dst_type *dst_2= (dst_type*)(dst[0] + (y+srcSliceY+1)*dstStride[0]);\ dst_type *dst_2= (dst_type*)(dst[0] + (y+srcSliceY+1)*dstStride[0]);\
dst_type attribute_unused *r, *b;\ dst_type attribute_unused *r, *b;\
...@@ -426,14 +426,14 @@ PROLOG(yuv2rgb_c_4, uint8_t) ...@@ -426,14 +426,14 @@ PROLOG(yuv2rgb_c_4, uint8_t)
Y = py_1[2*i]; \ Y = py_1[2*i]; \
acc = r[Y] + g[Y] + b[Y]; \ acc = r[Y] + g[Y] + b[Y]; \
Y = py_1[2*i+1]; \ Y = py_1[2*i+1]; \
acc |= (r[Y] + g[Y] + b[Y])<<4;\ acc |= (r[Y] + g[Y] + b[Y])<<4; \
dst_1[i] = acc; dst_1[i] = acc;
#define DST2_4(i) \ #define DST2_4(i) \
Y = py_2[2*i]; \ Y = py_2[2*i]; \
acc = r[Y] + g[Y] + b[Y]; \ acc = r[Y] + g[Y] + b[Y]; \
Y = py_2[2*i+1]; \ Y = py_2[2*i+1]; \
acc |= (r[Y] + g[Y] + b[Y])<<4;\ acc |= (r[Y] + g[Y] + b[Y])<<4; \
dst_2[i] = acc; dst_2[i] = acc;
RGB(0); RGB(0);
...@@ -462,14 +462,14 @@ PROLOG(yuv2rgb_c_4_ordered_dither, uint8_t) ...@@ -462,14 +462,14 @@ PROLOG(yuv2rgb_c_4_ordered_dither, uint8_t)
Y = py_1[2*i]; \ Y = py_1[2*i]; \
acc = r[Y+d128[0+o]] + g[Y+d64[0+o]] + b[Y+d128[0+o]]; \ acc = r[Y+d128[0+o]] + g[Y+d64[0+o]] + b[Y+d128[0+o]]; \
Y = py_1[2*i+1]; \ Y = py_1[2*i+1]; \
acc |= (r[Y+d128[1+o]] + g[Y+d64[1+o]] + b[Y+d128[1+o]])<<4;\ acc |= (r[Y+d128[1+o]] + g[Y+d64[1+o]] + b[Y+d128[1+o]])<<4; \
dst_1[i]= acc; dst_1[i]= acc;
#define DST2bpp4(i,o) \ #define DST2bpp4(i,o) \
Y = py_2[2*i]; \ Y = py_2[2*i]; \
acc = r[Y+d128[8+o]] + g[Y+d64[8+o]] + b[Y+d128[8+o]]; \ acc = r[Y+d128[8+o]] + g[Y+d64[8+o]] + b[Y+d128[8+o]]; \
Y = py_2[2*i+1]; \ Y = py_2[2*i+1]; \
acc |= (r[Y+d128[9+o]] + g[Y+d64[9+o]] + b[Y+d128[9+o]])<<4;\ acc |= (r[Y+d128[9+o]] + g[Y+d64[9+o]] + b[Y+d128[9+o]])<<4; \
dst_2[i]= acc; dst_2[i]= acc;
...@@ -580,7 +580,7 @@ EPILOG(1) ...@@ -580,7 +580,7 @@ EPILOG(1)
SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
{ {
#if defined(HAVE_MMX2) || defined(HAVE_MMX) #if defined(HAVE_MMX2) || defined(HAVE_MMX)
if(c->flags & SWS_CPU_CAPS_MMX2){ if (c->flags & SWS_CPU_CAPS_MMX2){
switch(c->dstFormat){ switch(c->dstFormat){
case PIX_FMT_RGB32: return yuv420_rgb32_MMX2; case PIX_FMT_RGB32: return yuv420_rgb32_MMX2;
case PIX_FMT_BGR24: return yuv420_rgb24_MMX2; case PIX_FMT_BGR24: return yuv420_rgb24_MMX2;
...@@ -588,7 +588,7 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) ...@@ -588,7 +588,7 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
case PIX_FMT_BGR555: return yuv420_rgb15_MMX2; case PIX_FMT_BGR555: return yuv420_rgb15_MMX2;
} }
} }
if(c->flags & SWS_CPU_CAPS_MMX){ if (c->flags & SWS_CPU_CAPS_MMX){
switch(c->dstFormat){ switch(c->dstFormat){
case PIX_FMT_RGB32: return yuv420_rgb32_MMX; case PIX_FMT_RGB32: return yuv420_rgb32_MMX;
case PIX_FMT_BGR24: return yuv420_rgb24_MMX; case PIX_FMT_BGR24: return yuv420_rgb24_MMX;
...@@ -600,14 +600,14 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) ...@@ -600,14 +600,14 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
#ifdef HAVE_MLIB #ifdef HAVE_MLIB
{ {
SwsFunc t= yuv2rgb_init_mlib(c); SwsFunc t= yuv2rgb_init_mlib(c);
if(t) return t; if (t) return t;
} }
#endif #endif
#ifdef HAVE_ALTIVEC #ifdef HAVE_ALTIVEC
if (c->flags & SWS_CPU_CAPS_ALTIVEC) if (c->flags & SWS_CPU_CAPS_ALTIVEC)
{ {
SwsFunc t = yuv2rgb_init_altivec(c); SwsFunc t = yuv2rgb_init_altivec(c);
if(t) return t; if (t) return t;
} }
#endif #endif
...@@ -667,7 +667,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange, ...@@ -667,7 +667,7 @@ int yuv2rgb_c_init_tables (SwsContext *c, const int inv_table[4], int fullRange,
int64_t oy = 0; int64_t oy = 0;
//printf("%lld %lld %lld %lld %lld\n", cy, crv, cbu, cgu, cgv); //printf("%lld %lld %lld %lld %lld\n", cy, crv, cbu, cgu, cgv);
if(!fullRange){ if (!fullRange){
cy= (cy*255) / 219; cy= (cy*255) / 219;
oy= 16<<16; oy= 16<<16;
}else{ }else{
......
...@@ -151,8 +151,8 @@ const vector unsigned char ...@@ -151,8 +151,8 @@ const vector unsigned char
do { \ do { \
typeof(x0) o0,o2,o3; \ typeof(x0) o0,o2,o3; \
o0 = vec_mergeh (x0,x1); \ o0 = vec_mergeh (x0,x1); \
y0 = vec_perm (o0, x2, perm_rgb_0);\ y0 = vec_perm (o0, x2, perm_rgb_0); \
o2 = vec_perm (o0, x2, perm_rgb_1);\ o2 = vec_perm (o0, x2, perm_rgb_1); \
o3 = vec_mergel (x0,x1); \ o3 = vec_mergel (x0,x1); \
y1 = vec_perm (o3,o2,perm_rgb_2); \ y1 = vec_perm (o3,o2,perm_rgb_2); \
y2 = vec_perm (o3,o2,perm_rgb_3); \ y2 = vec_perm (o3,o2,perm_rgb_3); \
...@@ -228,7 +228,7 @@ do { \ ...@@ -228,7 +228,7 @@ do { \
#define vec_clip_s16(x) \ #define vec_clip_s16(x) \
vec_max (vec_min (x, (vector signed short)AVV(235,235,235,235,235,235,235,235)),\ vec_max (vec_min (x, (vector signed short)AVV(235,235,235,235,235,235,235,235)),\
(vector signed short)AVV(16, 16, 16, 16, 16, 16, 16, 16 )) (vector signed short)AVV( 16, 16, 16, 16, 16, 16, 16, 16))
#define vec_packclp(x,y) \ #define vec_packclp(x,y) \
(vector unsigned char)vec_packs \ (vector unsigned char)vec_packs \
...@@ -337,23 +337,27 @@ static int altivec_##name (SwsContext *c, \ ...@@ -337,23 +337,27 @@ static int altivec_##name (SwsContext *c, \
vivP = (vector unsigned char *)vi; \ vivP = (vector unsigned char *)vi; \
\ \
align_perm = vec_lvsl (0, y1i); \ align_perm = vec_lvsl (0, y1i); \
y0 = (vector unsigned char)vec_perm (y1ivP[0], y1ivP[1], align_perm);\ y0 = (vector unsigned char) \
vec_perm (y1ivP[0], y1ivP[1], align_perm); \
\ \
align_perm = vec_lvsl (0, y2i); \ align_perm = vec_lvsl (0, y2i); \
y1 = (vector unsigned char)vec_perm (y2ivP[0], y2ivP[1], align_perm);\ y1 = (vector unsigned char) \
vec_perm (y2ivP[0], y2ivP[1], align_perm); \
\ \
align_perm = vec_lvsl (0, ui); \ align_perm = vec_lvsl (0, ui); \
u = (vector signed char)vec_perm (uivP[0], uivP[1], align_perm); \ u = (vector signed char) \
vec_perm (uivP[0], uivP[1], align_perm); \
\ \
align_perm = vec_lvsl (0, vi); \ align_perm = vec_lvsl (0, vi); \
v = (vector signed char)vec_perm (vivP[0], vivP[1], align_perm); \ v = (vector signed char) \
vec_perm (vivP[0], vivP[1], align_perm); \
\ \
u = (vector signed char) \ u = (vector signed char) \
vec_sub (u,(vector signed char) \ vec_sub (u,(vector signed char) \
vec_splat((vector signed char)AVV(128),0));\ vec_splat((vector signed char)AVV(128),0)); \
v = (vector signed char) \ v = (vector signed char) \
vec_sub (v,(vector signed char) \ vec_sub (v,(vector signed char) \
vec_splat((vector signed char)AVV(128),0));\ vec_splat((vector signed char)AVV(128),0)); \
\ \
U = vec_unpackh (u); \ U = vec_unpackh (u); \
V = vec_unpackh (v); \ V = vec_unpackh (v); \
...@@ -746,8 +750,8 @@ SwsFunc yuv2rgb_init_altivec (SwsContext *c) ...@@ -746,8 +750,8 @@ SwsFunc yuv2rgb_init_altivec (SwsContext *c)
static uint16_t roundToInt16(int64_t f){ static uint16_t roundToInt16(int64_t f){
int r= (f + (1<<15))>>16; int r= (f + (1<<15))>>16;
if(r<-0x7FFF) return 0x8000; if (r<-0x7FFF) return 0x8000;
else if(r> 0x7FFF) return 0x7FFF; else if (r> 0x7FFF) return 0x7FFF;
else return r; else return r;
} }
...@@ -774,13 +778,13 @@ void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brig ...@@ -774,13 +778,13 @@ void yuv2rgb_altivec_init_tables (SwsContext *c, const int inv_table[4],int brig
c->CGU = vec_splat ((vector signed short)buf.vec, 4); c->CGU = vec_splat ((vector signed short)buf.vec, 4);
c->CGV = vec_splat ((vector signed short)buf.vec, 5); c->CGV = vec_splat ((vector signed short)buf.vec, 5);
#if 0 #if 0
{ {
int i; int i;
char *v[6]={"cy","oy","crv","cbu","cgu","cgv"}; char *v[6]={"cy","oy","crv","cbu","cgu","cgv"};
for (i=0; i<6;i++) for (i=0; i<6; i++)
printf("%s %d ", v[i],buf.tmp[i] ); printf("%s %d ", v[i],buf.tmp[i] );
printf("\n"); printf("\n");
} }
#endif #endif
return; return;
} }
...@@ -810,11 +814,11 @@ altivec_yuv2packedX (SwsContext *c, ...@@ -810,11 +814,11 @@ altivec_yuv2packedX (SwsContext *c,
out = (vector unsigned char *)dest; out = (vector unsigned char *)dest;
for(i=0; i<dstW; i+=16){ for (i=0; i<dstW; i+=16){
Y0 = RND; Y0 = RND;
Y1 = RND; Y1 = RND;
/* extract 16 coeffs from lumSrc */ /* extract 16 coeffs from lumSrc */
for(j=0; j<lumFilterSize; j++) { for (j=0; j<lumFilterSize; j++) {
X0 = vec_ld (0, &lumSrc[j][i]); X0 = vec_ld (0, &lumSrc[j][i]);
X1 = vec_ld (16, &lumSrc[j][i]); X1 = vec_ld (16, &lumSrc[j][i]);
Y0 = vec_mradds (X0, YCoeffs[j], Y0); Y0 = vec_mradds (X0, YCoeffs[j], Y0);
...@@ -824,7 +828,7 @@ altivec_yuv2packedX (SwsContext *c, ...@@ -824,7 +828,7 @@ altivec_yuv2packedX (SwsContext *c,
U = RND; U = RND;
V = RND; V = RND;
/* extract 8 coeffs from U,V */ /* extract 8 coeffs from U,V */
for(j=0; j<chrFilterSize; j++) { for (j=0; j<chrFilterSize; j++) {
X = vec_ld (0, &chrSrc[j][i/2]); X = vec_ld (0, &chrSrc[j][i/2]);
U = vec_mradds (X, CCoeffs[j], U); U = vec_mradds (X, CCoeffs[j], U);
X = vec_ld (0, &chrSrc[j][i/2+2048]); X = vec_ld (0, &chrSrc[j][i/2+2048]);
...@@ -876,7 +880,7 @@ altivec_yuv2packedX (SwsContext *c, ...@@ -876,7 +880,7 @@ altivec_yuv2packedX (SwsContext *c,
/* If this is reached, the caller should have called yuv2packedXinC /* If this is reached, the caller should have called yuv2packedXinC
instead. */ instead. */
static int printed_error_message; static int printed_error_message;
if(!printed_error_message) { if (!printed_error_message) {
av_log(c, AV_LOG_ERROR, "altivec_yuv2packedX doesn't support %s output\n", av_log(c, AV_LOG_ERROR, "altivec_yuv2packedX doesn't support %s output\n",
sws_format_name(c->dstFormat)); sws_format_name(c->dstFormat));
printed_error_message=1; printed_error_message=1;
...@@ -892,7 +896,7 @@ altivec_yuv2packedX (SwsContext *c, ...@@ -892,7 +896,7 @@ altivec_yuv2packedX (SwsContext *c,
Y0 = RND; Y0 = RND;
Y1 = RND; Y1 = RND;
/* extract 16 coeffs from lumSrc */ /* extract 16 coeffs from lumSrc */
for(j=0; j<lumFilterSize; j++) { for (j=0; j<lumFilterSize; j++) {
X0 = vec_ld (0, &lumSrc[j][i]); X0 = vec_ld (0, &lumSrc[j][i]);
X1 = vec_ld (16, &lumSrc[j][i]); X1 = vec_ld (16, &lumSrc[j][i]);
Y0 = vec_mradds (X0, YCoeffs[j], Y0); Y0 = vec_mradds (X0, YCoeffs[j], Y0);
...@@ -902,7 +906,7 @@ altivec_yuv2packedX (SwsContext *c, ...@@ -902,7 +906,7 @@ altivec_yuv2packedX (SwsContext *c,
U = RND; U = RND;
V = RND; V = RND;
/* extract 8 coeffs from U,V */ /* extract 8 coeffs from U,V */
for(j=0; j<chrFilterSize; j++) { for (j=0; j<chrFilterSize; j++) {
X = vec_ld (0, &chrSrc[j][i/2]); X = vec_ld (0, &chrSrc[j][i/2]);
U = vec_mradds (X, CCoeffs[j], U); U = vec_mradds (X, CCoeffs[j], U);
X = vec_ld (0, &chrSrc[j][i/2+2048]); X = vec_ld (0, &chrSrc[j][i/2+2048]);
...@@ -922,7 +926,7 @@ altivec_yuv2packedX (SwsContext *c, ...@@ -922,7 +926,7 @@ altivec_yuv2packedX (SwsContext *c,
/* now we have /* now we have
Y0= y0 y1 y2 y3 y4 y5 y6 y7 Y1= y8 y9 y10 y11 y12 y13 y14 y15 Y0= y0 y1 y2 y3 y4 y5 y6 y7 Y1= y8 y9 y10 y11 y12 y13 y14 y15
U= u0 u1 u2 u3 u4 u5 u6 u7 V= v0 v1 v2 v3 v4 v5 v6 v7 U = u0 u1 u2 u3 u4 u5 u6 u7 V = v0 v1 v2 v3 v4 v5 v6 v7
Y0= y0 y1 y2 y3 y4 y5 y6 y7 Y1= y8 y9 y10 y11 y12 y13 y14 y15 Y0= y0 y1 y2 y3 y4 y5 y6 y7 Y1= y8 y9 y10 y11 y12 y13 y14 y15
U0= u0 u0 u1 u1 u2 u2 u3 u3 U1= u4 u4 u5 u5 u6 u6 u7 u7 U0= u0 u0 u1 u1 u2 u2 u3 u3 U1= u4 u4 u5 u5 u6 u6 u7 u7
......
...@@ -135,8 +135,8 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -135,8 +135,8 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
if(h_size*2 > FFABS(dstStride[0])) h_size-=8; if(h_size*2 > FFABS(dstStride[0])) h_size-=8;
__asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ ); __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ );
//printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0],
//srcStride[0],srcStride[1],srcStride[2],dstStride[0]); //srcStride[0],srcStride[1],srcStride[2],dstStride[0]);
for (y= 0; y<srcSliceH; y++ ) { for (y= 0; y<srcSliceH; y++ ) {
uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0]; uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
uint8_t *_py = src[0] + y*srcStride[0]; uint8_t *_py = src[0] + y*srcStride[0];
...@@ -155,14 +155,14 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -155,14 +155,14 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
"movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ "movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
// ".balign 16 \n\t" //".balign 16 \n\t"
"1: \n\t" "1: \n\t"
/* no speed diference on my p3@500 with prefetch, /* no speed diference on my p3@500 with prefetch,
* if it is faster for anyone with -benchmark then tell me * if it is faster for anyone with -benchmark then tell me
PREFETCH" 64(%0) \n\t" PREFETCH" 64(%0) \n\t"
PREFETCH" 64(%1) \n\t" PREFETCH" 64(%1) \n\t"
PREFETCH" 64(%2) \n\t" PREFETCH" 64(%2) \n\t"
*/ */
YUV2RGB YUV2RGB
#ifdef DITHER1XBPP #ifdef DITHER1XBPP
...@@ -175,7 +175,7 @@ YUV2RGB ...@@ -175,7 +175,7 @@ YUV2RGB
"pand "MANGLE(mmx_grnmask)", %%mm2;" /* g7g6g5g4 g3g2_0_0 g7g6g5g4 g3g2_0_0 */ "pand "MANGLE(mmx_grnmask)", %%mm2;" /* g7g6g5g4 g3g2_0_0 g7g6g5g4 g3g2_0_0 */
"pand "MANGLE(mmx_redmask)", %%mm1;" /* r7r6r5r4 r3_0_0_0 r7r6r5r4 r3_0_0_0 */ "pand "MANGLE(mmx_redmask)", %%mm1;" /* r7r6r5r4 r3_0_0_0 r7r6r5r4 r3_0_0_0 */
"psrlw $3,%%mm0;" /* 0_0_0_b7 b6b5b4b3 0_0_0_b7 b6b5b4b3 */ "psrlw $3, %%mm0;" /* 0_0_0_b7 b6b5b4b3 0_0_0_b7 b6b5b4b3 */
"pxor %%mm4, %%mm4;" /* zero mm4 */ "pxor %%mm4, %%mm4;" /* zero mm4 */
"movq %%mm0, %%mm5;" /* Copy B7-B0 */ "movq %%mm0, %%mm5;" /* Copy B7-B0 */
...@@ -230,8 +230,8 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -230,8 +230,8 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
if(h_size*2 > FFABS(dstStride[0])) h_size-=8; if(h_size*2 > FFABS(dstStride[0])) h_size-=8;
__asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ ); __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ );
//printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0],
//srcStride[0],srcStride[1],srcStride[2],dstStride[0]); //srcStride[0],srcStride[1],srcStride[2],dstStride[0]);
for (y= 0; y<srcSliceH; y++ ) { for (y= 0; y<srcSliceH; y++ ) {
uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0]; uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
uint8_t *_py = src[0] + y*srcStride[0]; uint8_t *_py = src[0] + y*srcStride[0];
...@@ -250,7 +250,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -250,7 +250,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
"movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ "movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
// ".balign 16 \n\t" //".balign 16 \n\t"
"1: \n\t" "1: \n\t"
YUV2RGB YUV2RGB
...@@ -265,8 +265,8 @@ YUV2RGB ...@@ -265,8 +265,8 @@ YUV2RGB
"pand "MANGLE(mmx_redmask)", %%mm2;" /* g7g6g5g4 g3_0_0_0 g7g6g5g4 g3_0_0_0 */ "pand "MANGLE(mmx_redmask)", %%mm2;" /* g7g6g5g4 g3_0_0_0 g7g6g5g4 g3_0_0_0 */
"pand "MANGLE(mmx_redmask)", %%mm1;" /* r7r6r5r4 r3_0_0_0 r7r6r5r4 r3_0_0_0 */ "pand "MANGLE(mmx_redmask)", %%mm1;" /* r7r6r5r4 r3_0_0_0 r7r6r5r4 r3_0_0_0 */
"psrlw $3,%%mm0;" /* 0_0_0_b7 b6b5b4b3 0_0_0_b7 b6b5b4b3 */ "psrlw $3, %%mm0;" /* 0_0_0_b7 b6b5b4b3 0_0_0_b7 b6b5b4b3 */
"psrlw $1,%%mm1;" /* 0_r7r6r5 r4r3_0_0 0_r7r6r5 r4r3_0_0 */ "psrlw $1, %%mm1;" /* 0_r7r6r5 r4r3_0_0 0_r7r6r5 r4r3_0_0 */
"pxor %%mm4, %%mm4;" /* zero mm4 */ "pxor %%mm4, %%mm4;" /* zero mm4 */
"movq %%mm0, %%mm5;" /* Copy B7-B0 */ "movq %%mm0, %%mm5;" /* Copy B7-B0 */
...@@ -334,7 +334,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -334,7 +334,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
"movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ "movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
// ".balign 16 \n\t" //".balign 16 \n\t"
"1: \n\t" "1: \n\t"
YUV2RGB YUV2RGB
/* mm0=B, %%mm2=G, %%mm1=R */ /* mm0=B, %%mm2=G, %%mm1=R */
...@@ -480,7 +480,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -480,7 +480,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
"movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
"movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
"movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */ "movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
// ".balign 16 \n\t" //".balign 16 \n\t"
"1: \n\t" "1: \n\t"
YUV2RGB YUV2RGB
/* convert RGB plane to RGB packed format, /* convert RGB plane to RGB packed format,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment