Commit b1e04f7e authored by Steinar Midtskogen's avatar Steinar Midtskogen Committed by Jean-Marc Valin

Improve high bitdepth CLPF by using newly added v128_ssub_u16

Change-Id: I392b801f61b0d3bcd1cd6157ab783f76ea8c9e5e
parent 9b8444a1
......@@ -256,10 +256,8 @@ SIMD_INLINE v128 constrain_hbd(v128 a, v128 b, unsigned int strength,
v128 diff = v128_sub_16(a, b);
const v128 sign = v128_shr_n_s16(diff, 15);
diff = v128_abs_s16(diff);
const v128 zero = v128_zero();
const v128 s = v128_max_s16(
zero, v128_sub_16(v128_dup_16(strength),
v128_shr_u16(diff, dmp - get_msb(strength))));
const v128 s = v128_ssub_u16(v128_dup_16(strength),
v128_shr_u16(diff, dmp - get_msb(strength)));
return v128_sub_16(v128_xor(sign, v128_min_s16(diff, s)), sign);
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