FrameTransformation: Add two tests for int32 and uint16
This commit is contained in:
@@ -21,19 +21,16 @@ FrameTransformation::FrameTransformation(const DiffractionExperiment &in_experim
|
||||
|
||||
precompression_buffer.resize(experiment.GetPixelsNum() * pixel_depth);
|
||||
|
||||
if (experiment.GetApplyPixelMaskInFPGA()) {
|
||||
// Mask gaps
|
||||
if (pixel_depth == 2) {
|
||||
if (pixel_signed)
|
||||
FillVector<int16_t>(precompression_buffer, INT16_MIN);
|
||||
else
|
||||
FillVector<uint16_t>(precompression_buffer, UINT16_MAX);
|
||||
} else if (pixel_depth == 4) {
|
||||
if (pixel_signed)
|
||||
FillVector<int32_t>(precompression_buffer, INT32_MIN);
|
||||
else
|
||||
FillVector<uint32_t>(precompression_buffer, UINT32_MAX);
|
||||
}
|
||||
if (pixel_depth == 2) {
|
||||
if (pixel_signed)
|
||||
FillVector<int16_t>(precompression_buffer, INT16_MIN);
|
||||
else
|
||||
FillVector<uint16_t>(precompression_buffer, UINT16_MAX);
|
||||
} else if (pixel_depth == 4) {
|
||||
if (pixel_signed)
|
||||
FillVector<int32_t>(precompression_buffer, INT32_MIN);
|
||||
else
|
||||
FillVector<uint32_t>(precompression_buffer, UINT32_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +39,7 @@ size_t FrameTransformation::SaveCompressedImage(void *output) {
|
||||
experiment.GetPixelsNum(), pixel_depth);
|
||||
}
|
||||
|
||||
void FrameTransformation::ProcessModule(const int16_t *input, uint16_t module_number, int data_stream) {
|
||||
void FrameTransformation::ProcessModule(const void *input, uint16_t module_number, int data_stream) {
|
||||
size_t module_number_abs = experiment.GetFirstModuleOfDataStream(data_stream) + module_number;
|
||||
|
||||
if (experiment.GetDetectorMode() != DetectorMode::Conversion) {
|
||||
|
||||
Reference in New Issue
Block a user