Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openexr 3.3.0 #192399

Merged
merged 24 commits into from
Oct 3, 2024
Merged

openexr 3.3.0 #192399

merged 24 commits into from
Oct 3, 2024

Conversation

BrewTestBot
Copy link
Member

Created by brew bump


Created with brew bump-formula-pr.

release notes
Minor release several significant changes:
  • The C++ API now uses the OpenEXRCore library underneath.

    • This is a transparent change to the existing API, although the ABI (i.e. structure / class layout) has changed
    • Existing reading of pixel data should be more efficient due to fewer memory allocations / frees during the process of reading. Additionally, some more specialisation of unpacking routines may result in faster unpack times
    • All compression routines are implemented by the C Core layer underneath and no longer duplicated
    • Initial support for "stateless" reading of scanlines has been proposed, allowing multiple threads to read scanlines into different frame buffer objects at the same time. While well tested at the Core level, the C++ api should be considered experimental for this release
    • Thread dispatch for reading different file types has been made more homogeneous, so is simpler and more consistent
  • New API for accessing compression types

    In anticipation of future support for new compression types, there is now a convenience API for mapping between compression type names and the associated enum:

    getCompressionDescriptionFromId(Compression, std::string&)
    getCompressionIdFromName(const std::string&, Compression&)
    getCompressionNameFromId(Compression, std::string&)
    getCompressionNamesString(const std::string&, std::string&)
    getCompressionNumScanlines(Compression)
    isValidCompression(int)
    
  • New bin tools:

    • exrmetrics - Read an OpenEXR image from infile, write an identical copy to outfile reporting time taken to read/write and file sizes. Useful for benchmarking performance in space and time.

    • exrmanifest - Read exr files and print the contents of the embedded manifest. The manifest provides a mapping between integer object identifiers and human-readible strings. See OpenEXR Deep IDs Specification for more details.

  • New python bindings.

    This version introduces a new python API, the File object, which provides full support for reading and writing all types of .exr image files, including scanline, tiled, deep, mult-part, multi-view, and multi-resolution images with pixel types of unsigned 32-bit integers and 16- and 32-bit floats. It provides access to pixel data through numpy arrays, as either one array per channel or with R, G, B, and A interleaved into a single array RGBA array.

    Previous releases of the openexr python module supported only scanline files. The previous API remains in place for now for backwards compatibility.

    See src/wrappers/python/README.md for a synopsis.

@github-actions github-actions bot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Sep 30, 2024
@github-actions github-actions bot added the long build Set a long timeout for formula testing label Sep 30, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Oct 3, 2024
@carlocab carlocab added CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. and removed stale No recent activity labels Oct 3, 2024
@carlocab carlocab force-pushed the bump-openexr-3.3.0 branch 2 times, most recently from fc8c51c to d533132 Compare October 3, 2024 00:34
@carlocab
Copy link
Member

carlocab commented Oct 3, 2024

  /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:172:19: error: call to 'clamp' is ambiguous
    172 |                 (unsigned int) (clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f);
        |                                 ^~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
     35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
        | ^
  /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
     77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
        | ^
  /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:175:19: error: call to 'clamp' is ambiguous
    175 |                 (unsigned int) (clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f);
        |                                 ^~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
     35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
        | ^
  /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
     77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
        | ^
  /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:178:19: error: call to 'clamp' is ambiguous
    178 |                 (unsigned int) (clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f);
        |                                 ^~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
     35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
        | ^
  /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
     77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
        | ^
  3 errors generated.
  make[2]: *** [OpenEXR_CTL/exrdpx/CMakeFiles/exrdpx.dir/exrToDpx.cpp.o] Error 1

https://github.com/Homebrew/homebrew-core/actions/runs/11113893071/job/30879442929?pr=192399#step:3:375

