124 const uint8_t *
dataP,
143 const uint8_t *sP =
dataP;
144 const uint32_t sourceOffset = offset -
META_LENGTH;
151 stream.
seek(destOffset);
153#if MULTISENSE_WIRE_BITS_PER_PIXEL == 12 && MULTISENSE_API_BITS_PER_PIXEL == 16
157 uint16_t *dP =
reinterpret_cast<uint16_t*
>(stream.
peek());
159 for(uint32_t i=0; i<count; i+=2, sP+=3) {
160 dP[i] = ((sP[0] ) | ((sP[1] & 0x0F) << 8));
161 dP[i+1] = ((sP[1] >> 4) | (sP[2] << 4) );
164#elif MULTISENSE_WIRE_BITS_PER_PIXEL == 12 && MULTISENSE_API_BITS_PER_PIXEL == 32
168 float *dP =
reinterpret_cast<float*
>(stream.
peek());
170 for(uint32_t i=0; i<count; i+=2, sP+=3) {
172 dP[i] =
static_cast<float>((sP[0] ) | ((sP[1] & 0x0F) << 8)) / 16.0f;
173 dP[i+1] =
static_cast<float>((sP[1] >> 4) | (sP[2] << 4) ) / 16.0f;
177#error MULTISENSE_WIRE_BITS_PER_PIXEL and MULTISENSE_API_BITS_PER_PIXEL not supported