- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How does ippiMalloc work? Has it got anything to do with ippsMalloc?
If I want to iterate thru the buffer in a linear fashion most of the times, can I allocate buffer using ippsMalloc instead of ippiMalloc?
Also where can I find code examples for different filter functions.
Most of the times my code crashes where I call a filter function,
and then call ippiFree on the source buffer.
TIA,
Vinay
How does ippiMalloc work? Has it got anything to do with ippsMalloc?
If I want to iterate thru the buffer in a linear fashion most of the times, can I allocate buffer using ippsMalloc instead of ippiMalloc?
Also where can I find code examples for different filter functions.
Most of the times my code crashes where I call a filter function,
and then call ippiFree on the source buffer.
TIA,
Vinay
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vinay,
Did you look at IPPI Manual, chapter 9 "Filtering Functions"? It contains description and small, simple samples how to call IPP filtering functions.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
Thanks for the reply. I solved my issue of crashes with ippiFilter function.(wasn't offsetting the pointer correctly)
But my main question is about ippiMalloc and ippsMalloc.
Also, currently we use IPP 4.0. Is there any performance advantage to upgrade to IPP 4.1?
TIA,
Vinay
Thanks for the reply. I solved my issue of crashes with ippiFilter function.(wasn't offsetting the pointer correctly)
But my main question is about ippiMalloc and ippsMalloc.
Also, currently we use IPP 4.0. Is there any performance advantage to upgrade to IPP 4.1?
TIA,
Vinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vinay,
I glad to hear that you solved your problem. Regarding IPP memory allocation functions:
the only difference between ippsMalloc and ippiMalloc is that the first one is allocata 1D array and the second one is allocate 2D array. Of course you should use appropriate free functions, ippsFree for ippsMalloc but ippiFree for ippiMalloc.
Is it info you asked about?
Regarding your question about IPP v4.1, of course, IPP v4.1 contains more preferable to use because of more optimization, new platform support (EM64T), more functionality and so on.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Frequent, I allocate the memory aligned to 4-byte boundary for WindowsDIB.
I use notippiMalloc but ippsMalloc.
samlple
int main(int argc, char* argv[])
{
Ipp8u * pBuf;
Ipp8u * pTmp;
int ImgW, ImgH, Step;
IppStatus Status;
Ipp8u Value;
IppiSize RoiSize;
int i;
{
Ipp8u * pBuf;
Ipp8u * pTmp;
int ImgW, ImgH, Step;
IppStatus Status;
Ipp8u Value;
IppiSize RoiSize;
int i;
ImgW = 10; ImgH = 10;
Step = (ImgW + 3) & (~3);
pBuf = ippsMalloc_8u(Step * ImgH);
// pBuf = ippiMalloc_8u_C1(ImgW, ImgH, &Step);
Step = (ImgW + 3) & (~3);
pBuf = ippsMalloc_8u(Step * ImgH);
// pBuf = ippiMalloc_8u_C1(ImgW, ImgH, &Step);
Value = 5;
RoiSize.width = ImgW; RoiSize.height = ImgH;
Status = ippiSet_8u_C1R(Value, pBuf, Step, RoiSize);
RoiSize.width = ImgW; RoiSize.height = ImgH;
Status = ippiSet_8u_C1R(Value, pBuf, Step, RoiSize);
pTmp = pBuf;
for ( i = 0; i < Step * ImgH; i++ )
{
printf("%d ", *pTmp); pTmp++;
}
for ( i = 0; i < Step * ImgH; i++ )
{
printf("%d ", *pTmp); pTmp++;
}
ippsFree(pBuf);
// ippiFree(pBuf);
// ippiFree(pBuf);
return 0;
}
}

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page