diff options
author | Diego Pettenò <flameeyes@gmail.com> | 2008-10-16 13:34:30 +0000 |
---|---|---|
committer | Diego Pettenò <flameeyes@gmail.com> | 2008-10-16 13:34:30 +0000 |
commit | 7ad6469eae0fc7bf1f2462436e900389ba6dd406 (patch) | |
tree | c32b92b9c7ca09e3ca465824a189ef55b4ce2e24 /libswscale/yuv2rgb_template.c | |
parent | be449fca79a3b0394143f0a77c99784e65868d9f (diff) | |
download | ffmpeg-7ad6469eae0fc7bf1f2462436e900389ba6dd406.tar.gz |
Convert asm keyword into __asm__.
Neither the asm() nor the __asm__() keyword is not part of the C99
standard, but while GCC accepts the former in C89 syntax, it is not
accepted in C99 unless GNU extensions are turned on (with -fasm). The
latter form is accepted in any syntax as an extension (without
requiring further command-line options).
Sun Studio C99 compiler also does not accept asm() while accepting
__asm__(), albeit reporting warnings that it's not valid C99 synta.
Originally committed as revision 27778 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/yuv2rgb_template.c')
-rw-r--r-- | libswscale/yuv2rgb_template.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c index b71c918f2a..c9a75ece9f 100644 --- a/libswscale/yuv2rgb_template.c +++ b/libswscale/yuv2rgb_template.c @@ -133,7 +133,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; 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)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //srcStride[0],srcStride[1],srcStride[2],dstStride[0]); for (y= 0; y<srcSliceH; y++ ) { @@ -148,7 +148,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr c->redDither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ - asm volatile ( + __asm__ volatile ( /* load data for start of next scan line */ "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 */ @@ -210,7 +210,7 @@ YUV2RGB ); } - asm volatile (EMMS); + __asm__ volatile (EMMS); return srcSliceH; } @@ -227,7 +227,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; 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)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //srcStride[0],srcStride[1],srcStride[2],dstStride[0]); for (y= 0; y<srcSliceH; y++ ) { @@ -242,7 +242,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr c->redDither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ - asm volatile ( + __asm__ volatile ( /* load data for start of next scan line */ "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 */ @@ -299,7 +299,7 @@ YUV2RGB ); } - asm volatile (EMMS); + __asm__ volatile (EMMS); return srcSliceH; } @@ -315,7 +315,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; if(h_size*3 > FFABS(dstStride[0])) h_size-=8; - asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); + __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); for (y= 0; y<srcSliceH; y++ ) { uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0]; @@ -326,7 +326,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ - asm volatile ( + __asm__ volatile ( /* load data for start of next scan line */ "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 */ @@ -445,7 +445,7 @@ YUV2RGB ); } - asm volatile (EMMS); + __asm__ volatile (EMMS); return srcSliceH; } @@ -461,7 +461,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; if(h_size*4 > FFABS(dstStride[0])) h_size-=8; - asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); + __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); for (y= 0; y<srcSliceH; y++ ) { uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0]; @@ -472,7 +472,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ - asm volatile ( + __asm__ volatile ( /* load data for start of next scan line */ "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 */ @@ -531,6 +531,6 @@ YUV2RGB ); } - asm volatile (EMMS); + __asm__ volatile (EMMS); return srcSliceH; } |