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

when using peek on the memory..

mh_de_ruiter
Beginner
689 Views
when using peek on the memory stack (using clarion)
then how does
* 8u_AC4 looks ?
and
* 32s_AC4
like 8u_AC4
is like for one pixel :
(red) 00000000 (green) 00000000 (blue) 00000000 alpha (00000000)
or not and is it..:
(red) 00 (green) 00 (blue) 00 alpha (00)
i need to know also to understand of how big the imalloc is..(and for swapping into the DC etc.)
i use normal basic api's with prototyping in clarion for windows
it 'works' for now, but i can't (yet) create etc. any picture or use it in combination with normal createcompatiblebitmap / setdibits etc.
i hope deeply someone can explain me the bit logic behind it
(and i understand so far, i do not need any planes)
friendly greetings,
Menno de Ruiter
computerworlds.com
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
689 Views
Hi Menno,
according the IPP Reference Manual, Volume 2 Image and Video Processing, Chapter 3 Supporting Functions, Article Memory Allocation Functions, ippiMalloc allocates aligned memory block of different data types. So, in your case, for 8u_AC4 there will be pixel-interleaved array of 4 channels for Ipp8u data type in each. In case of 32s_AC4 there will be pixel-interleaved array of 4 channels for Ipp32 data type in each.
For example, if you need allocate memory block for 4-channel image of Ipp8u data type with size 4x3 you shoul call
ptr = ippiMalloc_8u_C4(4,3,&step);
And memory pointed by ptr will be like this
c0c1c2c3 c0c1c2c3 c0c1c2c3 c0c1c2c3 p p p p p p p p p p p p p p p p
c0c1c2c3 c0c1c2c3 c0c1c2c3 c0c1c2c3 p p p p p p p p p p p p p p p p
c0c1c2c3 c0c1c2c3 c0c1c2c3 c0c1c2c3 p p p p p p p p p p p p p p p p
where c0, c1, c2, c3 is color channels and p is padding bytes to make 32 byte alignment
Note, ippiMalloc does not assign any values into allocated memory, so memory is not inizialized.
Regards,
Vladimir
0 Kudos
mh_de_ruiter
Beginner
689 Views
Thanks Vdudnik..
Now i understand. Especially that it does not initializes the memory.. because i did not found with peek into memory a nice block of zero's (usually yes although, but not always)
the alligning i do understand also i read a few times over the part in the manual.
My problem is i think that the rest of the functions just don't work on the allocated memory. I get a GPF always whatever function i try upon the imalloc.
would i need a lockbytes orso ?
the return of the imalloc is a pointer to the memory block which i use use in the other functions.. but it just doesn't work. I can't find out because why not.
Thanks,
Menno
0 Kudos
Reply