Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

IPP in Kernel

harald85
Beginner
123 Views
Hi

I am using the IPP in the kernel mode if windows an have a question about allocating memory. I have an exti.c file where the malloc function is replaced with the ExAllocatePool function from MS. When I initialize an Codec he use the ippsMalloc functions. When I now initialize an codec I see with an trace that he use the new malloc function with the ExAllocatePool. I also got no bluescreen but my question now is if the codec allocates more memory during using it?

Because when I look at the USC_CvtToLaw function there is an ippsMalloc_16s but I get no Trace druing using that. I see that this is only done be MuLaw and not for Alaw.

Harald
0 Kudos
3 Replies
Vyacheslav_Baranniko
New Contributor II
123 Views
Quoting - harald85
Hi

I am using the IPP in the kernel mode if windows an have a question about allocating memory. I have an exti.c file where the malloc function is replaced with the ExAllocatePool function from MS. When I initialize an Codec he use the ippsMalloc functions. When I now initialize an codec I see with an trace that he use the new malloc function with the ExAllocatePool. I also got no bluescreen but my question now is if the codec allocates more memory during using it?

Because when I look at the USC_CvtToLaw function there is an ippsMalloc_16s but I get no Trace druing using that. I see that this is only done be MuLaw and not for Alaw.

Harald
Hi
A few preface words about USC.
USC interfaceis allocation-free interface, i.e.it does not allow memory to be allocated in USCI functions (see usc_manual). USC interface functions aredefined invariousheaders(see./speech-codecs/core/usc/include/usc*.h).These functions are only accessible thru an usc algorithm object. Various USC algorithms alloc-free implementations are provided under ./speech-codecs/codec/usc/.

Oppositely,a sample codes provided under ./speech-codecs/application/are not alloc-free.These sample applications are considered as example how-to use USC algorithms. Of course, there is no restrictions toallocate memory for applicationneeds. IPP samples generally alocate memory using IPP Malloc. In kernel mode I would recommend youtouseyourown implementation forippsMalloc* functions.
In usccodec.hdefineyour ownmemory allocation functions, for example :
void*myMalloc(int size);
void*myFree(void* ptr);
Redefine IPP Malloc functions:
#define ippsMalloc_8u myMalloc
#define ippsMalloc_16s myMalloc
#define ippsFree myFree
And implementmyMallocusingWindows functions likeExAllocatePoolWithTag, ExFreePool etc.

Vyacheslav

harald85
Beginner
123 Views
Problem solved!


Quoting - vbaranni
Hi
A few preface words about USC.
USC interfaceis allocation-free interface, i.e.it does not allow memory to be allocated in USCI functions (see usc_manual). USC interface functions aredefined invariousheaders(see./speech-codecs/core/usc/include/usc*.h).These functions are only accessible thru an usc algorithm object. Various USC algorithms alloc-free implementations are provided under ./speech-codecs/codec/usc/.

Oppositely,a sample codes provided under ./speech-codecs/application/are not alloc-free.These sample applications are considered as example how-to use USC algorithms. Of course, there is no restrictions toallocate memory for applicationneeds. IPP samples generally alocate memory using IPP Malloc. In kernel mode I would recommend youtouseyourown implementation forippsMalloc* functions.
In usccodec.hdefineyour ownmemory allocation functions, for example :
void*myMalloc(int size);
void*myFree(void* ptr);
Redefine IPP Malloc functions:
#define ippsMalloc_8u myMalloc
#define ippsMalloc_16s myMalloc
#define ippsFree myFree
And implementmyMallocusingWindows functions likeExAllocatePoolWithTag, ExFreePool etc.

Vyacheslav


Vladimir_Dudnik
Employee
123 Views
Great, thank for your interest to Intel IPP Speech codecs

Regards,
Vladimir

Reply