mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-09-11 19:42:37 +02:00
Fix/expand const buffer (#354)
Minor API change: - NDView<T> implicitly converts to NDView<const T> (as std::span in C++20) - expand4to8bit and expand24to32bit now takes a view over const uint8_t to show that the input is not changes closes #291
This commit is contained in:
+2
-2
@@ -144,7 +144,7 @@ uint32_t mask32to24bits(uint32_t input, BitOffset offset) {
|
||||
return (input >> offset.value()) & mask24bits;
|
||||
}
|
||||
|
||||
void expand4to8bit(NDView<uint8_t, 1> input, NDView<uint8_t, 1> output) {
|
||||
void expand4to8bit(NDView<const uint8_t, 1> input, NDView<uint8_t, 1> output) {
|
||||
|
||||
if (2 * input.size() != output.size())
|
||||
throw std::runtime_error(
|
||||
@@ -162,7 +162,7 @@ void expand4to8bit(NDView<uint8_t, 1> input, NDView<uint8_t, 1> output) {
|
||||
}
|
||||
}
|
||||
|
||||
void expand24to32bit(NDView<uint8_t, 1> input, NDView<uint32_t, 1> output,
|
||||
void expand24to32bit(NDView<const uint8_t, 1> input, NDView<uint32_t, 1> output,
|
||||
BitOffset bit_offset) {
|
||||
|
||||
ssize_t bytes_per_channel = 3; // 24bit
|
||||
|
||||
Reference in New Issue
Block a user