Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
7 Views

jpeg decoder problem

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
Highlighted
7 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


0 Kudos
Highlighted
Beginner
7 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
0 Kudos