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

Help How to use the Function of the Polyphase analysis Filterbank of the ipp

andreas_brenkde_thal
281 Views

Hello Im Andreas

I want to split an input signal into 32 Suband. to achieve it, im using the polyphase Analysis Filterbank functions from the ipps library.
I write this small code but it not work corretly because after calling the main function (ippsAnalysisFilter_SBR_RToC_32f32fc_D2L) i receive "ippStsContextMatchErr" error. Please can somebody help me to know what it wrong in my source?

IppStatus ippRes;
Ipp32s pSizeSpec, pSizeInitBuf, pSizeWorkBuf;
Ipp32fc* pDst[32];

int iChannel = 32;

IppsFilterSpec_SBR_C_32fc** ppFilterSpec;
Ipp8u* pMemSpec;
Ipp8u* pInitBuf;
Ipp8u* pWorkBuf;

int NumLoop= NUM_TIME_SLOTS * RATE;// = 16*2 = 32
int offset = SBR_TIME_HFGEN ; // 8 siehe (sbr_dec_settings.h)
int kx = 0; //first Subband 0<=kx<=32


// get size need for the analysisfilter
ippRes = ippsAnalysisFilterGetSize_SBR_RToC_32f32fc(&pSizeSpec,&pSizeInitBuf,&pSizeWorkBuf);
if (ippRes != ippStsOk)
{
printf("error during getsize for the Analysis Filter");
return 1;
}

// Memory allocation

pInitBuf = (Ipp8u*)calloc(1,pSizeInitBuf);
pWorkBuf = (Ipp8u*)calloc(1,pSizeWorkBuf);


// Ipp8u* pAnalysisFilterSpec[2];

pMemSpec = (Ipp8u*)calloc(1,pSizeSpec);
ppFilterSpec = (IppsFilterSpec_SBR_C_32fc**)calloc(iChannel,sizeof(IppsFilterSpec_SBR_C_32fc*));

for (int i=0;i {

if(pSizeSpec !=0)
{
ppFilterSpec =(IppsFilterSpec_SBR_C_32fc*)calloc(1,pSizeSpec);

}
else
{
ppFilterSpec = NULL;

}

}


ippRes = ippsAnalysisFilterInit_SBR_RToC_32f32fc(ppFilterSpec,pMemSpec,pInitBuf);
// }
if (ippRes != ippStsOk)
{
printf("error during initilaisation for the Analysis Filter");
return 1;
}


//Filtering

ippRes = ippsAnalysisFilter_SBR_RToC_32f32fc_D2L((constIpp32f*)pSrc->DataPtr(),pDst,SBR_TABLE_QMF_WINDOW_320,
NumLoop,offset,kx,ppFilterSpec[5],pWorkBuf);

if (ippRes != ippStsOk)
{
printf("error during filtering for the Analysis Filter");
return 1;
}

Thanks you


Andreas
0 Kudos
0 Replies
Reply