Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Parameter issue in ippiHLSToBGR_8u_P3C3R

l-eyal
Beginner
299 Views

 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
299 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

0 Kudos
SergeyKostrov
Valued Contributor II
299 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.
0 Kudos
SergeyKostrov
Valued Contributor II
299 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.
0 Kudos
l-eyal
Beginner
299 Views

Thanks,

The casting to const solved the problem.

 

Eyal

0 Kudos
Reply