refactored

This commit is contained in:
2022-02-18 16:08:04 +01:00
parent 83ff4ab112
commit 7a607c6dd1
2 changed files with 27 additions and 30 deletions

View File

@ -251,11 +251,11 @@ void HDF5DataFile::WriteToFile(char *buffer, const int buffersize,
void HDF5DataFile::Convert12to16Bit(uint16_t *dst, uint8_t *src) {
for (int i = 0; i < EIGER_NUM_PIXELS; ++i) {
*dst = (*src++ & 0xFF);
*dst++ |= ((*src & 0xF) << 8);
*dst = (uint16_t)(*src++ & 0xFF);
*dst++ |= (uint16_t)((*src & 0xF) << 8u);
++i;
*dst = ((*src++ & 0xF0) >> 4);
*dst++ |= ((*src++ & 0xFF) << 4);
*dst = (uint16_t)((*src++ & 0xF0) >> 4u);
*dst++ |= (uint16_t)((*src++ & 0xFF) << 4u);
}
}