From 5e16d397bd67b6d870c1ac34f50799f5c2fd6f91 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 17 Aug 2015 18:19:22 -0700 Subject: vpx_dsp_common: add VPX prefix to MIN/MAX prevents redeclaration warnings; vp8 has its own define which will be resolved in a future commit Change-Id: Ic941fef3dd4262fcdce48b73075fe6b375f11c9c --- vp10/decoder/decodeframe.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'vp10/decoder/decodeframe.c') diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index 6cb2ff54c..b17fa1ed8 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -624,7 +624,7 @@ static void dec_build_inter_predictors(VP10Decoder *const pbi, MACROBLOCKD *xd, // pixels of each superblock row can be changed by next superblock row. if (pbi->frame_parallel_decode) vp10_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, - MAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); + VPXMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); // Skip border extension if block is inside the frame. if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 || @@ -652,7 +652,7 @@ static void dec_build_inter_predictors(VP10Decoder *const pbi, MACROBLOCKD *xd, if (pbi->frame_parallel_decode) { const int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS; vp10_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, - MAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); + VPXMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); } } #if CONFIG_VP9_HIGHBITDEPTH @@ -723,8 +723,8 @@ static void dec_build_inter_predictors_sb(VP10Decoder *const pbi, static INLINE TX_SIZE dec_get_uv_tx_size(const MB_MODE_INFO *mbmi, int n4_wl, int n4_hl) { // get minimum log2 num4x4s dimension - const int x = MIN(n4_wl, n4_hl); - return MIN(mbmi->tx_size, x); + const int x = VPXMIN(n4_wl, n4_hl); + return VPXMIN(mbmi->tx_size, x); } static INLINE void dec_reset_skip_context(MACROBLOCKD *xd) { @@ -785,8 +785,8 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd, const int less8x8 = bsize < BLOCK_8X8; const int bw = 1 << (bwl - 1); const int bh = 1 << (bhl - 1); - const int x_mis = MIN(bw, cm->mi_cols - mi_col); - const int y_mis = MIN(bh, cm->mi_rows - mi_row); + const int x_mis = VPXMIN(bw, cm->mi_cols - mi_col); + const int y_mis = VPXMIN(bh, cm->mi_rows - mi_row); MB_MODE_INFO *mbmi = set_offsets(cm, xd, bsize, mi_row, mi_col, bw, bh, x_mis, y_mis, bwl, bhl); @@ -1570,7 +1570,7 @@ static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, const int aligned_mi_cols = mi_cols_aligned_to_sb(cm->mi_cols); const int tile_cols = 1 << cm->log2_tile_cols; const int tile_rows = 1 << cm->log2_tile_rows; - const int num_workers = MIN(pbi->max_threads & ~1, tile_cols); + const int num_workers = VPXMIN(pbi->max_threads & ~1, tile_cols); TileBuffer tile_buffers[1][1 << 6]; int n; int final_worker = -1; @@ -1637,7 +1637,7 @@ static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, int group_start = 0; while (group_start < tile_cols) { const TileBuffer largest = tile_buffers[0][group_start]; - const int group_end = MIN(group_start + num_workers, tile_cols) - 1; + const int group_end = VPXMIN(group_start + num_workers, tile_cols) - 1; memmove(tile_buffers[0] + group_start, tile_buffers[0] + group_start + 1, (group_end - group_start) * sizeof(tile_buffers[0][0])); tile_buffers[0][group_end] = largest; @@ -2069,7 +2069,7 @@ static struct vpx_read_bit_buffer *init_read_bit_buffer( rb->error_handler = error_handler; rb->error_handler_data = &pbi->common; if (pbi->decrypt_cb) { - const int n = (int)MIN(MAX_VP9_HEADER_SIZE, data_end - data); + const int n = (int)VPXMIN(MAX_VP9_HEADER_SIZE, data_end - data); pbi->decrypt_cb(pbi->decrypt_state, data, clear_data, n); rb->bit_buffer = clear_data; rb->bit_buffer_end = clear_data + n; -- cgit v1.2.3