mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-22 20:24:39 +02:00
Moved bitshuffle LZ4 property to writer header
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include <H5Cpp.h>
|
||||
#include "buffer_config.hpp"
|
||||
|
||||
// Size of compression header in bytes.
|
||||
const int BSHUF_LZ4_HEADER_BYTES = 12;
|
||||
|
||||
struct ImageMetadata
|
||||
{
|
||||
uint64_t pulse_id;
|
||||
|
||||
@@ -64,9 +64,6 @@ namespace core_buffer {
|
||||
// Size of buffer between the receiving and sending part.
|
||||
const int STREAM_FASTQUEUE_SLOTS = 5;
|
||||
|
||||
// Size of compression header in bytes.
|
||||
const int WRITER_COMPRESSION_HEADER_BYTES = 12;
|
||||
|
||||
// Writer RECV queue on ZMQ.
|
||||
const int WRITER_RCVHWM = 100;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ TEST(WriterH5Writer, test_compression)
|
||||
auto f_comp_buffer = make_unique<char[]>(comp_buffer_size);
|
||||
|
||||
auto i_comp_buffer = make_unique<char[]>(
|
||||
(comp_buffer_size * n_modules) + WRITER_COMPRESSION_HEADER_BYTES);
|
||||
(comp_buffer_size * n_modules) + BSHUF_LZ4_HEADER_BYTES);
|
||||
auto i_raw_buffer = make_unique<uint16_t[]>(
|
||||
MODULE_N_PIXELS * n_modules * n_frames);
|
||||
|
||||
@@ -43,7 +43,7 @@ TEST(WriterH5Writer, test_compression)
|
||||
bshuf_write_uint32_BE(&i_comp_buffer[8],
|
||||
MODULE_N_PIXELS * PIXEL_N_BYTES);
|
||||
|
||||
size_t total_compressed_size = WRITER_COMPRESSION_HEADER_BYTES;
|
||||
size_t total_compressed_size = BSHUF_LZ4_HEADER_BYTES;
|
||||
for (int i_module=0; i_module<n_modules; i_module++) {
|
||||
|
||||
for (size_t i=0; i<MODULE_N_PIXELS; i++) {
|
||||
|
||||
Reference in New Issue
Block a user