Skip to content

Commit

Permalink
update clang formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
homm committed Aug 11, 2024
1 parent a410dcb commit cb55ee6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/libImaging/Bands.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ ImagingGetBand(Imaging imIn, int band) {
12 + band,
8 + band,
4 + band,
0 + band);
0 + band
);
#endif

/* Extract band from image */
Expand Down Expand Up @@ -132,7 +133,8 @@ ImagingSplit(Imaging imIn, Imaging bands[4]) {
__m128i source = _mm_loadu_si128((__m128i *)in);
source = _mm_shuffle_epi8(
source,
_mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0));
_mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0)
);
*((UINT32 *)(out0 + x)) = _mm_cvtsi128_si32(source);
*((UINT32 *)(out1 + x)) = _mm_cvtsi128_si32(_mm_srli_si128(source, 12));
#else
Expand Down Expand Up @@ -161,7 +163,8 @@ ImagingSplit(Imaging imIn, Imaging bands[4]) {
__m128i source = _mm_loadu_si128((__m128i *)in);
source = _mm_shuffle_epi8(
source,
_mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0));
_mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0)
);
*((UINT32 *)(out0 + x)) = _mm_cvtsi128_si32(source);
*((UINT32 *)(out1 + x)) = _mm_cvtsi128_si32(_mm_srli_si128(source, 4));
*((UINT32 *)(out2 + x)) = _mm_cvtsi128_si32(_mm_srli_si128(source, 8));
Expand Down Expand Up @@ -195,7 +198,8 @@ ImagingSplit(Imaging imIn, Imaging bands[4]) {
__m128i source = _mm_loadu_si128((__m128i *)in);
source = _mm_shuffle_epi8(
source,
_mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0));
_mm_set_epi8(15, 11, 7, 3, 14, 10, 6, 2, 13, 9, 5, 1, 12, 8, 4, 0)
);
*((UINT32 *)(out0 + x)) = _mm_cvtsi128_si32(source);
*((UINT32 *)(out1 + x)) = _mm_cvtsi128_si32(_mm_srli_si128(source, 4));
*((UINT32 *)(out2 + x)) = _mm_cvtsi128_si32(_mm_srli_si128(source, 8));
Expand Down

0 comments on commit cb55ee6

Please sign in to comment.