You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
abs() for integers would be helpful for JPEG XL - we predict pixels from their neighbours and compute the absolute error.
On x86 and ARM, INT32_MIN etc. are unchanged - negating them leads to the same result.
Without this operation, I think we could do u32x4_min(x, neg(x)), where neg(x) is either ~x + 1 or _mm_sign_epi32(x, something_negative), or whatever wasm_i32x4_neg uses, so about 3 instructions. By contrast, abs() can be a single instruction on x86 (_mm_abs_epi8..32) and ARM (vabsq_s8..32).
Activity
Maratyszcza commentedon Jan 20, 2020
There is PR #128 that propose integer absolute value instructions.
jan-wassenberg commentedon Jan 20, 2020
Oh, nice! Sorry about the duplication, I only checked for other issues, not PRs.
dtig commentedon Feb 18, 2020
Closing as duplicate of #128 which is now merged.