v1.0.0-rc.40
This commit is contained in:
@@ -53,8 +53,8 @@ TEST_CASE("FrameTransformation_Raw_NoCompression" ,"") {
|
||||
REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1));
|
||||
}
|
||||
auto image = transformation.GetCompressedImage();
|
||||
REQUIRE(image.size == experiment.GetByteDepthImage() * experiment.GetPixelsNum());
|
||||
auto output = (int16_t *) image.data;
|
||||
REQUIRE(image.GetCompressedSize() == experiment.GetByteDepthImage() * experiment.GetPixelsNum());
|
||||
auto output = (int16_t *) image.GetCompressed();
|
||||
|
||||
uint32_t diff_0 = 0;
|
||||
uint32_t diff_1 = 0;
|
||||
@@ -96,12 +96,13 @@ TEST_CASE("FrameTransformation_Raw_NoCompression_bshuf_lz4" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<int16_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
uint32_t diff_0 = 0;
|
||||
@@ -142,8 +143,8 @@ TEST_CASE("FrameTransformation_Conversion_NoGeomTransformation_NoCompression" ,"
|
||||
REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1));
|
||||
}
|
||||
auto image = transformation.GetCompressedImage();
|
||||
REQUIRE(image.size == experiment.GetByteDepthImage() * experiment.GetPixelsNum());
|
||||
auto output = (int16_t *) image.data;
|
||||
REQUIRE(image.GetCompressedSize() == experiment.GetByteDepthImage() * experiment.GetPixelsNum());
|
||||
auto output = (int16_t *) image.GetCompressed();
|
||||
|
||||
uint32_t diff_0 = 0;
|
||||
uint32_t diff_1 = 0;
|
||||
@@ -182,8 +183,8 @@ TEST_CASE("FrameTransformation_Converted_NoCompression" ,"") {
|
||||
}
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
REQUIRE(image.size == experiment.GetByteDepthImage() * experiment.GetPixelsNum());
|
||||
auto output = (int16_t *) image.data;
|
||||
REQUIRE(image.GetCompressedSize() == experiment.GetByteDepthImage() * experiment.GetPixelsNum());
|
||||
auto output = (int16_t *) image.GetCompressed();
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
REQUIRE(input_0[511*1024+256]/2 == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 258]);
|
||||
@@ -236,12 +237,13 @@ TEST_CASE("FrameTransformation_Converted_bshuf_lz4" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<uint16_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
@@ -294,12 +296,13 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<uint16_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
@@ -352,12 +355,13 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd_rle" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<uint16_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
@@ -413,12 +417,13 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd_32bit" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<uint32_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
@@ -475,12 +480,13 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd_8bit" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<int8_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
@@ -541,12 +547,13 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd_unsigned_16bit" ,"") {
|
||||
|
||||
auto image = transformation.GetCompressedImage();
|
||||
|
||||
REQUIRE(read_be64(image.data) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.data+8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be64(image.GetCompressed()) == experiment.GetPixelsNum() * experiment.GetByteDepthImage());
|
||||
REQUIRE(read_be32(image.GetCompressed() + 8) == JFJochBitShuffleCompressor::DefaultBlockSize *
|
||||
experiment.GetByteDepthImage());
|
||||
|
||||
std::vector<uint16_t> output;
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.data, image.size,
|
||||
REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithm(), image.GetCompressed(),
|
||||
image.GetCompressedSize(),
|
||||
experiment.GetPixelsNum()));
|
||||
|
||||
REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]);
|
||||
|
||||
Reference in New Issue
Block a user