tinyexr: Sync with upstream 1.0.5
(cherry picked from commit 56d85149e5
)
This commit is contained in:
parent
4746eaba83
commit
cdef832453
2 changed files with 13 additions and 10 deletions
2
thirdparty/README.md
vendored
2
thirdparty/README.md
vendored
|
@ -536,7 +536,7 @@ comments and a patch is provided in the squish/ folder.
|
||||||
## tinyexr
|
## tinyexr
|
||||||
|
|
||||||
- Upstream: https://github.com/syoyo/tinyexr
|
- Upstream: https://github.com/syoyo/tinyexr
|
||||||
- Version: 1.0.4 (7c92b8cd86a378ba5cb7b6d39a336457728dfb82, 2023)
|
- Version: 1.0.5 (3627ab3060592468d49547b4cdf5353e9e2b50dc, 2023)
|
||||||
- License: BSD-3-Clause
|
- License: BSD-3-Clause
|
||||||
|
|
||||||
Files extracted from upstream source:
|
Files extracted from upstream source:
|
||||||
|
|
21
thirdparty/tinyexr/tinyexr.h
vendored
21
thirdparty/tinyexr/tinyexr.h
vendored
|
@ -7546,21 +7546,24 @@ static size_t SaveEXRNPartImageToMemory(const EXRImage* exr_images,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if !TINYEXR_USE_ZFP
|
|
||||||
if (exr_headers[i]->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) {
|
if (exr_headers[i]->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) {
|
||||||
|
#if !TINYEXR_USE_ZFP
|
||||||
SetErrorMessage("ZFP compression is not supported in this build",
|
SetErrorMessage("ZFP compression is not supported in this build",
|
||||||
err);
|
err);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
for (int c = 0; c < exr_header->num_channels; ++c) {
|
// All channels must be fp32.
|
||||||
if (exr_headers[i]->requested_pixel_types[c] != TINYEXR_PIXELTYPE_FLOAT) {
|
// No fp16 support in ZFP atm(as of 2023 June)
|
||||||
SetErrorMessage("Pixel type must be FLOAT for ZFP compression",
|
// https://github.com/LLNL/fpzip/issues/2
|
||||||
err);
|
for (int c = 0; c < exr_headers[i]->num_channels; ++c) {
|
||||||
return 0;
|
if (exr_headers[i]->requested_pixel_types[c] != TINYEXR_PIXELTYPE_FLOAT) {
|
||||||
|
SetErrorMessage("Pixel type must be FLOAT for ZFP compression",
|
||||||
|
err);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8635,7 +8638,7 @@ int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers,
|
||||||
if (!ConvertHeader(exr_header, infos[i], &warn, &_err)) {
|
if (!ConvertHeader(exr_header, infos[i], &warn, &_err)) {
|
||||||
|
|
||||||
// Free malloc-allocated memory here.
|
// Free malloc-allocated memory here.
|
||||||
for (size_t k = 0; k < infos[i].attributes.size(); i++) {
|
for (size_t k = 0; k < infos[i].attributes.size(); k++) {
|
||||||
if (infos[i].attributes[k].value) {
|
if (infos[i].attributes[k].value) {
|
||||||
free(infos[i].attributes[k].value);
|
free(infos[i].attributes[k].value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue