diff options
Diffstat (limited to 'src/qhyccd')
-rw-r--r-- | src/qhyccd/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qhyccd/mod.rs b/src/qhyccd/mod.rs index becb698..5300fe1 100644 --- a/src/qhyccd/mod.rs +++ b/src/qhyccd/mod.rs @@ -124,6 +124,15 @@ pub fn fix_channels_and_endianness(dataslice: &mut [u8]) { let g_low = dataslice[i * 6 + 2]; dataslice[i * 6 + 2] = dataslice[i * 6 + 3]; dataslice[i * 6 + 3] = g_low; + + if false { + for e in 0..3 { + let el = ((dataslice[i * 6 + e * 2] as u16) << 8) | (dataslice[i * 6 + e * 2 + 1] as u16); + let el = el.saturating_mul(128); + dataslice[i * 6 + e * 2] = (el >> 8) as u8; + dataslice[i * 6 + e * 2 + 1] = el as u8; + } + } } } |