RoiShift Parameter

To illustrate the concept of the roiShift (region of interest shift) parameter, have another look at Figure “Layout Description”. In the described objects, odd columns of continuous matrices and odd elements of continuous vectors are processed. However, to process even columns or elements, an additional parameter may be needed to specify the shift (in this case, one-element shift right).

If the Standard description method is used, to describe data shifted this way, it is sufficient to shift only one data pointer. However, with the Layout method used, it is necessary to shift every pointer in the layout array by the same number of elements (in this case, one), or bytes. Similar problem arises when the Pointer description is used: to shift the mask, all elements in the pointer array must be shifted accordingly. This shift is specified using the roiShift parameter, which is required for Pointer and Layout description methods. RoiShift specifies the number of bytes by which IPP MX function will shift each pointer in the pointer array. If no shifting is needed (as in Figure “Pointer Description” and Figure “Layout Description”), roiShift is set to 0.

Note iconNote

RoiShift parameter is measured in bytes. RoiShift value can be equal to 0. Otherwise, roiShift value must be positive and divisible by the size of the data type. To convert roiShift value measured in elements to the number of bytes you should just multiply it by the size of the data type.

Pointer Description with RoiShift

Figure “Pointer Description with RoiShift”, case A shows the matrix array that is a result of Pointer description with non-zero roiShift parameter.

Figure “Pointer Description with RoiShift”, case B shows the vector array that is a result of Pointer description with non-zero roiShift parameter.

The following fragment of C code specifies roiShift for both A and B cases:

// Set roiShift
roiShift = 2*sizeof(32f);

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.