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

ippiDCT with other blocksize (i.e. 4x4 instead of 8x8)

hajo_hoffmann
Beginner
282 Views
Hi,

I try to use the ippiDCT for images with a different blocksize. But it seems to have a hardcoded 8x8 blocksize. Did I miss something?

If it is not possible I have to create my own implementation of the DCT :-/

---

One other issue:

My first experiments with the ippiDCT is not working as expected.

I just tried to calculate the DCT of an IplImage (OpenCV image format) and the inverseDCT of the result ... but I did not get the original image after the second step ... why?

-- Code ----------------------------

// Fwd DCT:

ippStat = ippiDCTFwdInitAlloc_32f (&dctFSpec, ippiROI, ippAlgHintNone);

ippStat = ippiDCTFwd_32f_C3R((Ipp32f*)image->imageData, image->widthStep, (Ipp32f*)dctImg->imageData, dctImg->widthStep, dctFSpec, NULL);


// Inv DCT:

ippStat = ippiDCTInvInitAlloc_32f (&dctISpec, ippiROI, ippAlgHintNone);

ippStat = ippiDCTInv_32f_C3R((Ipp32f*)dctImg->imageData, dctImg->widthStep, (Ipp32f*)tmpImg->imageData, tmpImg->widthStep, dctISpec, NULL);
------------------------------------

best regards
Hajo Hoffmann
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
282 Views
Hi,
IPP DCT functions developed to work with any reasonable ROI sizes (not only 8x8). There can be some difference after Fwd-Inv DCT operations in comparison with original image, mainly because of rounding errors. If you have completely different result you need to check code and data you are using.
Regards,
Vladimir
0 Kudos
Reply