Commit 8f726212 authored by Cheng Chen's avatar Cheng Chen

Fix jnt_comp simd function in warp

Change _mm_srl_epi32 to _mm_sra_epi32. The difference is keeping
sign bits in shifting. Otherwise there are mismatchings between simd and c
functions, caught by unit tests.

The other change is fix a typo.

Change-Id: I18a9e9e12a661d181e9e904ffc64d802d624a36d
parent 9641a89b
......@@ -311,7 +311,7 @@ void av1_highbd_warp_affine_sse4_1(const int32_t *mat, const uint16_t *ref,
((1 << (conv_params->round_1)) >> 1));
res_lo = _mm_add_epi32(res_lo, round_const);
res_lo =
_mm_srl_epi32(res_lo, _mm_cvtsi32_si128(conv_params->round_1));
_mm_sra_epi32(res_lo, _mm_cvtsi32_si128(conv_params->round_1));
#if CONFIG_JNT_COMP
if (conv_params->use_jnt_comp_avg) {
if (comp_avg) {
......@@ -334,7 +334,7 @@ void av1_highbd_warp_affine_sse4_1(const int32_t *mat, const uint16_t *ref,
if (p_width > 4) {
res_hi = _mm_add_epi32(res_hi, round_const);
res_hi =
_mm_srl_epi32(res_hi, _mm_cvtsi32_si128(conv_params->round_1));
_mm_sra_epi32(res_hi, _mm_cvtsi32_si128(conv_params->round_1));
#if CONFIG_JNT_COMP
if (conv_params->use_jnt_comp_avg) {
......
......@@ -512,7 +512,7 @@ void av1_warp_affine_sse4_1(const int32_t *mat, const uint8_t *ref, int width,
if (conv_params->use_jnt_comp_avg) {
if (comp_avg) {
res_hi = _mm_add_epi32(_mm_loadu_si128(p + 1),
_mm_mullo_epi32(res_hi, wt0));
_mm_mullo_epi32(res_hi, wt1));
} else {
res_hi = _mm_mullo_epi32(res_hi, wt0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment