Parameter issue in ippiHLSToBGR_8u_P3C3R

Parameter issue in ippiHLSToBGR_8u_P3C3R

 I am working with ipp ver 7.0 build 205.7, from Jul 11 2010.

 The command ippiHLSToBGR_8u_P3C3R seems to have problems with the first parameter. It doesn't accept this parameter:

 unsigned char *m_pHls3Buffer[3];

 And returns the error message:

 error C2664: 'ippiHLSToBGR_8u_P3C3R' : cannot convert parameter 1 from 'unsigned char *[3]' to 'const Ipp8u *[]'

 However, its twin brother, ippiBGRToHLS_8u_C3P3R doesn't have any problems with the very same parameter (third parameter) few lines before.

 All other tries for casting and feeding other types of parameters fails. It even success to inform me that “cannot convert parameter 1 from Ipp8u *[]' to 'const Ipp8u *[]'”.

 Thanks for your advice.

 

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

Hi,

It's compilation time diagnostics. Try the following:

#include <ippcc.h>
int main()
{
    unsigned char *m_pHls3Buffer[3];
    int srcStep, dstStep;
    IppiSize roiSize;
    Ipp8u *pDst;
    ippiHLSToBGR_8u_P3C3R((const Ipp8u**)m_pHls3Buffer, srcStep, pDst, dstStep, roiSize);
}

Regards,
Sergey

Regards,
Sergey

I'd like to add that:

>>...
>>error C2664: 'ippiHLSToBGR_8u_P3C3R' : cannot convert parameter 1 from 'unsigned char *[3]' to 'const Ipp8u *[]'
>>...

is the error from C++ compiler and you'll need to cast types properly ( see Sergey Khlystov example ). In a couple of words: you did not use const specificator and the compilation error is absolutely correct.

>>...However, its twin brother, ippiBGRToHLS_8u_C3P3R doesn't have any problems...

This is how these two IPP functions ( not commands ) are declared:

[ ippcc.h ]

...
IPPAPI( IppStatus, ippiHLSToBGR_8u_P3C3R, ( const Ipp8u *pSrc[3], int srcStep, Ipp8u *pDst, int dstStep, IppiSize roiSize ) )
...
IPPAPI( IppStatus, ippiBGRToHLS_8u_C3P3R, ( const Ipp8u *pSrc, int srcStep, Ipp8u *pDst[3], int dstStep, IppiSize roiSize ) )
...

and I don't see any errors with declarations.

Thanks,

The casting to const solved the problem.

 

Eyal

Leave a Comment

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