diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-07 16:07:06 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-07 16:07:06 +0200 |
| commit | 72b59325cf7beba7e6e9170cf6023a079fd58672 (patch) | |
| tree | 739bc52d4eabfe62c5b6485ced72d1a78ae62e5a | |
| parent | 285fbcc52f89ff8a26730c80d33925d24c35e5bc (diff) | |
| parent | 56d85149e513984954644f2549b9c8057db87a03 (diff) | |
| download | redot-engine-72b59325cf7beba7e6e9170cf6023a079fd58672.tar.gz | |
Merge pull request #77960 from akien-mga/tinyexr-1.0.5
tinyexr: Sync with upstream 1.0.5
| -rw-r--r-- | thirdparty/README.md | 2 | ||||
| -rw-r--r-- | thirdparty/tinyexr/tinyexr.h | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/thirdparty/README.md b/thirdparty/README.md index a9bad1198f..a3848d9ff3 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -688,7 +688,7 @@ comments and a patch is provided in the squish/ folder. ## tinyexr - Upstream: https://github.com/syoyo/tinyexr -- Version: 1.0.4 (7c92b8cd86a378ba5cb7b6d39a336457728dfb82, 2023) +- Version: 1.0.5 (3627ab3060592468d49547b4cdf5353e9e2b50dc, 2023) - License: BSD-3-Clause Files extracted from upstream source: diff --git a/thirdparty/tinyexr/tinyexr.h b/thirdparty/tinyexr/tinyexr.h index 3613aaa874..d08e97f6cd 100644 --- a/thirdparty/tinyexr/tinyexr.h +++ b/thirdparty/tinyexr/tinyexr.h @@ -7546,21 +7546,24 @@ static size_t SaveEXRNPartImageToMemory(const EXRImage* exr_images, return 0; } #endif -#if !TINYEXR_USE_ZFP if (exr_headers[i]->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { +#if !TINYEXR_USE_ZFP SetErrorMessage("ZFP compression is not supported in this build", err); return 0; - } #else - for (int c = 0; c < exr_header->num_channels; ++c) { - if (exr_headers[i]->requested_pixel_types[c] != TINYEXR_PIXELTYPE_FLOAT) { - SetErrorMessage("Pixel type must be FLOAT for ZFP compression", - err); - return 0; + // All channels must be fp32. + // No fp16 support in ZFP atm(as of 2023 June) + // https://github.com/LLNL/fpzip/issues/2 + for (int c = 0; c < exr_headers[i]->num_channels; ++c) { + if (exr_headers[i]->requested_pixel_types[c] != TINYEXR_PIXELTYPE_FLOAT) { + SetErrorMessage("Pixel type must be FLOAT for ZFP compression", + err); + return 0; + } } - } #endif + } } } @@ -8635,7 +8638,7 @@ int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers, if (!ConvertHeader(exr_header, infos[i], &warn, &_err)) { // 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) { free(infos[i].attributes[k].value); } |
