From 715a00f8c042362c9387564a03e954901d33959a Mon Sep 17 00:00:00 2001 From: Couriersud Date: Sun, 14 Feb 2010 14:01:40 +0000 Subject: [PATCH] - Remove stray undef - Rename inlined func CLSH to clamp --- src/osd/sdl/texcopy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/osd/sdl/texcopy.c b/src/osd/sdl/texcopy.c index bcaf0b21dfb..481595c8374 100644 --- a/src/osd/sdl/texcopy.c +++ b/src/osd/sdl/texcopy.c @@ -68,7 +68,7 @@ static void init_clamp(void) } } -INLINE int CLSH(int x) { return (const int) clamp[(x >> 8) + 128] ; } +INLINE int clamp(int x) { return (const int) clamp[(x >> 8) + 128] ; } INLINE UINT32 ycc_to_rgb(unsigned y, unsigned cb, unsigned cr) { @@ -78,7 +78,7 @@ INLINE UINT32 ycc_to_rgb(unsigned y, unsigned cb, unsigned cr) r = (const int) coff_cr[cr][0]; // 409 * cr - 56992; g = (const int) coff_cb[cb][0] + (const int) coff_cr[cr][1]; //- 100 * cb - 208 * cr + 34784; b = (const int) coff_cb[cb][1]; //+ 516 * cb - 70688; - return 0xff000000 | (CLSH(r + common)<<16) | (CLSH(g + common)<<8) | (CLSH(b + common)); + return 0xff000000 | (clamp(r + common)<<16) | (clamp(g + common)<<8) | (clamp(b + common)); } #endif @@ -212,8 +212,8 @@ static void texcopy_yuv16_paletted(texture_info *texture, const render_texinfo * int y2 = (const int) lookup[(srcpix1 >> 8)]; - *dst++ = 0xff000000 | (CLSH(r + y1)<<16) | (CLSH(g + y1)<<8) | (CLSH(b + y1)); - *dst++ = 0xff000000 | (CLSH(r + y2)<<16) | (CLSH(g + y2)<<8) | (CLSH(b + y2)); + *dst++ = 0xff000000 | (clamp(r + y1)<<16) | (clamp(g + y1)<<8) | (clamp(b + y1)); + *dst++ = 0xff000000 | (clamp(r + y2)<<16) | (clamp(g + y2)<<8) | (clamp(b + y2)); #endif } @@ -224,7 +224,6 @@ static void texcopy_yuv16_paletted(texture_info *texture, const render_texinfo * #endif } } -#undef CLSH #endif