vp9_diamond_search_sad_avx cosmetics

Fixed cosmetic issues noted in Change 349854.

Change-Id: I1d94070e4066fa920173013c5a36a30dd1cb357d
This commit is contained in:
Scott LaVarnway 2016-06-10 04:56:21 -07:00
parent 97b4f8fe92
commit 2a0e1bcc83

View File

@ -56,7 +56,7 @@ static int mvsad_err_cost(const MACROBLOCK *x, const int_mv mv, const MV *ref,
}
/*****************************************************************************
* This function utilises 3 properties of the cost function lookup tables, *
* This function utilizes 3 properties of the cost function lookup tables, *
* constructed in using 'cal_nmvjointsadcost' and 'cal_nmvsadcosts' in *
* vp9_encoder.c. *
* For the joint cost: *
@ -122,10 +122,7 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
#endif
unsigned int best_sad;
int i;
int j;
int step;
int i, j, step;
// Check the prerequisite cost function properties that are easy to check
// in an assert. See the function-level documentation for details on all
@ -141,11 +138,7 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
for (i = 0, step = 0; step < tot_steps; step++) {
for (j = 0; j < cfg->searches_per_step; j += 4, i += 4) {
__m128i v_sad_d;
__m128i v_cost_d;
__m128i v_outside_d;
__m128i v_inside_d;
__m128i v_diff_mv_w;
__m128i v_sad_d, v_cost_d, v_outside_d, v_inside_d, v_diff_mv_w;
#if ARCH_X86_64
__m128i v_blocka[2];
#else
@ -224,13 +217,10 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
const uint32_t cost3 = x->nmvsadcost[0][row3] + x->nmvsadcost[0][col3];
__m128i v_cost_10_d, v_cost_32_d;
v_cost_10_d = _mm_cvtsi32_si128(cost0);
v_cost_10_d = _mm_insert_epi32(v_cost_10_d, cost1, 1);
v_cost_32_d = _mm_cvtsi32_si128(cost2);
v_cost_32_d = _mm_insert_epi32(v_cost_32_d, cost3, 1);
v_cost_d = _mm_unpacklo_epi64(v_cost_10_d, v_cost_32_d);
}
@ -246,7 +236,7 @@ int vp9_diamond_search_sad_avx(const MACROBLOCK *x,
// Multiply by sad_per_bit
v_cost_d = _mm_mullo_epi32(v_cost_d, v_spb_d);
// ROUND_POWER_OF_TWO(v_cost_d, 8)
// ROUND_POWER_OF_TWO(v_cost_d, VP9_PROB_COST_SHIFT)
v_cost_d = _mm_add_epi32(v_cost_d,
_mm_set1_epi32(1 << (VP9_PROB_COST_SHIFT - 1)));
v_cost_d = _mm_srai_epi32(v_cost_d, VP9_PROB_COST_SHIFT);