From 8b48639b06665fd628d9e4586cfd77c2eb510e6a Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Fri, 15 May 2020 12:12:24 +0200 Subject: [PATCH] Use H5 filters instead of custom variables --- core-buffer/include/WriterH5Writer.hpp | 3 --- core-buffer/src/WriterH5Writer.cpp | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core-buffer/include/WriterH5Writer.hpp b/core-buffer/include/WriterH5Writer.hpp index bea866d..37827df 100644 --- a/core-buffer/include/WriterH5Writer.hpp +++ b/core-buffer/include/WriterH5Writer.hpp @@ -6,9 +6,6 @@ #include #include "buffer_config.hpp" -// Bitshuffle LZ4. -const H5Z_filter_t BSHUF_H5FILTER = 32008; - struct ImageMetadata { uint64_t pulse_id; diff --git a/core-buffer/src/WriterH5Writer.cpp b/core-buffer/src/WriterH5Writer.cpp index 0896448..eabc5d9 100644 --- a/core-buffer/src/WriterH5Writer.cpp +++ b/core-buffer/src/WriterH5Writer.cpp @@ -1,5 +1,6 @@ #include "WriterH5Writer.hpp" #include +#include extern "C" { @@ -28,8 +29,8 @@ WriterH5Writer::WriterH5Writer( H5::DSetCreatPropList image_dataset_properties; image_dataset_properties.setChunk(3, image_dataset_chunking); - // block_size, 2==LZ4 compression - uint compression_prop[] = {MODULE_N_PIXELS, 2}; + // block_size, compression type + uint compression_prop[] = {MODULE_N_PIXELS, BSHUF_H5_COMPRESS_LZ4}; H5Pset_filter(image_dataset_properties.getId(), BSHUF_H5FILTER, H5Z_FLAG_MANDATORY,