I'm using the example code from Intel® Integrated Performance Primitives Reference Manual, Volume 1: Signal Processing on LZSS Compression. This document indicates that some of the functions have been Deprecated. Two of the function used in the example are part of these deprecated function. The first one is [cpp]IppStatus ippsEncodeLZSSInitAlloc_8u (IppLZSSState_8u** ppLZSSState);[/cpp] and the second one is [cpp]void ippsLZSSFree_8u (IppLZSSState_8u* pLZSSState);[/cpp] The warning when I use ippsEncodeLZSSInitAlloc() indicates that I should use the GetSize and Init pair to replace this functionality. But there is no corresponding functions indicated in place of LZSSFree. My research indicate the reason for these function being deprecated is that Internal memory allocation will not be supported at some point. This indicates to me that I will need to do the memory allocation, but I don't understand how to do this. The above document indicates that function ippsEncodeLZSSInit_8u(), initializes the LZSS state structure pLZSSState in the external buffer. But I don't see were or how the external buffer is allocated. But when I call ippsLZSSGetSize() it returns a size indicating that the buffer has been allocated. If it has been allocated, how do I de-allocate it? Or is that being done automatically? Is there some way to change the size of this buffer?
Yolanda Maxwell wrote:Hi Yolanda, You can use any method. There is no Intel-specific memory allocation procedures, only recommendations to use aligned addresses, which come from Intel architecture specifics. IPP's memory management functions are just wrappers around OS' functions (with 32-byte address alignment for better performance). "new" and "delete" operators are also ok. Regards, Sergey
I can use any dynamic memory allocation method (ie new) or does it need to be one specific to Intel?
Yolanda Maxwell wrote:Ipp8u is typedef for "unsigned char". So, they are interchangeable. Regarding deprecated functions, we are working on cleaning the sample source files from deprecated functions for new release. Below is an example of how to initialize LZSS structure for encoding (decoding is the same) without extra status checking and failure returns for simplicity. I am not sure how it will look in this new forum engine, though )) [cpp] IppLZSSState_8u * pLZSSState = NULL; int iLZSSStateSize; st = ippsLZSSGetSize_8u(&iLZSSStateSize); pLZSSState = (IppLZSSState_8u*)ippsMalloc_8u(iLZSSStateSize); st = ippsEncodeLZSSInit_8u(pLZSSState); /* LZSS Encoding, buffer flushing ... */ ippsFree(pLZSSState); [/cpp] On C++ it will be like [cpp] pLZSSState = (IppLZSSState_8u*) new Ipp8u[iLZSSStateSize]; [/cpp] and [cpp] delete  (Ipp8u*)pLZSSState; [/cpp] Regards, Sergey
What is the data type? Char or Ipp8u or ?? Do you have any examples using and external buffer? It would really help I had some simple examples that didn't use the deprecated functions. Not just for LZSS Compression, but also for the other methods of data compression supported.