Questions for using IPP

Questions for using IPP

Hi there,

I'm a beginner with the IPP. I have the following questions.

Is there a quick and accurate conversion between a unsigned and signed 16-bits integer thatis provided by IPP?

Is there a comprehensive explanation on the definition for setp and roi and the relationship between them? I have looked at the header file, ipp.h already, but I'm still not fully understand what they mean.

Regards,

Kennant

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

Hi Kennant,

I think I can answer your second question.

I don't know what 'setp' is but I can explain about roi usage.

Basically, you can give an IPP function a pointer to the start of your data. When there is no ROI, this would usually be the (0,0)-origin of your image, or the address of the first element of your data array.

Since, IPP assumes that the data is contigous it must be told how to treat this data as a 2D array (i.e. image), hence it must get the width of the image, so it can distinguish between the image rows.

The width is given through the step arguments. This argument says how many array elements there are from the current one to the one right belowit on the next row.

Using this scheme, it is easy to define ROIs, by setting the source pointer to the ROI starting pixel. The image step width, will always bring you to the pixel right below it on the next row.

The roiSize argument tells the IPP function the actual size of the roi.

Note: In my description I assumed a top-left image.

The step width argument is a very useful and flexible representation of the width, since it can naturally allow for image right-padding (e.g.for better MMX performance or display) or for working of interlaced fields.

I hope this helps,

Adi

Hi Kennant,

welcome to IPP forum, just remind, if you want you can introduce yourself in Introdution topic, it is on the top of forum.

Regarding your first question,
it is possible to use just type casting, is not it?

Adi, thank you very much for complete and clear explanation of ROI. You help me a lot, because I was too busy last days and was not able to communicate.

Regards,
Vladimir

Always glad to be of service :-).
Besides, who knows, I might get the IPP book thanks to this post ;-).
Adi

Leave a Comment

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