Skip to content

Commit fc39449

Browse files
committed
Update ZFP.
Fix ZFP build. Fixes #188
1 parent c85b1e1 commit fc39449

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#CXXFLAGS ?= -fsanitize=address -Werror -Wall -Wextra -g -O0 -DTINYEXR_USE_MINIZ=0 -DTINYEXR_USE_PIZ=0
33
#LDFLAGS ?= -lz
44

5-
# ZFP
6-
#CXXFLAGS += -DTINYEXR_USE_ZFP=1 -I./deps/ZFP/inc
5+
# ZFP(experimental)
6+
#CXXFLAGS += -DTINYEXR_USE_ZFP=1 -I./deps/ZFP/include
77
#LDFLAGS += -L./deps/ZFP/lib -lzfp
88

99
CFLAGS += -I./deps/miniz

deps/ZFP

Submodule ZFP updated 677 files

tinyexr.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7546,21 +7546,24 @@ static size_t SaveEXRNPartImageToMemory(const EXRImage* exr_images,
75467546
return 0;
75477547
}
75487548
#endif
7549-
#if !TINYEXR_USE_ZFP
75507549
if (exr_headers[i]->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) {
7550+
#if !TINYEXR_USE_ZFP
75517551
SetErrorMessage("ZFP compression is not supported in this build",
75527552
err);
75537553
return 0;
7554-
}
75557554
#else
7556-
for (int c = 0; c < exr_header->num_channels; ++c) {
7557-
if (exr_headers[i]->requested_pixel_types[c] != TINYEXR_PIXELTYPE_FLOAT) {
7558-
SetErrorMessage("Pixel type must be FLOAT for ZFP compression",
7559-
err);
7560-
return 0;
7555+
// All channels must be fp32.
7556+
// No fp16 support in ZFP atm(as of 2023 June)
7557+
// https://github.com/LLNL/fpzip/issues/2
7558+
for (int c = 0; c < exr_headers[i]->num_channels; ++c) {
7559+
if (exr_headers[i]->requested_pixel_types[c] != TINYEXR_PIXELTYPE_FLOAT) {
7560+
SetErrorMessage("Pixel type must be FLOAT for ZFP compression",
7561+
err);
7562+
return 0;
7563+
}
75617564
}
7562-
}
75637565
#endif
7566+
}
75647567
}
75657568
}
75667569

0 commit comments

Comments
 (0)