carlocab added a commit to carlocab/CTL that referenced this pull request Oct 3, 2024
C++17 now has `std::clamp`[^1], so the calls to `clamp` in this file
cause the compiler to error with[^2]

      /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:172:19: error: call to 'clamp' is ambiguous
        172 |                 (unsigned int) (clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f);
            |                                 ^~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
         35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
            | ^
      /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
         77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
            | ^
      /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:175:19: error: call to 'clamp' is ambiguous
        175 |                 (unsigned int) (clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f);
            |                                 ^~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
         35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
            | ^
      /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
         77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
            | ^
      /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:178:19: error: call to 'clamp' is ambiguous
        178 |                 (unsigned int) (clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f);
            |                                 ^~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
         35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
            | ^
      /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
         77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
            | ^
      3 errors generated.
      make[2]: *** [OpenEXR_CTL/exrdpx/CMakeFiles/exrdpx.dir/exrToDpx.cpp.o] Error 1

Both this code and `Imath::clamp` long predate `std::clamp`, so it seems
to me that `Imath::clamp` is what's intended here.

This fixes a build failure at Homebrew while rebuilding CTL for OpenEXR
3.3.0.[^3]

[^1]: https://en.cppreference.com/w/cpp/algorithm/clamp
[^2]: Logs available at https://github.com/Homebrew/homebrew-core/actions/runs/11113893071/job/30879442929?pr=192399#step:3:375
[^3]: See Homebrew/homebrew-core#192399
@carlocab carlocab added the CI-linux-self-hosted Build on Linux self-hosted runner label Oct 3, 2024
michaeldsmith pushed a commit to ampas/CTL that referenced this pull request Oct 3, 2024
C++17 now has `std::clamp`[^1], so the calls to `clamp` in this file
cause the compiler to error with[^2]

      /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:172:19: error: call to 'clamp' is ambiguous
        172 |                 (unsigned int) (clamp (float (pixel.r), 0.0f, 1023.0f) + 0.5f);
            |                                 ^~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
         35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
            | ^
      /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
         77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
            | ^
      /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:175:19: error: call to 'clamp' is ambiguous
        175 |                 (unsigned int) (clamp (float (pixel.g), 0.0f, 1023.0f) + 0.5f);
            |                                 ^~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
         35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
            | ^
      /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
         77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
            | ^
      /tmp/ctl-20240930-89937-yvomao/CTL-ctl-1.5.3/OpenEXR_CTL/exrdpx/exrToDpx.cpp:178:19: error: call to 'clamp' is ambiguous
        178 |                 (unsigned int) (clamp (float (pixel.b), 0.0f, 1023.0f) + 0.5f);
            |                                 ^~~~~
      /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/__algorithm/clamp.h:35:1: note: candidate function [with _Tp = float]
         35 | clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
            | ^
      /opt/homebrew/include/Imath/ImathFun.h:77:1: note: candidate function [with T = float]
         77 | clamp (T a, T l, T h) IMATH_NOEXCEPT
            | ^
      3 errors generated.
      make[2]: *** [OpenEXR_CTL/exrdpx/CMakeFiles/exrdpx.dir/exrToDpx.cpp.o] Error 1

Both this code and `Imath::clamp` long predate `std::clamp`, so it seems
to me that `Imath::clamp` is what's intended here.

This fixes a build failure at Homebrew while rebuilding CTL for OpenEXR
3.3.0.[^3]

[^1]: https://en.cppreference.com/w/cpp/algorithm/clamp
[^2]: Logs available at https://github.com/Homebrew/homebrew-core/actions/runs/11113893071/job/30879442929?pr=192399#step:3:375
[^3]: See Homebrew/homebrew-core#192399
@carlocab carlocab added the CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. label Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Oct 3, 2024
@BrewTestBot BrewTestBot added this pull request to the merge queue Oct 3, 2024
Merged via the queue into master with commit f7a61b6 Oct 3, 2024
15 checks passed
@BrewTestBot BrewTestBot deleted the bump-openexr-3.3.0 branch October 3, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-linux-self-hosted Build on Linux self-hosted runner CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. CI-no-fail-fast-deps Continue dependent tests despite failing GitHub Actions matrix tests. CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. long build Set a long timeout for formula testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants