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

ippiHistogramRange_16u_C3R

honsinger
Beginner
702 Views

Hello,

We are getting ready to release a product that is very image intensive. So far, the intel ippi library has been a godsend,making our speed of exectutionvery competitive. We are very happy.

A couple of days ago we noticed that theippiHistogramRange_16u_C3R function appeared to be working **much** slower than we thought it was working before. I have tracked its use on 100,000 16 bit RGB images and there **appears** to be no memory leak. Other intel functions that we have wrapped work fine on the same 16 bit images.

We recently upgradedto the most recent release of the library. Before this upgrade, we were using the most current version.

Question 1) Is there a known problem with the latest version of ippiHistogramRange_16u_C3R?

Question 2) Speedwise, would there be much of a difference if we were to replace this intel call with ippiHistogramEven ?

Question 3) Where can I find a buglist for the most current intel ippi library?

Below is the initialization code that we use to calculate the histogram of an 8 or 16 bit, 1 or 3 band image. Our image class organized pixel data identically to the native way of Microsoft. Note that we use the intel functions again and again using this format with success.

Thanks very much,

Chris Honsinger

CHist::CHist(CImage *inim,

int x0,int y0, int x1, int

y1)

{

CImage *in;

bool delete_intermediate=true

;

// if selection is null or selection matches input full dimensions...

if

( (x1-x0)*(y1-y0)==0 || ((inim->get_npix()==(x1-x0+1))&&(inim->get_nlin()==(y1-y0+1))) )

{

// do nothing

in=inim;

delete_intermediate=

false

;

}

else

{

in = inim->pCopy(x0,y0,x1,y1);

}

set_to(in->get_nbits(),in->get_nbands(),TRUE);

// Ipp32s* Exchanger;

Ipp32s* Hist[3];

// = new Ipp32s* [in->get_nbands];

const Ipp32s* Levels[3];

//= new Ipp32s* [in->get_nbands];

Ipp32s *x_axis =

new

Ipp32s [1<get_nbits()];

Ipp32s *y_axis0 =

new

Ipp32s [1<get_nbits()];

Ipp32s *y_axis1 =

new

Ipp32s [1<get_nbits()];

Ipp32s *y_axis2 =

new

Ipp32s [1<get_nbits()];

int

nLevels[3];

for(int

i=0;i<(1<get_nbits());i++)

{

x_axis=i;

y_axis0=0;

y_axis1=0;

y_axis2=0;

}

Hist[0]=y_axis0;

Hist[1]=y_axis1;

Hist[2]=y_axis2;

Levels[0]=x_axis;

Levels[1]=x_axis;

Levels[2]=x_axis;

nLevels[0]= 1<get_nbits();

nLevels[1]= 1<get_nbits();

nLevels[2]= 1<get_nbits();

IppiSize src = {in->get_npix() , in->get_nlin() };

if

(in->get_nbits()==16 && in->get_nbands()==1 )

{

ippiHistogramRange_16u_C1R(

(Ipp16u*)in->get_data_ptr(),

in->get_row_stride(),

src,

Hist[0],

//( Ipp32s *)&Hist[0][0],

Levels[0],

//(const Ipp32s *)&Levels[0][0],

nLevels[0]);

}

else if

(in->get_nbits()==16 && in->get_nbands()==3 )

{

************************************************************************

printf(

"\nCHist %s"

,ippGetStatusString( ippiHistogramRange_16u_C3R(

(Ipp16u*)in->get_data_ptr(),

in->get_row_stride(),

src,

Hist,

Levels,

nLevels) ));

**********************************************************************

}

else if

(in->get_nbits()==8 && in->get_nbands()==1 )

{

ippiHistogramRange_8u_C1R(

(Ipp8u*)in->get_data_ptr(),

in->get_row_stride(),

src,

Hist[0],

//( Ipp32s *)&Hist[0][0],

Levels[0],

//(const Ipp32s *)&Levels[0][0],

nLevels[0]);

}

else if

(in->get_nbits()==8 && in->get_nbands()==3 )

{

ippiHistogramRange_8u_C3R(

(Ipp8u*)in->get_data_ptr(),

in->get_row_stride(),

src,

Hist,

Levels,

nLevels);

}

// Provision for MS BGR

int

BGR[3];

if

(in->get_nbands()==3&&in->get_nbits()==8)

{

BGR[0]=2;

BGR[1]=1;

BGR[2]=0;

}

else

{

BGR[0]=0;

BGR[1]=1;

BGR[2]=2;

}

for(int

ib=0;ibget_nbands();ib++)

{

for(int

i=0;i<(1<get_nbits());i++)

{

this->set_hist_value(Hist[BGR[ib]],ib,(const float

)i);

}

}

delete [] x_axis;

// = new Ipp32s [1<get_nbits()];

delete [] y_axis0;

// = new Ipp32s [1<get_nbits()];

delete [] y_axis1;

// = new Ipp32s [1<get_nbits()];

delete [] y_axis2;

// = new Ipp32s [1<get_nbits()];

if(delete_intermediate==true) delete

in;

0 Kudos
4 Replies
turks
Beginner
702 Views
ippiHistogramRange_16u_C3R

0 Kudos
Vladimir_Dudnik
Employee
702 Views
It is not clear what exactly issue do you have with ippiHistogramRange_16u_C3R function. You may compare performance of this function we declare in IPP performance system (the data should be available in toolsperfsysdata folder of your IPP installation). Is it close to what you get in your application?
Regards,
Vladimir

0 Kudos
honsinger
Beginner
702 Views
Quoting - Vladimir Dudnik
It is not clear what exactly issue do you have with ippiHistogramRange_16u_C3R function. You may compare performance of this function we declare in IPP performance system (the data should be available in toolsperfsysdata folder of your IPP installation). Is it close to what you get in your application?
Regards,
Vladimir
Vladimir,
Thanks for the speedy response...
The issue is:
ippiHistogramRange_16u_C3R takes over 50 times as long as ippiHistogramRange_8u_C3R

in our application.

ippiHistogramRange_16u_C3R seemed to be much faster before we upgraded libraries. Perhaps this change in speed is due to another problemelsewhere in our application. ippStatus returns a no error code every time ithas executed.

Chris

0 Kudos
Vladimir_Dudnik
Employee
702 Views
According performance measure provided by IPP performance system (available in IPP install package) there is no significant difference in performance for this particular function.

What system you are running on? How do you link IPP statically or dynamically?

Regards,
Vladimir
0 Kudos
Reply