Commit bf14d468 authored by Linfeng Zhang's avatar Linfeng Zhang

Rewrite vpx_highbd_idct8x8_{12,64}_add_sse2

This replaces commit aa1c4cd1, which has a bug and was reverted in
commit 3c73e587.

The bug is caused by rounding -step1[5] in highbd_idct8x8_12_half1d().

Change-Id: I37b3a5f0d91815f2dc570209091dc6626fd178a8
parent 78e2da3e
This diff is collapsed.
......@@ -92,6 +92,23 @@ static INLINE __m128i multiplication_round_shift_sse2(
return pack_4(t0, t1);
// Note: c must be non negative.
static INLINE __m128i multiplication_neg_round_shift_sse2(
const __m128i *const in /*in[2]*/, const __m128i *const sign /*sign[2]*/,
const int c) {
const __m128i pair_c = pair_set_epi32(c << 2, 0);
__m128i t0, t1;
t0 = multiply_apply_sign_sse2(in[0], sign[0], pair_c);
t1 = multiply_apply_sign_sse2(in[1], sign[1], pair_c);
t0 = _mm_sub_epi64(_mm_setzero_si128(), t0);
t1 = _mm_sub_epi64(_mm_setzero_si128(), t1);
t0 = dct_const_round_shift_64bit(t0);
t1 = dct_const_round_shift_64bit(t1);
return pack_4(t0, t1);
// Note: c0 and c1 must be non negative.
static INLINE void highbd_multiplication_and_add_sse2(
const __m128i in0, const __m128i in1, const int c0, const int c1,
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