hi,
There is an interesting example here above of using DCT8x8Fwd with 16u data :
http://software.intel.com/sites/products/documentation/doclib/ipp_sa/71/...
I'm trying to obtain the same result but with 32f using DCTFwd. Here is my code for initialisation, getting buffer size and then running transform :
int main(){
IppiDCTFwdSpec_32f* pDCTSpecFwd = NULL;
int pBufferSize = 0; IppiSize roi = {8,8};
IppStatus statusAlloc = ippiDCTFwdInitAlloc_32f(&pDCTSpecFwd, roi, ippAlgHintFast);
if(statusAlloc != ippStsNoErr)
std::cout << "Failure when allocating the DCT context structure"<< std::endl;
IppStatus statusBuffer = ippiDCTFwdGetBufSize_32f(pDCTSpecFwd, &pBufferSize);
if(statusBuffer != ippStsNoErr)
std::cout << "Failure when allocating the DCT buffer"<< std::endl;
ipp8u *buffer = ippsMalloc_8u(pBufferSize);
Ipp32f x[64] = {0};
Ipp32f Tx[64] = {0}; // DCT result
int i;
for( i=0; i<8; ++i ) {
ippiSet_32f_C1R( (Ipp32f)i, x+8*i+i, 8*sizeof(Ipp32f), roi );
--roi.width;
--roi.height;
}
status = ippiDCTFwd_32f_C1R(x, 8*sizeof(Ipp32f), Tx, N*sizeof(Ipp32f), pDCTSpec, pBuffer);
}
The main runs correctly but unfortunately i haven't obtain same result as the exemple
Maybe i have done something wrong?
thanks for any help.