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 has been 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).
Has this been considered/discussed already?
The text was updated successfully, but these errors were encountered:
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).
Has this been considered/discussed already?
The text was updated successfully, but these errors were encountered: