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

Does ippiConvert_16u8u_C3R discard MSB or LSB

royvm101
Beginner
268 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
268 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
268 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