I have an image given in 12 bit packed format (16 bit gray values but only 12 bits in use). Now I need to unpack it to 16 bit (padded with 4 zero bits). Is there any ipp function that does this job?
- Development Tools
- General Support
- Intel® Integrated Performance Primitives
- Parallel Computing
We support Scale functionalities to convert 8u to 16u, 16s, 32s, 32f, 64f and vice versa. Please raise your new function request for 12bit to 16bit through our online service center at: https://supporttickets.intel.com/?lang=en-US
Ruqiu, do you know what version this will be in? Or perhaps the function signature? I am very interested in this feature so more information would be especially useful. I am trying to quickly translate image data represented like this:
"Each two pixels are ‘packed; into 3 data bytes as follows: the first data byte will contain the 8 most significant bits of the first pixel, while the 4 least significant bits of the second data byte, will contain the 4 least significant bits of the first pixel. The most significant 4 bits of the second data byte will contain the least significant 4 bits of the second pixel, while the third data byte will contain the most significant 8 bits of the second pixel."
into a "normal" 16 bit image where each 2 bytes represents one pixel value.
a normal cpp for-loop is too slow and i'm trying to avoid in-lining assembly code.
On your release notes page, i see the following:
- Extended optimization for Intel® IPP CRC functions on 10th Generation Intel® Core™ processor family.
- Improved performance for Intel® IPP Cryptography RSA single-buffer functions on 10th Generation Intel® Core™ processor family.
- Added conversion of 12 bit images to 16 bits and vice versa.
Is this what you're referring to? if so, what is the method signature? i cannot seem to find anything in the documentation.
It is about new functions in ippcc.h:
IPPAPI(IppStatus, ippiUnpack_12u16u_C1R,(Ipp8u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize))
IPPAPI(IppStatus, ippiPack_16u12u_C1R, (Ipp16u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize))