diff options
author | James Zern <jzern@google.com> | 2015-08-17 18:19:22 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2015-08-26 20:11:32 -0700 |
commit | 5e16d397bd67b6d870c1ac34f50799f5c2fd6f91 (patch) | |
tree | 1e31dcc55d3be8c0c98433d60a10c6b7c37dc28a /vp10/decoder | |
parent | 205532f3a76752bec3a8b4d229c5fbf569b29922 (diff) | |
download | libvpx-5e16d397bd67b6d870c1ac34f50799f5c2fd6f91.tar.gz |
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
Diffstat (limited to 'vp10/decoder')
-rw-r--r-- | vp10/decoder/decodeframe.c | 18 | ||||
-rw-r--r-- | vp10/decoder/decodemv.c | 14 |
2 files changed, 16 insertions, 16 deletions
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; diff --git a/vp10/decoder/decodemv.c b/vp10/decoder/decodemv.c index 5fbe2ca07..cf331eefe 100644 --- a/vp10/decoder/decodemv.c +++ b/vp10/decoder/decodemv.c @@ -87,7 +87,7 @@ static TX_SIZE read_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd, if (allow_select && tx_mode == TX_MODE_SELECT && bsize >= BLOCK_8X8) return read_selected_tx_size(cm, xd, max_tx_size, r); else - return MIN(max_tx_size, tx_mode_to_biggest_tx_size[tx_mode]); + return VPXMIN(max_tx_size, tx_mode_to_biggest_tx_size[tx_mode]); } static int dec_get_segment_id(const VP10_COMMON *cm, const uint8_t *segment_ids, @@ -96,8 +96,8 @@ static int dec_get_segment_id(const VP10_COMMON *cm, const uint8_t *segment_ids, for (y = 0; y < y_mis; y++) for (x = 0; x < x_mis; x++) - segment_id = MIN(segment_id, - segment_ids[mi_offset + y * cm->mi_cols + x]); + segment_id = + VPXMIN(segment_id, segment_ids[mi_offset + y * cm->mi_cols + x]); assert(segment_id >= 0 && segment_id < MAX_SEGMENTS); return segment_id; @@ -156,8 +156,8 @@ static int read_inter_segment_id(VP10_COMMON *const cm, MACROBLOCKD *const xd, const int bh = xd->plane[0].n4_h >> 1; // TODO(slavarnway): move x_mis, y_mis into xd ????? - const int x_mis = MIN(cm->mi_cols - mi_col, bw); - const int y_mis = MIN(cm->mi_rows - mi_row, bh); + const int x_mis = VPXMIN(cm->mi_cols - mi_col, bw); + const int y_mis = VPXMIN(cm->mi_rows - mi_row, bh); if (!seg->enabled) return 0; // Default for disabled segmentation @@ -212,8 +212,8 @@ static void read_intra_frame_mode_info(VP10_COMMON *const cm, const int bh = xd->plane[0].n4_h >> 1; // TODO(slavarnway): move x_mis, y_mis into xd ????? - const int x_mis = MIN(cm->mi_cols - mi_col, bw); - const int y_mis = MIN(cm->mi_rows - mi_row, bh); + const int x_mis = VPXMIN(cm->mi_cols - mi_col, bw); + const int y_mis = VPXMIN(cm->mi_rows - mi_row, bh); mbmi->segment_id = read_intra_segment_id(cm, mi_offset, x_mis, y_mis, r); mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r); |