@@ -285,7 +285,7 @@ void spoutCopy::ClearAlpha(unsigned char* src, unsigned int width, unsigned int
285285// ---------------------------------------------------------
286286// Function: memcpy_sse2
287287// SSE2 version of memcpy
288- void spoutCopy::memcpy_sse2 (void * dst, const void * src, size_t Size) const
288+ SPOUT_TARGET_SSE2 void spoutCopy::memcpy_sse2 (void * dst, const void * src, size_t Size) const
289289{
290290
291291 if (!dst || !src)
@@ -479,8 +479,8 @@ void spoutCopy::rgba2bgra(const void* rgba_source, void* bgra_dest,
479479 return ;
480480
481481 if ((width % 16 ) == 0 ) { // 16 byte aligned width
482- if (m_bSSE2 && m_bSSSE3) // SSE3 available
483- rgba_bgra_sse3 (rgba_source, bgra_dest, width, height, bInvert);
482+ if (m_bSSE2 && m_bSSSE3) // SSSE3 available
483+ rgba_bgra_ssse3 (rgba_source, bgra_dest, width, height, bInvert);
484484 else if (m_bSSE2) // SSE2 available
485485 rgba_bgra_sse2 (rgba_source, bgra_dest, width, height, bInvert);
486486 }
@@ -525,8 +525,8 @@ void spoutCopy::rgba2bgra(const void *rgba_source, void *bgra_dest,
525525
526526 // Copy the line
527527 if ((width % 16 ) == 0 ) { // 16 byte aligned width
528- if (m_bSSE2 && m_bSSSE3) // SSE3 available
529- rgba_bgra_sse3 (source, dest, width, 1 ); // invert flag false
528+ if (m_bSSE2 && m_bSSSE3) // SSSE3 available
529+ rgba_bgra_ssse3 (source, dest, width, 1 ); // invert flag false
530530 else if (m_bSSE2) // SSE2 available
531531 rgba_bgra_sse2 (source, dest, width, 1 );
532532 }
@@ -570,8 +570,8 @@ void spoutCopy::rgba2bgra(const void* rgba_source, void* bgra_dest,
570570 }
571571 // Copy the line
572572 if ((width % 16 ) == 0 ) { // 16 byte aligned width
573- if (m_bSSE2 && m_bSSSE3) // SSE3 available
574- rgba_bgra_sse3 (source, dest, width, 1 ); // invert flag false
573+ if (m_bSSE2 && m_bSSSE3) // SSSE3 available
574+ rgba_bgra_ssse3 (source, dest, width, 1 ); // invert flag false
575575 else if (m_bSSE2) // SSE2 available
576576 rgba_bgra_sse2 (source, dest, width, 1 );
577577 }
@@ -610,8 +610,8 @@ void spoutCopy::rgba2rgb(const void* rgba_source, void* rgb_dest,
610610 return ;
611611
612612 //
613- // SSE3 copy
614- // No mirror option, image size 16 bit byte aligned, SSE3 intrinsics support
613+ // SSSE3 copy
614+ // No mirror option, image size 16 bit byte aligned, SSSE3 intrinsics support
615615 //
616616 // Timing tests show more than twice as fast
617617 // (Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz)
@@ -627,8 +627,8 @@ void spoutCopy::rgba2rgb(const void* rgba_source, void* rgb_dest,
627627 //
628628 unsigned int pitch = rgba_pitch;
629629 if (pitch == 0 ) pitch = width*4 ;
630- if (!bMirror && width >= 320 && (width % 16 ) == 0 && m_bSSE3 ) {
631- rgba_to_rgb_sse3 (rgba_source, rgb_dest, width, height, pitch, bInvert, bSwapRB);
630+ if (!bMirror && width >= 320 && (width % 16 ) == 0 && m_bSSSE3 ) {
631+ rgba_to_rgb_ssse3 (rgba_source, rgb_dest, width, height, pitch, bInvert, bSwapRB);
632632 return ;
633633 }
634634
@@ -929,7 +929,7 @@ void spoutCopy::rgb2bgra(const void *rgb_source, void *bgra_dest,
929929// Function: rgb_to_bgrx_sse
930930// Experimental pending testing
931931// Single line function
932- void spoutCopy::rgb_to_bgrx_sse (unsigned int npixels, const void * rgb_source, void * bgrx_dest) const
932+ SPOUT_TARGET_SSSE3 void spoutCopy::rgb_to_bgrx_sse (unsigned int npixels, const void * rgb_source, void * bgrx_dest) const
933933{
934934 const __m128i* in_vec = static_cast <const __m128i*>(rgb_source);
935935 __m128i* out_vec = static_cast <__m128i*>(bgrx_dest);
@@ -1003,7 +1003,7 @@ void spoutCopy::rgb_to_bgrx_sse(unsigned int npixels, const void* rgb_source, vo
10031003// Function: rgb_to_bgra_sse
10041004// Experimental pending testing
10051005// Full image height
1006- void spoutCopy::rgb_to_bgra_sse3 (
1006+ void spoutCopy::rgb_to_bgra_ssse3 (
10071007 void * rgb_source,
10081008 void * rgba_dest,
10091009 unsigned int width,
@@ -1023,16 +1023,16 @@ void spoutCopy::rgb_to_bgra_sse3 (
10231023 rgba += width*4 ;
10241024 }
10251025
1026- } // end rgb_to_bgra_sse3
1026+ } // end rgb_to_bgra_ssse3
10271027
10281028//
10291029// =====================================================================================
10301030
10311031
10321032// ---------------------------------------------------------
1033- // Function: rgba_to_rgb_sse3
1033+ // Function: rgba_to_rgb_ssse3
10341034//
1035- void spoutCopy::rgba_to_rgb_sse3 (const void * rgba_source, void * rgb_dest,
1035+ SPOUT_TARGET_SSSE3 void spoutCopy::rgba_to_rgb_ssse3 (const void * rgba_source, void * rgb_dest,
10361036 unsigned int width, unsigned int height, unsigned int rgba_pitch,
10371037 bool bInvert, bool bSwapRB) const
10381038{
@@ -1640,7 +1640,7 @@ void spoutCopy::rgba_bgra(const void* rgba_source, void* bgra_dest,
16401640//
16411641// All instructions SSE2.
16421642//
1643- void spoutCopy::rgba_bgra_sse2 (const void * rgba_source, void * bgra_dest, unsigned int width, unsigned int height, bool bInvert) const
1643+ SPOUT_TARGET_SSE2 void spoutCopy::rgba_bgra_sse2 (const void * rgba_source, void * bgra_dest, unsigned int width, unsigned int height, bool bInvert) const
16441644{
16451645
16461646 if (!rgba_source)
@@ -1702,13 +1702,13 @@ void spoutCopy::rgba_bgra_sse2(const void* rgba_source, void* bgra_dest, unsigne
17021702} // end rgba_bgra_sse2
17031703
17041704//
1705- // Adapted from a Gist snippet by Aurélien Vallée (NewbiZ) http://newbiz.github.io/
1705+ // Adapted from a Gist snippet by Aur�lien Vall�e (NewbiZ) http://newbiz.github.io/
17061706//
17071707// https://gist.github.com/NewbiZ/5541524
17081708//
17091709// Approximately 15% faster than SSE2 function
17101710//
1711- void spoutCopy::rgba_bgra_sse3 (const void * rgba_source, void * bgra_dest, unsigned int width, unsigned int height, bool bInvert) const
1711+ SPOUT_TARGET_SSSE3 void spoutCopy::rgba_bgra_ssse3 (const void * rgba_source, void * bgra_dest, unsigned int width, unsigned int height, bool bInvert) const
17121712{
17131713 // Shuffling mask (RGBA -> BGRA) x 4, in reverse byte order
17141714 static const __m128i m = _mm_set_epi8 (15 , 12 , 13 , 14 , 11 , 8 , 9 , 10 , 7 , 4 , 5 , 6 , 3 , 0 , 1 , 2 );
@@ -1757,11 +1757,11 @@ void spoutCopy::rgba_bgra_sse3(const void* rgba_source, void* bgra_dest, unsigne
17571757 }
17581758 }
17591759
1760- } // end rgba_bgra_sse3
1760+ } // end rgba_bgra_ssse3
17611761
17621762
17631763// Swap red and blue components in place
1764- void spoutCopy::rgba_swap_ssse3 (void * __restrict rgba_source, unsigned int width, unsigned int height)
1764+ SPOUT_TARGET_SSSE3 void spoutCopy::rgba_swap_ssse3 (void * __restrict rgba_source, unsigned int width, unsigned int height)
17651765{
17661766 // Shuffling mask (RGBA -> BGRA) x 4, in reverse byte order (requires SSSE3)
17671767 static const __m128i mask = _mm_set_epi8 (
0 commit comments