Commit f9562aea authored by clang-format's avatar clang-format Committed by James Zern

apply clang-format

Change-Id: I863fc85c7dc1b4f4e5740ac086fe1a852c62d26e
parent 6f1b9ba9
......@@ -46,14 +46,14 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = {
(__clang_major__ == 5 && __clang_minor__ == 0)))
#define MM256_BROADCASTSI128_SI256(x) \
_mm_broadcastsi128_si256((__m128i const *) & (x))
_mm_broadcastsi128_si256((__m128i const *)&(x))
#else // clang > 3.3, and not 5.0 on macosx.
#define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x)
#endif // clang <= 3.3
#elif defined(__GNUC__)
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 6)
#define MM256_BROADCASTSI128_SI256(x) \
_mm_broadcastsi128_si256((__m128i const *) & (x))
_mm_broadcastsi128_si256((__m128i const *)&(x))
#elif __GNUC__ == 4 && __GNUC_MINOR__ == 7
#define MM256_BROADCASTSI128_SI256(x) _mm_broadcastsi128_si256(x)
#else // gcc > 4.7
......
......@@ -438,7 +438,7 @@ void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride,
const uint8_t *mask, uint32_t mask_stride, int h,
int w, int suby, int subx) {
typedef void (*blend_fn)(
uint8_t *dst, uint32_t dst_stride, const uint8_t *src0,
uint8_t * dst, uint32_t dst_stride, const uint8_t *src0,
uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride, int h, int w);
......@@ -872,7 +872,7 @@ void aom_highbd_blend_a64_mask_sse4_1(uint8_t *dst_8, uint32_t dst_stride,
uint32_t mask_stride, int h, int w,
int suby, int subx, int bd) {
typedef void (*blend_fn)(
uint16_t *dst, uint32_t dst_stride, const uint16_t *src0,
uint16_t * dst, uint32_t dst_stride, const uint16_t *src0,
uint32_t src0_stride, const uint16_t *src1, uint32_t src1_stride,
const uint8_t *mask, uint32_t mask_stride, int h, int w);
......
......@@ -113,7 +113,7 @@ void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w) {
typedef void (*blend_fn)(uint8_t *dst, uint32_t dst_stride,
typedef void (*blend_fn)(uint8_t * dst, uint32_t dst_stride,
const uint8_t *src0, uint32_t src0_stride,
const uint8_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w);
......@@ -241,7 +241,7 @@ void aom_highbd_blend_a64_vmask_sse4_1(
uint8_t *dst_8, uint32_t dst_stride, const uint8_t *src0_8,
uint32_t src0_stride, const uint8_t *src1_8, uint32_t src1_stride,
const uint8_t *mask, int h, int w, int bd) {
typedef void (*blend_fn)(uint16_t *dst, uint32_t dst_stride,
typedef void (*blend_fn)(uint16_t * dst, uint32_t dst_stride,
const uint16_t *src0, uint32_t src0_stride,
const uint16_t *src1, uint32_t src1_stride,
const uint8_t *mask, int h, int w);
......
......@@ -26,10 +26,10 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch,
const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \
ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \
const int16_t *filter_y, int y_step_q4, int w, int h) { \
(void) filter_x; \
(void) x_step_q4; \
(void) filter_y; \
(void) y_step_q4; \
(void)filter_x; \
(void)x_step_q4; \
(void)filter_y; \
(void)y_step_q4; \
assert(filter[3] != 128); \
assert(step_q4 == 16); \
if (filter[0] || filter[1] || filter[2]) { \
......
......@@ -126,7 +126,7 @@ static INLINE uint64_t xgetbv(void) {
: "c"(ecx));
return ((uint64_t)edx << 32) | eax;
}
#elif(defined(_M_X64) || defined(_M_IX86)) && defined(_MSC_FULL_VER) && \
#elif (defined(_M_X64) || defined(_M_IX86)) && defined(_MSC_FULL_VER) && \
_MSC_FULL_VER >= 160040219 // >= VS2010 SP1
#include <immintrin.h>
#define xgetbv() _xgetbv(0)
......
......@@ -1956,8 +1956,7 @@ int main(int argc, const char **argv_) {
if (global.pass && global.passes == 2)
FOREACH_STREAM({
if (!stream->config.stats_fn)
die(
"Stream %d: Must specify --fpf when --pass=%d"
die("Stream %d: Must specify --fpf when --pass=%d"
" and --passes=2\n",
stream->index, global.pass);
});
......
......@@ -129,10 +129,10 @@ extern const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS];
// #define ENTROPY_STATS
typedef unsigned int
av1_coeff_count[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_TOKENS];
typedef unsigned int
av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_NODES][2];
typedef unsigned int av1_coeff_count[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
[ENTROPY_TOKENS];
typedef unsigned int av1_coeff_stats[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
[ENTROPY_NODES][2];
#define SUBEXP_PARAM 4 /* Subexponential code parameter */
#define MODULUS_PARAM 13 /* Modulus parameter */
......@@ -171,16 +171,17 @@ extern const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES];
typedef aom_prob av1_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
[UNCONSTRAINED_NODES];
typedef unsigned int av1_coeff_count_model
[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1];
typedef unsigned int av1_coeff_count_model[REF_TYPES][COEF_BANDS]
[COEFF_CONTEXTS]
[UNCONSTRAINED_NODES + 1];
void av1_model_to_full_probs(const aom_prob *model, aom_prob *full);
#if CONFIG_RANS || CONFIG_DAALA_EC
typedef aom_cdf_prob
coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][ENTROPY_TOKENS];
extern const aom_cdf_prob
av1_pareto8_token_probs[COEFF_PROB_MODELS][ENTROPY_TOKENS - 2];
typedef aom_cdf_prob coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
[ENTROPY_TOKENS];
extern const aom_cdf_prob av1_pareto8_token_probs[COEFF_PROB_MODELS]
[ENTROPY_TOKENS - 2];
struct frame_contexts;
void av1_coef_pareto_cdfs(struct frame_contexts *fc);
#endif // CONFIG_RANS
......
This diff is collapsed.
......@@ -65,9 +65,8 @@ typedef struct frame_contexts {
#if CONFIG_RANS || CONFIG_DAALA_EC
coeff_cdf_model coef_cdfs[TX_SIZES][PLANE_TYPES];
#endif // CONFIG_RANS
aom_prob
switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS -
1];
aom_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS - 1];
#if CONFIG_REF_MV
aom_prob newmv_prob[NEWMV_MODE_CONTEXTS];
......@@ -106,8 +105,8 @@ typedef struct frame_contexts {
aom_cdf_prob y_mode_cdf[BLOCK_SIZE_GROUPS][INTRA_MODES];
aom_cdf_prob uv_mode_cdf[INTRA_MODES][INTRA_MODES];
aom_cdf_prob partition_cdf[PARTITION_CONTEXTS][PARTITION_TYPES];
aom_cdf_prob
switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
aom_cdf_prob switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS];
aom_cdf_prob inter_mode_cdf[INTER_MODE_CONTEXTS][INTER_MODES];
aom_cdf_prob intra_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES][TX_TYPES];
aom_cdf_prob inter_ext_tx_cdf[EXT_TX_SIZES][TX_TYPES];
......@@ -123,10 +122,10 @@ typedef struct FRAME_COUNTS {
unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
unsigned int partition[PARTITION_CONTEXTS][PARTITION_TYPES];
av1_coeff_count_model coef[TX_SIZES][PLANE_TYPES];
unsigned int
eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS][COEFF_CONTEXTS];
unsigned int
switchable_interp[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS];
unsigned int eob_branch[TX_SIZES][PLANE_TYPES][REF_TYPES][COEF_BANDS]
[COEFF_CONTEXTS];
unsigned int switchable_interp[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS];
#if CONFIG_REF_MV
unsigned int newmv_mode[NEWMV_MODE_CONTEXTS][2];
......@@ -165,8 +164,8 @@ typedef struct FRAME_COUNTS {
unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES];
} FRAME_COUNTS;
extern const aom_prob
av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1];
extern const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
[INTRA_MODES - 1];
#if CONFIG_DAALA_EC
extern aom_cdf_prob av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES][INTRA_MODES];
#endif
......@@ -175,14 +174,16 @@ extern aom_cdf_prob av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES][INTRA_MODES];
extern const aom_prob av1_default_palette_y_mode_prob[PALETTE_BLOCK_SIZES]
[PALETTE_Y_MODE_CONTEXTS];
extern const aom_prob av1_default_palette_uv_mode_prob[2];
extern const aom_prob
av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES][PALETTE_SIZES - 1];
extern const aom_prob
av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES][PALETTE_SIZES - 1];
extern const aom_prob av1_default_palette_y_color_prob
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1];
extern const aom_prob av1_default_palette_uv_color_prob
[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1];
extern const aom_prob av1_default_palette_y_size_prob[PALETTE_BLOCK_SIZES]
[PALETTE_SIZES - 1];
extern const aom_prob av1_default_palette_uv_size_prob[PALETTE_BLOCK_SIZES]
[PALETTE_SIZES - 1];
extern const aom_prob av1_default_palette_y_color_prob[PALETTE_MAX_SIZE - 1]
[PALETTE_COLOR_CONTEXTS]
[PALETTE_COLORS - 1];
extern const aom_prob av1_default_palette_uv_color_prob[PALETTE_MAX_SIZE - 1]
[PALETTE_COLOR_CONTEXTS]
[PALETTE_COLORS - 1];
#endif // CONFIG_PALETTE
extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
......@@ -202,8 +203,8 @@ extern const aom_tree_index
#if CONFIG_PALETTE
extern const aom_tree_index av1_palette_size_tree[TREE_SIZE(PALETTE_SIZES)];
extern const aom_tree_index
av1_palette_color_tree[PALETTE_MAX_SIZE - 1][TREE_SIZE(PALETTE_COLORS)];
extern const aom_tree_index av1_palette_color_tree[PALETTE_MAX_SIZE - 1]
[TREE_SIZE(PALETTE_COLORS)];
#endif // CONFIG_PALETTE
#if CONFIG_DAALA_EC
......
......@@ -233,8 +233,8 @@ static void update_sharpness(loop_filter_info_n *lfi, int sharpness_lvl) {
static uint8_t get_filter_level(const loop_filter_info_n *lfi_n,
const MB_MODE_INFO *mbmi) {
return lfi_n
->lvl[mbmi->segment_id][mbmi->ref_frame[0]][mode_lf_lut[mbmi->mode]];
return lfi_n->lvl[mbmi->segment_id][mbmi->ref_frame[0]]
[mode_lf_lut[mbmi->mode]];
}
void av1_loop_filter_init(AV1_COMMON *cm) {
......
......@@ -222,10 +222,10 @@ qm_val_t *aom_qmatrix(AV1_COMMON *cm, int qmlevel, int is_chroma,
return &cm->gqmatrix[qmlevel][!!is_chroma][!!is_intra][log2sizem2][0];
}
static uint16_t
iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
static uint16_t
wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2]
[4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2]
[4 * 4 + 8 * 8 + 16 * 16 + 32 * 32];
void aom_qm_init(AV1_COMMON *cm) {
int q, c, f, t, size;
......
......@@ -70,7 +70,7 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type,
fc->coef_probs[tx_size][type][ref];
const aom_prob *prob;
#if CONFIG_RANS || CONFIG_DAALA_EC
const aom_cdf_prob (*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
const aom_cdf_prob(*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
fc->coef_cdfs[tx_size][type][ref];
const aom_cdf_prob(*cdf)[ENTROPY_TOKENS];
#endif // CONFIG_RANS
......@@ -293,7 +293,7 @@ void av1_decode_palette_tokens(MACROBLOCKD *const xd, int plane,
const int n = mbmi->palette_mode_info.palette_size[plane != 0];
int i, j;
uint8_t *color_map = xd->plane[plane != 0].color_index_map;
const aom_prob (*const prob)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
const aom_prob(*const prob)[PALETTE_COLOR_CONTEXTS][PALETTE_COLORS - 1] =
plane ? av1_default_palette_uv_color_prob
: av1_default_palette_y_color_prob;
......
......@@ -1267,9 +1267,9 @@ static void update_stats(const AV1_COMP *const cpi, ThreadData *td,
if (is_inter_block(mbmi)) {
++td->counts->inter_ext_tx[mbmi->tx_size][mbmi->tx_type];
} else {
++td->counts
->intra_ext_tx[mbmi->tx_size][intra_mode_to_tx_type_context
[mbmi->mode]][mbmi->tx_type];
++td->counts->intra_ext_tx[mbmi->tx_size]
[intra_mode_to_tx_type_context[mbmi->mode]]
[mbmi->tx_type];
}
}
......@@ -1313,26 +1313,26 @@ static void update_stats(const AV1_COMP *const cpi, ThreadData *td,
#endif // CONFIG_EXT_REFS
if (cm->reference_mode == REFERENCE_MODE_SELECT)
counts->comp_inter[av1_get_reference_mode_context(
cm, xd)][has_second_ref(mbmi)]++;
counts->comp_inter[av1_get_reference_mode_context(cm, xd)]
[has_second_ref(mbmi)]++;
if (has_second_ref(mbmi)) {
#if CONFIG_EXT_REFS
const int bit = (ref0 == GOLDEN_FRAME || ref0 == LAST3_FRAME);
counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p(cm,
xd)][0][bit]++;
counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p(cm, xd)][0]
[bit]++;
if (!bit)
counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p1(
cm, xd)][1][ref0 == LAST_FRAME]++;
counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p1(cm, xd)][1]
[ref0 == LAST_FRAME]++;
else
counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p2(
cm, xd)][2][ref0 == GOLDEN_FRAME]++;
counts->comp_bwdref[av1_get_pred_context_comp_bwdref_p(
cm, xd)][0][ref1 == ALTREF_FRAME]++;
counts->comp_fwdref[av1_get_pred_context_comp_fwdref_p2(cm, xd)][2]
[ref0 == GOLDEN_FRAME]++;
counts->comp_bwdref[av1_get_pred_context_comp_bwdref_p(cm, xd)][0]
[ref1 == ALTREF_FRAME]++;
#else
counts->comp_ref[av1_get_pred_context_comp_ref_p(
cm, xd)][ref0 == GOLDEN_FRAME]++;
counts->comp_ref[av1_get_pred_context_comp_ref_p(cm, xd)]
[ref0 == GOLDEN_FRAME]++;
#endif // CONFIG_EXT_REFS
} else {
#if CONFIG_EXT_REFS
......@@ -1340,26 +1340,26 @@ static void update_stats(const AV1_COMP *const cpi, ThreadData *td,
counts->single_ref[av1_get_pred_context_single_ref_p1(xd)][0][bit]++;
if (bit) {
counts->single_ref[av1_get_pred_context_single_ref_p2(
xd)][1][ref0 != BWDREF_FRAME]++;
counts->single_ref[av1_get_pred_context_single_ref_p2(xd)][1]
[ref0 != BWDREF_FRAME]++;
} else {
const int bit1 = !(ref0 == LAST2_FRAME || ref0 == LAST_FRAME);
counts
->single_ref[av1_get_pred_context_single_ref_p3(xd)][2][bit1]++;
counts->single_ref[av1_get_pred_context_single_ref_p3(xd)][2]
[bit1]++;
if (!bit1) {
counts->single_ref[av1_get_pred_context_single_ref_p4(
xd)][3][ref0 != LAST_FRAME]++;
counts->single_ref[av1_get_pred_context_single_ref_p4(xd)][3]
[ref0 != LAST_FRAME]++;
} else {
counts->single_ref[av1_get_pred_context_single_ref_p5(
xd)][4][ref0 != LAST3_FRAME]++;
counts->single_ref[av1_get_pred_context_single_ref_p5(xd)][4]
[ref0 != LAST3_FRAME]++;
}
}
#else
counts->single_ref[av1_get_pred_context_single_ref_p1(
xd)][0][ref0 != LAST_FRAME]++;
counts->single_ref[av1_get_pred_context_single_ref_p1(xd)][0]
[ref0 != LAST_FRAME]++;
if (ref0 != LAST_FRAME)
counts->single_ref[av1_get_pred_context_single_ref_p2(
xd)][1][ref0 != GOLDEN_FRAME]++;
counts->single_ref[av1_get_pred_context_single_ref_p2(xd)][1]
[ref0 != GOLDEN_FRAME]++;
#endif // CONFIG_EXT_REFS
}
}
......
......@@ -165,12 +165,10 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size,
if (next < default_eob) {
band = band_translate[i + 1];
pt = trellis_get_coeff_context(scan, nb, i, t0, token_cache);
rate0 +=
mb->token_costs[tx_size][type][ref][band][0][pt][tokens[next][0]
.token];
rate1 +=
mb->token_costs[tx_size][type][ref][band][0][pt][tokens[next][1]
.token];
rate0 += mb->token_costs[tx_size][type][ref][band][0][pt]
[tokens[next][0].token];
rate1 += mb->token_costs[tx_size][type][ref][band][0][pt]
[tokens[next][1].token];
}
UPDATE_RD_COST();
/* And pick the best. */
......@@ -229,15 +227,13 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size,
band = band_translate[i + 1];
if (t0 != EOB_TOKEN) {
pt = trellis_get_coeff_context(scan, nb, i, t0, token_cache);
rate0 +=
mb->token_costs[tx_size][type][ref][band][!x][pt][tokens[next][0]
.token];
rate0 += mb->token_costs[tx_size][type][ref][band][!x][pt]
[tokens[next][0].token];
}
if (t1 != EOB_TOKEN) {
pt = trellis_get_coeff_context(scan, nb, i, t1, token_cache);
rate1 +=
mb->token_costs[tx_size][type][ref][band][!x][pt][tokens[next][1]
.token];
rate1 += mb->token_costs[tx_size][type][ref][band][!x][pt]
[tokens[next][1].token];
}
}
......
......@@ -499,10 +499,10 @@ typedef struct AV1_COMP {
#if CONFIG_PALETTE
int palette_y_size_cost[PALETTE_BLOCK_SIZES][PALETTE_SIZES];
int palette_uv_size_cost[PALETTE_BLOCK_SIZES][PALETTE_SIZES];
int palette_y_color_cost[PALETTE_MAX_SIZE -
1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS];
int palette_uv_color_cost[PALETTE_MAX_SIZE -
1][PALETTE_COLOR_CONTEXTS][PALETTE_COLORS];
int palette_y_color_cost[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS]
[PALETTE_COLORS];
int palette_uv_color_cost[PALETTE_MAX_SIZE - 1][PALETTE_COLOR_CONTEXTS]
[PALETTE_COLORS];
#endif // CONFIG_PALETTE
int multi_arf_allowed;
......
......@@ -914,12 +914,13 @@ static INLINE void calc_int_cost_list(const MACROBLOCK *x, const MV *ref_mv,
// candidates as indicated in the num_candidates and candidates arrays
// passed into this function
//
static int av1_pattern_search(
const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit,
int do_init_search, int *cost_list, const aom_variance_fn_ptr_t *vfp,
int use_mvcost, const MV *center_mv, MV *best_mv,
const int num_candidates[MAX_PATTERN_SCALES],
const MV candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES]) {
static int av1_pattern_search(const MACROBLOCK *x, MV *ref_mv, int search_param,
int sad_per_bit, int do_init_search,
int *cost_list, const aom_variance_fn_ptr_t *vfp,
int use_mvcost, const MV *center_mv, MV *best_mv,
const int num_candidates[MAX_PATTERN_SCALES],
const MV candidates[MAX_PATTERN_SCALES]
[MAX_PATTERN_CANDIDATES]) {
const MACROBLOCKD *const xd = &x->e_mbd;
static const int search_param_to_steps[MAX_MVSEARCH_STEPS] = {
10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0,
......@@ -1564,97 +1565,97 @@ int av1_square_search(const MACROBLOCK *x, MV *ref_mv, int search_param,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
};
// Note that the largest candidate step at each scale is 2^scale
static const MV
square_candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES] = {
{ { -1, -1 },
{ 0, -1 },
{ 1, -1 },
{ 1, 0 },
{ 1, 1 },
{ 0, 1 },
{ -1, 1 },
{ -1, 0 } },
{ { -2, -2 },
{ 0, -2 },
{ 2, -2 },
{ 2, 0 },
{ 2, 2 },
{ 0, 2 },
{ -2, 2 },
{ -2, 0 } },
{ { -4, -4 },
{ 0, -4 },
{ 4, -4 },
{ 4, 0 },
{ 4, 4 },
{ 0, 4 },
{ -4, 4 },
{ -4, 0 } },
{ { -8, -8 },
{ 0, -8 },
{ 8, -8 },
{ 8, 0 },
{ 8, 8 },
{ 0, 8 },
{ -8, 8 },
{ -8, 0 } },
{ { -16, -16 },
{ 0, -16 },
{ 16, -16 },
{ 16, 0 },
{ 16, 16 },
{ 0, 16 },
{ -16, 16 },
{ -16, 0 } },
{ { -32, -32 },
{ 0, -32 },
{ 32, -32 },
{ 32, 0 },
{ 32, 32 },
{ 0, 32 },
{ -32, 32 },
{ -32, 0 } },
{ { -64, -64 },
{ 0, -64 },
{ 64, -64 },
{ 64, 0 },
{ 64, 64 },
{ 0, 64 },
{ -64, 64 },
{ -64, 0 } },
{ { -128, -128 },
{ 0, -128 },
{ 128, -128 },
{ 128, 0 },
{ 128, 128 },
{ 0, 128 },
{ -128, 128 },
{ -128, 0 } },
{ { -256, -256 },
{ 0, -256 },
{ 256, -256 },
{ 256, 0 },
{ 256, 256 },
{ 0, 256 },
{ -256, 256 },
{ -256, 0 } },
{ { -512, -512 },
{ 0, -512 },
{ 512, -512 },
{ 512, 0 },
{ 512, 512 },
{ 0, 512 },
{ -512, 512 },
{ -512, 0 } },
{ { -1024, -1024 },
{ 0, -1024 },
{ 1024, -1024 },
{ 1024, 0 },
{ 1024, 1024 },
{ 0, 1024 },
{ -1024, 1024 },
{ -1024, 0 } },
};
static const MV square_candidates[MAX_PATTERN_SCALES]
[MAX_PATTERN_CANDIDATES] = {
{ { -1, -1 },
{ 0, -1 },
{ 1, -1 },
{ 1, 0 },
{ 1, 1 },
{ 0, 1 },
{ -1, 1 },
{ -1, 0 } },
{ { -2, -2 },
{ 0, -2 },
{ 2, -2 },
{ 2, 0 },
{ 2, 2 },
{ 0, 2 },
{ -2, 2 },
{ -2, 0 } },
{ { -4, -4 },
{ 0, -4 },
{ 4, -4 },
{ 4, 0 },
{ 4, 4 },
{ 0, 4 },
{ -4, 4 },
{ -4, 0 } },
{ { -8, -8 },
{ 0, -8 },
{ 8, -8 },
{ 8, 0 },
{ 8, 8 },
{ 0, 8 },
{ -8, 8 },
{ -8, 0 } },
{ { -16, -16 },
{ 0, -16 },
{ 16, -16 },
{ 16, 0 },
{ 16, 16 },
{ 0, 16 },
{ -16, 16 },
{ -16, 0 } },
{ { -32, -32 },
{ 0, -32 },
{ 32, -32 },
{ 32, 0 },
{ 32, 32 },
{ 0, 32 },
{ -32, 32 },
{ -32, 0 } },
{ { -64, -64 },
{ 0, -64 },
{ 64, -64 },
{ 64, 0 },
{ 64, 64 },
{ 0, 64 },
{ -64, 64 },
{ -64, 0 } },
{ { -128, -128 },
{ 0, -128 },
{ 128, -128 },
{ 128, 0 },
{ 128, 128 },
{ 0, 128 },
{ -128, 128 },
{ -128, 0 } },
{ { -256, -256 },
{ 0, -256 },
{ 256, -256 },
{ 256, 0 },
{ 256, 256 },
{ 0, 256 },
{ -256, 256 },
{ -256, 0 } },
{ { -512, -512 },
{ 0, -512 },
{ 512, -512 },
{ 512, 0 },
{ 512, 512 },
{ 0, 512 },
{ -512, 512 },
{ -512, 0 } },
{ { -1024, -1024 },
{ 0, -1024 },
{ 1024, -1024 },
{ 1024, 0 },
{ 1024, 1024 },
{ 0, 1024 },
{ -1024, 1024 },
{ -1024, 0 } },
};
return av1_pattern_search(
x, ref_mv, search_param, sad_per_bit, do_init_search, cost_list, vfp,