Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Could scaleFactor be negative?

k_kun_wang
Beginner
395 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
395 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