| Index: source/libvpx/vp9/encoder/vp9_aq_complexity.c
|
| diff --git a/source/libvpx/vp9/encoder/vp9_aq_complexity.c b/source/libvpx/vp9/encoder/vp9_aq_complexity.c
|
| index bea7653d2a70a3ee12da7178e25c19788888fdb3..93ea270df8a792c9e4bac1f4c2a8ea2b59fa4310 100644
|
| --- a/source/libvpx/vp9/encoder/vp9_aq_complexity.c
|
| +++ b/source/libvpx/vp9/encoder/vp9_aq_complexity.c
|
| @@ -10,6 +10,7 @@
|
|
|
| #include <limits.h>
|
| #include <math.h>
|
| +#include "vpx_ports/system_state.h"
|
|
|
| #include "vp9/encoder/vp9_aq_complexity.h"
|
| #include "vp9/encoder/vp9_aq_variance.h"
|
| @@ -47,7 +48,7 @@ void vp9_setup_in_frame_q_adj(VP9_COMP *cpi) {
|
| struct segmentation *const seg = &cm->seg;
|
|
|
| // Make SURE use of floating point in this function is safe.
|
| - vp9_clear_system_state();
|
| + vpx_clear_system_state();
|
|
|
| if (cm->frame_type == KEY_FRAME ||
|
| cpi->refresh_alt_ref_frame ||
|
| @@ -116,8 +117,8 @@ void vp9_caq_select_segment(VP9_COMP *cpi, MACROBLOCK *mb, BLOCK_SIZE bs,
|
| const int mi_offset = mi_row * cm->mi_cols + mi_col;
|
| const int bw = num_8x8_blocks_wide_lookup[BLOCK_64X64];
|
| const int bh = num_8x8_blocks_high_lookup[BLOCK_64X64];
|
| - const int xmis = MIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[bs]);
|
| - const int ymis = MIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[bs]);
|
| + const int xmis = VPXMIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[bs]);
|
| + const int ymis = VPXMIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[bs]);
|
| int x, y;
|
| int i;
|
| unsigned char segment;
|
| @@ -133,9 +134,9 @@ void vp9_caq_select_segment(VP9_COMP *cpi, MACROBLOCK *mb, BLOCK_SIZE bs,
|
| double low_var_thresh;
|
| const int aq_strength = get_aq_c_strength(cm->base_qindex, cm->bit_depth);
|
|
|
| - vp9_clear_system_state();
|
| + vpx_clear_system_state();
|
| low_var_thresh = (cpi->oxcf.pass == 2)
|
| - ? MAX(cpi->twopass.mb_av_energy, MIN_DEFAULT_LV_THRESH)
|
| + ? VPXMAX(cpi->twopass.mb_av_energy, MIN_DEFAULT_LV_THRESH)
|
| : DEFAULT_LV_THRESH;
|
|
|
| vp9_setup_src_planes(mb, cpi->Source, mi_row, mi_col);
|
|
|