Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Does ippiConvert_16u8u_C3R discard MSB or LSB

royvm101
Beginner
561 Views
1. Does ippiConvert_16u8u_C3R discard the most significant bits or the least significant bits :

2. Does the inverse functin, ippiConvert_8u16u_C3R copy the source 8 bits to the MSB or the LSB of the 16 bits destination.

Could not find details in the Intel's IPP manual.

0 Kudos
2 Replies
Jeffrey_M_Intel1
Employee
561 Views

I'm not sure if this is a complete answer to your question, but the result of the 16u8u conversion should be equivalent to an (Ipp8u) cast on all image values. The inverse should be equivalent to casting each byte to Ipp16u. If these functions do something different than standard casting (discard MSB to reduce bit depth, fill LSB to increase bit depth) please let us know.

Regards,

Jeff

0 Kudos
igorastakhov
New Contributor II
561 Views
By default all conversions in IPP are done with saturation - so for each pixel operation is the next:

for( n = 0; n < width; n++ ) {

if( src >= IPP_MAX_8U ) {

dst = IPP_MAX_8U;

} else {

dst = (Ipp8u)src;

}

}

Regards,
Igor

0 Kudos
Reply