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 /vp8/encoder | |
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 'vp8/encoder')
-rw-r--r-- | vp8/encoder/lookahead.h | 2 | ||||
-rw-r--r-- | vp8/encoder/onyx_if.c | 4 | ||||
-rw-r--r-- | vp8/encoder/onyx_int.h | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/vp8/encoder/lookahead.h b/vp8/encoder/lookahead.h index 4e2766b1c..bf0401190 100644 --- a/vp8/encoder/lookahead.h +++ b/vp8/encoder/lookahead.h @@ -74,7 +74,7 @@ int vp8_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, struct lookahead_entry *vp8_lookahead_pop(struct lookahead_ctx *ctx, int drain); #define PEEK_FORWARD 1 -#define PEEK_BACKWARD -1 +#define PEEK_BACKWARD (-1) /**\brief Get a future source buffer to encode * * \param[in] ctx Pointer to the lookahead context diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index a30821ac1..bdc4bdc42 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -687,8 +687,8 @@ static void set_default_lf_deltas(VP8_COMP *cpi) { /* Convenience macros for mapping speed and mode into a continuous * range */ -#define GOOD(x) (x + 1) -#define RT(x) (x + 7) +#define GOOD(x) ((x) + 1) +#define RT(x) ((x) + 7) static int speed_map(int speed, const int *map) { int res; diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index a4e3f2f79..a48c4d5f7 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -716,8 +716,8 @@ void vp8_set_speed_features(VP8_COMP *cpi); #if CONFIG_DEBUG #define CHECK_MEM_ERROR(lval, expr) \ do { \ - lval = (expr); \ - if (!lval) \ + (lval) = (expr); \ + if (!(lval)) \ vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, \ "Failed to allocate " #lval " at %s:%d", __FILE__, \ __LINE__); \ @@ -725,8 +725,8 @@ void vp8_set_speed_features(VP8_COMP *cpi); #else #define CHECK_MEM_ERROR(lval, expr) \ do { \ - lval = (expr); \ - if (!lval) \ + (lval) = (expr); \ + if (!(lval)) \ vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR, \ "Failed to allocate " #lval); \ } while (0) |