Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Could scaleFactor be negative?

k_kun_wang
Beginner
366 Views

I am wondering whether I could setscaleFactor to be negative integer in the function

IppStatus ippsMul_16s_ISfs(const Ipp16s * pSrc, Ipp16s * pSrcDst, int len, int scaleFactor);

Thanks.

0 Kudos
1 Reply
Intel_C_Intel
Employee
366 Views
Hi,
Yes. The scale factor can be negative, positive, or zero. Scaling of an integer result is done by multiplying the output vector values by 2** (-scaleFactor ) before the function returns.
if (scaleFactor > 0) pDst = output >> scaleFactor
if (scaleFactor < 0) pDst = output<< ( - scaleFactor)
Thanks
0 Kudos
Reply