Community
cancel
Showing results for 
Search instead for 
Did you mean: 
royvm101
Beginner
95 Views

Does ippiConvert_16u8u_C3R discard MSB or LSB

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

igorastakhov
New Contributor II
95 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

Reply