diff options
author | Jerome Jiang <jianj@google.com> | 2019-03-13 16:21:43 -0700 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2019-03-14 14:57:33 -0700 |
commit | 1ece42aaf76c0b7e059fef5ef17c605cf1f5a478 (patch) | |
tree | 557473bb0d32c10c1b508180c72c2c5ecc5ddc04 /vpx_dsp/ppc | |
parent | 855a71dfda9fb2620ae5567a5bb0897aa4fc0d47 (diff) | |
download | libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.tar libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.tar.gz libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.tar.bz2 libvpx-1ece42aaf76c0b7e059fef5ef17c605cf1f5a478.zip |
Enclose macro arguments in parentheses
BUG=webm:1606
Change-Id: I661485b860243c95b6450035dbac77b0dd4d9ff4
Diffstat (limited to 'vpx_dsp/ppc')
-rw-r--r-- | vpx_dsp/ppc/inv_txfm_vsx.c | 18 | ||||
-rw-r--r-- | vpx_dsp/ppc/sad_vsx.c | 6 | ||||
-rw-r--r-- | vpx_dsp/ppc/types_vsx.h | 2 | ||||
-rw-r--r-- | vpx_dsp/ppc/variance_vsx.c | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/vpx_dsp/ppc/inv_txfm_vsx.c b/vpx_dsp/ppc/inv_txfm_vsx.c index 8d8fb4401..e99412eca 100644 --- a/vpx_dsp/ppc/inv_txfm_vsx.c +++ b/vpx_dsp/ppc/inv_txfm_vsx.c @@ -1074,15 +1074,15 @@ void vpx_idct16x16_256_add_vsx(const tran_low_t *input, uint8_t *dest, PIXEL_ADD(in3, d_ul, add, shift6); \ vec_vsx_st(vec_packsu(d_uh, d_ul), (step)*stride + 16, dest); -#define ADD_STORE_BLOCK(in, offset) \ - PIXEL_ADD_STORE32(in[0][0], in[1][0], in[2][0], in[3][0], offset + 0); \ - PIXEL_ADD_STORE32(in[0][1], in[1][1], in[2][1], in[3][1], offset + 1); \ - PIXEL_ADD_STORE32(in[0][2], in[1][2], in[2][2], in[3][2], offset + 2); \ - PIXEL_ADD_STORE32(in[0][3], in[1][3], in[2][3], in[3][3], offset + 3); \ - PIXEL_ADD_STORE32(in[0][4], in[1][4], in[2][4], in[3][4], offset + 4); \ - PIXEL_ADD_STORE32(in[0][5], in[1][5], in[2][5], in[3][5], offset + 5); \ - PIXEL_ADD_STORE32(in[0][6], in[1][6], in[2][6], in[3][6], offset + 6); \ - PIXEL_ADD_STORE32(in[0][7], in[1][7], in[2][7], in[3][7], offset + 7); +#define ADD_STORE_BLOCK(in, offset) \ + PIXEL_ADD_STORE32(in[0][0], in[1][0], in[2][0], in[3][0], (offset) + 0); \ + PIXEL_ADD_STORE32(in[0][1], in[1][1], in[2][1], in[3][1], (offset) + 1); \ + PIXEL_ADD_STORE32(in[0][2], in[1][2], in[2][2], in[3][2], (offset) + 2); \ + PIXEL_ADD_STORE32(in[0][3], in[1][3], in[2][3], in[3][3], (offset) + 3); \ + PIXEL_ADD_STORE32(in[0][4], in[1][4], in[2][4], in[3][4], (offset) + 4); \ + PIXEL_ADD_STORE32(in[0][5], in[1][5], in[2][5], in[3][5], (offset) + 5); \ + PIXEL_ADD_STORE32(in[0][6], in[1][6], in[2][6], in[3][6], (offset) + 6); \ + PIXEL_ADD_STORE32(in[0][7], in[1][7], in[2][7], in[3][7], (offset) + 7); void vpx_idct32x32_1024_add_vsx(const tran_low_t *input, uint8_t *dest, int stride) { diff --git a/vpx_dsp/ppc/sad_vsx.c b/vpx_dsp/ppc/sad_vsx.c index cdee8f3d1..a08ae1241 100644 --- a/vpx_dsp/ppc/sad_vsx.c +++ b/vpx_dsp/ppc/sad_vsx.c @@ -115,7 +115,7 @@ SAD64(64); unsigned int vpx_sad16x##height##_avg_vsx( \ const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, \ const uint8_t *second_pred) { \ - DECLARE_ALIGNED(16, uint8_t, comp_pred[16 * height]); \ + DECLARE_ALIGNED(16, uint8_t, comp_pred[16 * (height)]); \ vpx_comp_avg_pred_vsx(comp_pred, second_pred, 16, height, ref, \ ref_stride); \ \ @@ -126,7 +126,7 @@ SAD64(64); unsigned int vpx_sad32x##height##_avg_vsx( \ const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, \ const uint8_t *second_pred) { \ - DECLARE_ALIGNED(32, uint8_t, comp_pred[32 * height]); \ + DECLARE_ALIGNED(32, uint8_t, comp_pred[32 * (height)]); \ vpx_comp_avg_pred_vsx(comp_pred, second_pred, 32, height, ref, \ ref_stride); \ \ @@ -137,7 +137,7 @@ SAD64(64); unsigned int vpx_sad64x##height##_avg_vsx( \ const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, \ const uint8_t *second_pred) { \ - DECLARE_ALIGNED(64, uint8_t, comp_pred[64 * height]); \ + DECLARE_ALIGNED(64, uint8_t, comp_pred[64 * (height)]); \ vpx_comp_avg_pred_vsx(comp_pred, second_pred, 64, height, ref, \ ref_stride); \ return vpx_sad64x##height##_vsx(src, src_stride, comp_pred, 64); \ diff --git a/vpx_dsp/ppc/types_vsx.h b/vpx_dsp/ppc/types_vsx.h index 4cba7d365..b89116924 100644 --- a/vpx_dsp/ppc/types_vsx.h +++ b/vpx_dsp/ppc/types_vsx.h @@ -64,7 +64,7 @@ static const uint8x16_t xxpermdi3_perm = { 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, #define unpack_to_s16_l(v) \ (int16x8_t) vec_mergel((uint8x16_t)v, vec_splat_u8(0)) #ifndef xxpermdi -#define xxpermdi(a, b, c) vec_xxpermdi(b, a, ((c >> 1) | (c & 1) << 1) ^ 3) +#define xxpermdi(a, b, c) vec_xxpermdi(b, a, (((c) >> 1) | ((c)&1) << 1) ^ 3) #endif #endif diff --git a/vpx_dsp/ppc/variance_vsx.c b/vpx_dsp/ppc/variance_vsx.c index 8926160c2..be9614a35 100644 --- a/vpx_dsp/ppc/variance_vsx.c +++ b/vpx_dsp/ppc/variance_vsx.c @@ -243,7 +243,7 @@ static INLINE void variance(const uint8_t *src_ptr, int src_stride, uint32_t *sse) { \ int sum; \ variance(src_ptr, src_stride, ref_ptr, ref_stride, W, H, sse, &sum); \ - return *sse - (uint32_t)(((int64_t)sum * sum) / (W * H)); \ + return *sse - (uint32_t)(((int64_t)sum * sum) / ((W) * (H))); \ } #define VARIANCES(W, H) VAR(W, H) |