Summary: | oil_scalarmultiply_s32_ns | ||
---|---|---|---|
Product: | liboil | Reporter: | Stefan Kost <ensonic> |
Component: | unknown | Assignee: | David Schleef <ds> |
Status: | NEW --- | QA Contact: | David Schleef <ds> |
Severity: | enhancement | ||
Priority: | high | CC: | slomo |
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Stefan Kost
2006-05-29 05:47:14 UTC
What about having oil_scalarmultiply_s32_ns (int32 *d, int32 *s1, int32 *s2_1, int32 *s2_2, int n) which does if (*s2_1 < *s2_2) for (i = 0; i < n; i++) { d[i] = (s1[i] * (*s2_1)) / (*s2_2); } else for (i = 0; i < n; i++) { d[i] = CLAMP ((s1[i] * (*s2_1)) / (*s2_2), MININT32, MAXINT32); } Only needs to take care of putting s1[i] * (*s2_1) into int64 (and docs should say that it does clipping). IIRC MMX or MMXExt provides something to multiply and store in the next larger value type so it could be implemented for this at least... or was it some version of SSE? Whatever, if the API is fine I'll look it up again :) Also this function could be made available for 8 and 16 bits maybe, not sure about 64 or 24 bits... |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.