diff options
Diffstat (limited to 'aom_dsp/x86/highbd_variance_sse2.c')
-rw-r--r-- | aom_dsp/x86/highbd_variance_sse2.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/aom_dsp/x86/highbd_variance_sse2.c b/aom_dsp/x86/highbd_variance_sse2.c index 6bd6a5a3f..d45885caf 100644 --- a/aom_dsp/x86/highbd_variance_sse2.c +++ b/aom_dsp/x86/highbd_variance_sse2.c @@ -629,13 +629,12 @@ void aom_highbd_dist_wtd_comp_avg_pred_sse2( const uint8_t *ref8, int ref_stride, const DIST_WTD_COMP_PARAMS *jcp_param) { int i; - const uint16_t wt0 = (uint16_t)jcp_param->fwd_offset; - const uint16_t wt1 = (uint16_t)jcp_param->bck_offset; - const __m128i w0 = _mm_set_epi16(wt0, wt0, wt0, wt0, wt0, wt0, wt0, wt0); - const __m128i w1 = _mm_set_epi16(wt1, wt1, wt1, wt1, wt1, wt1, wt1, wt1); - const uint16_t round = ((1 << DIST_PRECISION_BITS) >> 1); - const __m128i r = - _mm_set_epi16(round, round, round, round, round, round, round, round); + const int16_t wt0 = (int16_t)jcp_param->fwd_offset; + const int16_t wt1 = (int16_t)jcp_param->bck_offset; + const __m128i w0 = _mm_set1_epi16(wt0); + const __m128i w1 = _mm_set1_epi16(wt1); + const int16_t round = (int16_t)((1 << DIST_PRECISION_BITS) >> 1); + const __m128i r = _mm_set1_epi16(round); uint16_t *pred = CONVERT_TO_SHORTPTR(pred8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); uint16_t *comp_pred = CONVERT_TO_SHORTPTR(comp_pred8); |