28.03.2017 Views

Primitives

ippi_0

ippi_0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Intel ® Integrated Performance <strong>Primitives</strong> Concepts 2<br />

This notation means that the ippiDilate function has three flavors for a not-in-place operation, which<br />

process 8-bit unsigned data (of Ipp8u type) and differ in the number of channels in processed images. These<br />

flavors have the following prototypes:<br />

IppStatus ippiDilate_8u_C1R(const Ipp8u* pSrc, int srcStep,<br />

roiSize);<br />

IppStatus ippiDilate_8u_C3R(const Ipp8u* pSrc, int srcStep,<br />

roiSize);<br />

IppStatus ippiDilate_8u_AC4R(const Ipp8u* pSrc, int srcStep,<br />

IppiSize roiSize);<br />

Ipp8u* pDst, int dstStep, IppiSize<br />

Ipp8u* pDst, int dstStep, IppiSize<br />

Ipp8u* pDst, int dstStep,<br />

Thus, to obtain the full name and parameters list for the specific function flavor, not listed directly, do the<br />

following:<br />

1. Choose the function operation mode (denoted in this document as Case 1 , 2 and so on) and look in<br />

the table for the supported data types and descriptors.<br />

2. Set the mod field in the function name as the concatenation of the chosen data type and descriptor,<br />

delimited by the underscore.<br />

3. Use the respective template, substituting all the datatype fields in the parameters list with the chosen<br />

data type. Note that Ipp prefix is written before the datatype in the parameters list (see Data Typesin<br />

this chapter for details).<br />

Example<br />

To get the prototype for the ippiSet function flavor that sets each channel of a 3-channel destination image<br />

to 16-bit signed values, choose Case 2: Setting each color channel to a specified value and use<br />

datatype = 16s, descriptors = C3R.<br />

After substituting the mod field with 16s_C3R, obtain the required prototype as<br />

ippiSet_16s_C3R(const Ipp16svalue[3], Ipp16* pDst, int dstStep, IppiSize roiSize);<br />

Rounding Mode<br />

As many Intel IPP functions have to meet the bit-exact requirement, image processing functions use<br />

rounding. The default rounding mode for all functions can be described as "nearest even", that is the fixed<br />

point number x=N + α, 0 ≤α < 0, where N is an integer number, is rounded as given by:<br />

For example, 1.5 is rounded to 2, and 2.5 to 2.<br />

Some image processing functions have additional rounding modes, which are set by the parameter<br />

roundMode.<br />

Integer Result Scaling<br />

The default for image processing functions is to saturate the results without scaling them.<br />

Some image processing functions operating on integer data use scaling of the internally computed output<br />

results by the integer scaleFactor, which is specified as one of the function parameters. These functions<br />

have the Sfs descriptor in their names.<br />

27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!