Community
cancel
Showing results for 
Search instead for 
Did you mean: 
l-eyal
Beginner
31 Views

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.

 

0 Kudos
4 Replies
Sergey_K_Intel
Employee
31 Views

Hi,

It's compilation time diagnostics. Try the following:

[cpp]

#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);
}

[/cpp]

Regards,
Sergey

SKost
Valued Contributor II
31 Views

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.
SKost
Valued Contributor II
31 Views

>>...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.
l-eyal
Beginner
31 Views

Thanks,

The casting to const solved the problem.

 

Eyal