Could scaleFactor be negative?

Could scaleFactor be negative?

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);


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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)


Leave a Comment

Please sign in to add a comment. Not a member? Join today