Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Unpack 12 bit image into 16 bit

steffenroeber
Beginner
1,465 Views

Hi,

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?

Best regards

Steffen

0 Kudos
6 Replies
Ruqiu_C_Intel
Employee
1,465 Views

Hi Steffen,

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

Best Regards,

Ruqiu

 

 

Adriaan_van_Os
New Contributor I
1,465 Views

IPP has ippiLShiftC, if that's useful. Apple vImage has vImageConvert_12UTo16U

Regards,

Adriaan van Os

 

Ruqiu_C_Intel
Employee
1,465 Views

IPP will support Unpack 12 bit image into 16 bit in the future release.

Thanks,

Ruqiu

hackel6
Beginner
839 Views

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:

 

2020

System Requirements  Bug Fix Log  Installation Guide

Update 3

What's New in Intel® IPP 2020 Update 3

  • 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. 

Thanks!

-Brian

Andrey_B_Intel
Employee
817 Views

Hi.

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

Andrey

IPP

 

hackel6
Beginner
807 Views

Audrey,

Thanks for your reply, but i do not see this function signatures in any of the IPP documentation online. Where is the documentation for these methods? Are they included in v2020 Update 3?

 

Thanks,

-Brian

Reply