Commit d46ff752 authored by Brian Barran's avatar Brian Barran
Browse files

fixed to actually use the compression tolerance

parent 06c951e4
Pipeline #13406 failed with stages
in 1 minute and 1 second
......@@ -493,7 +493,7 @@ int64_t VolumeDataPageAccessorImpl::RequestWritePage(int64_t chunk, const DataBl
std::vector<uint8_t> serializedData;
uint64_t hash;
hash = VolumeDataStore::SerializeVolumeData({ m_layer, chunk }, dataBlock, data, m_layer->GetEffectiveCompressionMethod(), serializedData);
hash = VolumeDataStore::SerializeVolumeData({ m_layer, chunk }, dataBlock, data, m_layer->GetEffectiveCompressionMethod(), m_layer->GetEffectiveCompressionTolerance(), serializedData);
if (hash == VolumeDataHash::UNKNOWN)
{
......
......@@ -705,7 +705,7 @@ bool VolumeDataStore::DeserializeVolumeData(const VolumeDataChunk& volumeDataChu
}
uint64_t
VolumeDataStore::SerializeVolumeData(const VolumeDataChunk& chunk, const DataBlock& dataBlock, const std::vector<uint8_t>& chunkData, CompressionMethod compressionMethod, std::vector<uint8_t>& destinationBuffer)
VolumeDataStore::SerializeVolumeData(const VolumeDataChunk& chunk, const DataBlock& dataBlock, const std::vector<uint8_t>& chunkData, CompressionMethod compressionMethod, float compressionTolerance, std::vector<uint8_t>& destinationBuffer)
{
DataBlockDescriptor dataBlockHeader;
dataBlockHeader.Components = dataBlock.Components;
......@@ -908,7 +908,7 @@ VolumeDataStore::SerializeVolumeData(const VolumeDataChunk& chunk, const DataBlo
}
else
{
float delta = 0.001;
float delta = compressionTolerance;
if (dataType == BITCOMP_FP16_DATA)
{
......
......@@ -57,7 +57,7 @@ public:
static bool Verify(const VolumeDataChunk& volumeDataChunk, const std::vector<uint8_t>& serializedData, CompressionMethod compressionMethod, bool isFullyRead);
static bool CreateConstantValueDataBlock(VolumeDataChunk const &volumeDataChunk, VolumeDataChannelDescriptor::Format format, float noValue, VolumeDataChannelDescriptor::Components components, VolumeDataHash const &constantValueVolumeDataHash, DataBlock &dataBlock, std::vector<uint8_t> &buffer, Error &error);
static uint64_t
SerializeVolumeData(const VolumeDataChunk& chunk, const DataBlock &dataBlock, const std::vector<uint8_t>& chunkData, CompressionMethod compressionMethod, std::vector<uint8_t>& destinationBuffer);
SerializeVolumeData(const VolumeDataChunk& chunk, const DataBlock &dataBlock, const std::vector<uint8_t>& chunkData, CompressionMethod compressionMethod, float compressionTolerance, std::vector<uint8_t>& destinationBuffer);
protected:
GlobalStateVds m_globalStateVds;
......
......@@ -1196,12 +1196,12 @@ main(int argc, char* argv[])
{
if (sparseCompression)
{
fmt::print("\nInfo: Using sparse, lossy compression with tolerance {:.1f}%.\n", compressionTolerance);
fmt::print("\nInfo: Using sparse, lossy compression with tolerance {:.3f}.\n", compressionTolerance);
compressionMethod = OpenVDS::CompressionMethod::BitcompLossyToSignedSparse;
}
else
{
fmt::print("\nInfo: Using lossy compression with tolerance {:.1f}%.\n", compressionTolerance);
fmt::print("\nInfo: Using lossy compression with tolerance {:.3f}.\n", compressionTolerance);
compressionMethod = OpenVDS::CompressionMethod::BitcompLossyToSigned;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment