You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2932,7 +2932,7 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
2932
2932
dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \
2933
2933
dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \
2934
2934
dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \
2935
-
}
2935
+
}while ( 0 )
2936
2936
2937
2937
// load
2938
2938
row0 = vld1q_s16(data + 0*8);
@@ -2954,9 +2954,9 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
2954
2954
{
2955
2955
// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively.
2956
2956
// whether compilers actually get this is another story, sadly.
2957
-
#definedct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; }
2958
-
#definedct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); }
2959
-
#definedct_trn64(x, y) { int16x8_t x0 = x; int16x8_ty0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); }
2957
+
#definedct_trn16(x, y) do{ int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; }while ( 0 )
2958
+
#definedct_trn32(x, y) do{ int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); }while ( 0 )
@@ -2999,9 +2999,9 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64])
2999
2999
uint8x8_t p7 = vqrshrun_n_s16(row7, 1);
3000
3000
3001
3001
// again, these can translate into one instruction, but often don't.
3002
-
#definedct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; }
3003
-
#definedct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); }
3004
-
#definedct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); }
3002
+
#definedct_trn8_8(x, y) do{ uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; }while ( 0 )
3003
+
#definedct_trn8_16(x, y) do{ uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); }while ( 0 )
3004
+
#definedct_trn8_32(x, y) do{ uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); }while ( 0 )
3005
3005
3006
3006
// sadly can't use interleaved stores here since we only write
0 commit comments