2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 /** @file sse3.h SSE3 blitter functions. */
10 #ifndef BLITTER_SSE3_H
11 #define BLITTER_SSE3_H
13 #include <tmmintrin.h>
17 /** SSE3 blitter functions. */
19 static __m128i
pack_unsaturated (__m128i from
, __m128i mask
)
21 return _mm_shuffle_epi8 (from
, mask
);
24 static __m128i
distribute_alpha (__m128i from
, __m128i mask
)
26 return _mm_shuffle_epi8 (from
, mask
);
29 static __m128i
shuffle_epi8 (__m128i x
, __m128i y
)
31 return _mm_shuffle_epi8 (x
, y
);
34 static __m128i
hadd_epi16 (__m128i x
, __m128i y
)
36 return _mm_hadd_epi16 (x
, y
);
40 #endif /* BLITTER_SSE3_H */