Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

jpeg decoder problem

fanguts
Beginner
94 Views

Hi : I am using an example in UIC document 3-32. This simple example only require to include "uic_jpeg_dec.h". when I build it and gotone error: error C3861: 'AlignStep': identifier not found
Question1: I wonder where AlignStep is defined ?

Question2:
I saw in this example: dataOrder.LineStep() [0] = AlignStep(geometry.RefGridRect().Width() *nOfComponents);
If I use dataOrder.LineStep() [0]=((geometry.RefGridRect().Width() * nOfComponents *du+ 3) & ~3) to replace AlignStep(), the program can be build.
After call ReadData(), I got depressed data from imageCn.Buffer().DataPtr(). How can I know the buffer data is correct?
I also create a data buffer with more than enough size (> image width X height X Chanel X sizeof(Ipp8u) ). I am trying to memcpyimageCn.Buffer().DataPtr() to my own data buffer, but the program crash. I think the problem is not my buffer size but imageCn.Buffer().DataPtr() . please give me suggestion how can I know problem in imageCn.Buffer().DataPtr()?

Question 3;
I want to copy the depressed image data to a buffer -myBuf (BYTE type) and sent the data from myBuf to our application. I create: BYTE *myBuf (also allocation enough size).
How can I copy or send the data from imageCn.Buffer().DataPtr() to myBuf ? I used memcpy but got problem.
Thank you for helps

0 Kudos
2 Replies
Vladimir_Dudnik
Employee
94 Views
by the way, you may avoid copying data from UIC ImageBuffer to your application buffer. Did you notice Attach() method in UIC ImageBuffer object? Instead of allocating pixels memory in UIC you mayattach your own memory buffer. Just need to be careful with correct buffer description (image step, data type and so on)

Vladimir


fanguts
Beginner
94 Views
by the way, you may avoid copying data from UIC ImageBuffer to your application buffer. Did you notice Attach() method in UIC ImageBuffer object? Instead of allocating pixels memory in UIC you mayattach your own memory buffer. Just need to be careful with correct buffer description (image step, data type and so on)

Vladimir



thanks Vladimir, now the my jpeg decorder is work
Reply