Skip to content

Commit 72b5932

Browse files
committed
Merge pull request #77960 from akien-mga/tinyexr-1.0.5
tinyexr: Sync with upstream 1.0.5
2 parents 285fbcc + 56d8514 commit 72b5932

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

thirdparty/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ comments and a patch is provided in the squish/ folder.
688688
## tinyexr
689689

690690
- Upstream: https://github.com/syoyo/tinyexr
691-
- Version: 1.0.4 (7c92b8cd86a378ba5cb7b6d39a336457728dfb82, 2023)
691+
- Version: 1.0.5 (3627ab3060592468d49547b4cdf5353e9e2b50dc, 2023)
692692
- License: BSD-3-Clause
693693

694694
Files extracted from upstream source:

thirdparty/tinyexr/tinyexr.h

+12-9
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

@@ -8635,7 +8638,7 @@ int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers,
86358638
if (!ConvertHeader(exr_header, infos[i], &warn, &_err)) {
86368639

86378640
// Free malloc-allocated memory here.
8638-
for (size_t k = 0; k < infos[i].attributes.size(); i++) {
8641+
for (size_t k = 0; k < infos[i].attributes.size(); k++) {
86398642
if (infos[i].attributes[k].value) {
86408643
free(infos[i].attributes[k].value);
86418644
}

0 commit comments

Comments
 (0)