ippsDecodeLZO_8u performance issue

ippsDecodeLZO_8u performance issue

I found the API   ippsDecodeLZO_8u definition in Ippdc.h:

/* /////////////////////////////////////////////////////////////////////////////
// Name: ippsDecodeLZO_8u
// Purpose: decompresses specified input buffer to output buffer, returns decompressed data length
//
// Arguments:
// pSrc pointer to input buffer
// srcLen input data length
// pDst pointer to output buffer
// pDstLen pointer to output data length variable. Initially contains output buffer length
//
// Return:
// ippStsNullPtrErr one of the pointers is NULL
// ippStsDstSizeLessExpected output buffer is too short for compressed data
// ippStsSrcSizeLessExpected input buffer data is not complete, i.e. no EOF found
// ippStsBrokenLzoStream ippsDecodeLZOSafe_8u detected output buffer boundary violation
// ippStsNoErr no error detected
//
*/

If I passed the argument pDstlen (value = 0), the performance of ippsDecodeLZO_8u is very low. But If I passed the pDstlen (value = real output buffer length ), the performance is improved. 

some misunderstanding:

  • I don't kown why the return code is always 'ippStsNoErr' when I passed the argument  pDstlen (value = 0), is right?
  • If IPP allows user call the API  ippsDecodeLZO_8u by passing the  argument   pDstlen (value = 0), why the performance is lower than I passed the real output buffer length . I think IPP will malloc additional buffer to support the situation that given argument pDstlen < decompressed_len. So this action willmake performance decline. Is right?

Regards,

Haixiao

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Are you linking with the single threaded or multithreaded libraries? Which version are you using?

Citazione:

Chuck De Sylva (Intel) ha scritto:

Are you linking with the single threaded or multithreaded libraries? Which version are you using?


Hi, sylva

My applications linked with the single threaded libraries, and the IPP version is 7.1.0.

Regards,
Haixiao

>>...why the return code is always 'ippStsNoErr' when I passed the argument pDstlen (value = 0)...

It looks like inconsistency with input parameters validation in the function. Ideally, it should look like:

// Note: I skip all the rest verifications to simplify case
...
if( pDst != NULL && pDstLen != 0 )
{
// Some processing and exit from the function with ippStsNoErr
}
else
{
// pDst == NULL && pDstLen == 0
// or
// pDst != NULL && pDstLen == 0
// or
// pDst == NULL && pDstLen != 0
// Error in a value of input parameter and exit from the function with some error
}
...

Accedere per lasciare un commento.