Skip to content

Commit

Permalink
Merge branch 'main' into python_cibuildwheels
Browse files Browse the repository at this point in the history
Signed-off-by: zachlewis <[email protected]>
  • Loading branch information
zachlewis authored Oct 3, 2024
2 parents 5bba64d + 1be693b commit a882bcf
Show file tree
Hide file tree
Showing 24 changed files with 237 additions and 71 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,14 @@ jobs:
fail-fast: false
matrix:
include:
- desc: latest releases gcc13 C++20 py3.12 avx2 exr3.3 ocio2.3
- desc: latest releases gcc13 C++20 py3.12 avx2 exr3.3 ocio2.4
nametag: linux-latest-releases
runner: ubuntu-24.04
cc_compiler: gcc-13
cxx_compiler: g++-13
cxx_std: 20
fmt_ver: 11.0.2
opencolorio_ver: v2.3.2
opencolorio_ver: v2.4.0
openexr_ver: v3.3.0
pybind11_ver: v2.13.5
python_ver: "3.12"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
- 'docs/**'
pull_request:
# Only run on individual PRs if the workflow file itself is changed.
paths:
- .github/workflows/scorecard.yml
paths-ignore:
- '**.md'
- '**.rst'
Expand Down
2 changes: 1 addition & 1 deletion ASWF/project_intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This is a checklist for TSC's to review as part of the intake process. The TSC s
- [X] A [CONTRIBUTING.md](../CONTRIBUTING.md) file explaining to other developers and your community of users how to contribute to the project. The file should explain what types of contributions are needed and how the process works, along with how to disclose security issues responsibly ( may also point to a [SECURITY.md](../SECURITY.md) file ).
- [ ] A [CODEOWNERS](../CODEOWNERS) or [COMMITTERS](../COMMITERS.csv) file to define individuals or teams that are responsible for code in a repository; document current project owners and current and emeritus committers.
- [X] A [CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md) file that sets the ground rules for participants’ behavior associated and helps to facilitate a friendly, welcoming environment. By default, projects should leverage the Linux Foundation Code of Conduct unless an alternate Code of Conduct was previously approved.
- [X] A [RELEASING.md](../RELEASING.md) file that provides documentation on the release methodology, cadence, criteria, etc.
- [X] A [RELEASING.md](docs/RELEASING.md) file that provides documentation on the release methodology, cadence, criteria, etc.
- [X] A [GOVERNANCE.md](../GOVERNANCE.md) file that documents the project’s technical governance.
- [ ] A [SUPPORT.md](../SUPPORT.md) file to let users and developers know about ways to get help with your project.
- Infrastructure/Assets
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5438,5 +5438,5 @@ Notable documentation changes:
--------------

For older release notes, see:
* [CHANGES-0.x](https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/master/src/doc/CHANGES-0.x.md).
* [CHANGES-1.x](https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/master/src/doc/CHANGES-1.x.md).
* [CHANGES-0.x](https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/main/src/doc/CHANGES-0.x.md).
* [CHANGES-1.x](https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/main/src/doc/CHANGES-1.x.md).
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
* **Imath >= 3.1** (tested through 3.1.x and main)
* **OpenEXR >= 3.1** (tested through 3.3 and main)
* **libTIFF >= 4.0** (tested through 4.7)
* **OpenColorIO >= 2.2** (tested through 2.3 and main)
* **OpenColorIO >= 2.2** (tested through 2.4 and main)
* libjpeg >= 8 (tested through jpeg9e), or **libjpeg-turbo >= 2.1** (tested
through 3.0)
* **[fmtlib](https://github.com/fmtlib/fmt) >= 7.0** (tested through 11.0).
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ pull request (PR) mechanism.
* [ROADMAP](docs/ROADMAP.md) is a high-level overview of the current
development priorities for the next annual release, expected in September,
2024.
* [RELEASING](RELEASING.md) explains our policies and procedures for making
releases. We have a major, possibly-compatibility-breaking, release annually
in September/October, and minor bug fix and safe feature addition release at
the beginning of every month.
* [RELEASING](docs/dev/RELEASING.md) explains our policies and procedures for
making releases. We have a major, possibly-compatibility-breaking, release
annually in September/October, and minor bug fix and safe feature addition
release at the beginning of every month.
* [Building the docs](src/doc/Building_the_docs.md) has instructions for
building the documentation locally, which may be helpful if you are editing
the documentation in nontrivial ways and want to preview the appearance.
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ here](https://github.com/AcademySoftwareFoundation/OpenImageIO/discussions/4151)

See the [Dependency proposal wiki page](https://github.com/AcademySoftwareFoundation/OpenImageIO/discussions/4151)

* [ ] Big required upgrades with potentially widespread impact on the code base
* [x] Big required upgrades with potentially widespread impact on the code base
- [x] C++17 [#4155](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4155)
- [x] Python 3.7 [#4157](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4157)
- [ ] OpenEXR/Imath 3.1 [#4156](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4156)
- [x] OpenEXR/Imath 3.1 [#4156](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4156)

* [ ] Miscellaneous optional upgrades whose changes will be very localized

This isn't a complete list, nor do we need to do all of these, but the
highest priorities are:

- [ ] CMake 3.18 (from 3.15). Or possibly newer if there's a good reason? (3.19 or 3.20 are also reasonable.)
- [ ] OpenColorIO 2.0, or possibly 2.1 (from 1.1). Open for debate: should it be a required dependency rather than optional?
- [x] OpenColorIO 2.2, or possibly 2.1 (from 1.1). Open for debate: should it be a required dependency rather than optional?
- [ ] fmt 8.0 (from 7.0), which has many improvements.
- [ ] GIFlib 5.0 (from 4.0), which adds thread safety.
- [ ] libheif 1.11 (from 1.3), which supports many additional features of that format.
- [ ] WebP 1.2 (from 0.6) which lets us use their exported CMake configs and retire FindWebP.cmake.
- [ ] pybind11 2.6 or 2.7 (from 2.4).
- [x] GIFlib 5.0 (from 4.0), which adds thread safety.
- [x] libheif 1.11 (from 1.3), which supports many additional features of that format.
- [x] WebP 1.2 (from 0.6) which lets us use their exported CMake configs and retire FindWebP.cmake.
- [x] pybind11 2.6 or 2.7 (from 2.4).


- [x] [#4158](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4158) Eliminate the last few places where we use Boost and eliminate it as a dependency.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ set (public_docs
"${OpenImageIO_SOURCE_DIR}/LICENSE.md"
"${OpenImageIO_SOURCE_DIR}/THIRD-PARTY.md"
"${OpenImageIO_SOURCE_DIR}/CHANGES.md"
CHANGES-0.x.md
CHANGES-1.x.md
"${OpenImageIO_SOURCE_DIR}/docs/CHANGES-0.x.md"
"${OpenImageIO_SOURCE_DIR}/docs/CHANGES-1.x.md"
)

if (INSTALL_DOCS)
Expand Down
2 changes: 1 addition & 1 deletion src/doc/copyr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ http://creativecommons.org/licenses/by/4.0/
OpenImageIO incorporates code from several other software packages with
compatible licenses. Copies of their licenses are reproduced here:
https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/master/THIRD-PARTY.md
https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/main/THIRD-PARTY.md
108 changes: 64 additions & 44 deletions src/doc/imagebufalgo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2535,24 +2535,27 @@ Image Enhancement / Restoration

Examples:

.. tabs::

.. code-tab:: c++
.. tabs::

ImageBuf Src ("tahoe.exr");
int pixelsFixed = 0;
ImageBufAlgo::fixNonFinite (Src, Src, ImageBufAlgo::NONFINITE_BOX3,
&pixelsFixed);
std::cout << "Repaired " << pixelsFixed << " non-finite pixels\n";
.. tab:: C++
.. literalinclude:: ../../testsuite/docs-examples-cpp/src/docs-examples-imagebufalgo.cpp
:language: c++
:start-after: BEGIN-imagebufalgo-fixNonFinite
:end-before: END-imagebufalgo-fixNonFinite
:dedent: 4

.. code-tab:: py
.. tab:: Python
.. literalinclude:: ../../testsuite/docs-examples-python/src/docs-examples-imagebufalgo.py
:language: py
:start-after: BEGIN-imagebufalgo-fixNonFinite
:end-before: END-imagebufalgo-fixNonFinite
:dedent: 4

Src = ImageBuf("tahoe.exr")
ImageBufAlgo.fixNonFinite (Src, Src, "box3", oiio.NONFINITE_BOX3)
.. tab:: oiiotool
.. sourcecode:: bash

.. code-tab:: bash oiiotool
oiiotool with_nans.tif --fixnan box3 -o with_nans_fixed.tif

oiiotool tahoe.exr --fixnan box3 -o fixed.exr

|
Expand All @@ -2564,21 +2567,27 @@ Image Enhancement / Restoration

Examples:

.. tabs::

.. code-tab:: c++

ImageBuf Src ("holes.exr");
ImageBuf Filled = ImageBufAlgo::fillholes_pushpull (Src);
.. tabs::

.. code-tab:: py
.. tab:: C++
.. literalinclude:: ../../testsuite/docs-examples-cpp/src/docs-examples-imagebufalgo.cpp
:language: c++
:start-after: BEGIN-imagebufalgo-fillholes_pushpull
:end-before: END-imagebufalgo-fillholes_pushpull
:dedent: 4

Src = ImageBuf("holes.exr")
Filled = ImageBufAlgo.fillholes_pushpull (Src)
.. tab:: Python
.. literalinclude:: ../../testsuite/docs-examples-python/src/docs-examples-imagebufalgo.py
:language: py
:start-after: BEGIN-imagebufalgo-fillholes_pushpull
:end-before: END-imagebufalgo-fillholes_pushpull
:dedent: 4

.. code-tab:: bash oiiotool
.. tab:: oiiotool
.. sourcecode:: bash

oiiotool holes.exr --fillholes -o filled.exr
oiiotool checker_with_alpha.exr --fillholes -o checker_with_alpha_filled.exr

|
Expand All @@ -2590,21 +2599,27 @@ Image Enhancement / Restoration

Examples:

.. tabs::

.. code-tab:: c++

ImageBuf Noisy ("tahoe.exr");
ImageBuf Clean = ImageBufAlgo::median_filter (Noisy, 3, 3);
.. tabs::

.. code-tab:: py
.. tab:: C++
.. literalinclude:: ../../testsuite/docs-examples-cpp/src/docs-examples-imagebufalgo.cpp
:language: c++
:start-after: BEGIN-imagebufalgo-median_filter
:end-before: END-imagebufalgo-median_filter
:dedent: 4

Noisy = ImageBuf("tahoe.exr")
Clean = ImageBufAlgo.median_filter (Noisy, 3, 3)
.. tab:: Python
.. literalinclude:: ../../testsuite/docs-examples-python/src/docs-examples-imagebufalgo.py
:language: py
:start-after: BEGIN-imagebufalgo-median_filter
:end-before: END-imagebufalgo-median_filter
:dedent: 4

.. code-tab:: bash oiiotool
.. tab:: oiiotool
.. sourcecode:: bash

oiiotool tahoe.exr --median 3x3 -o clean.exr
oiiotool tahoe.tif --median 3x3 -o tahoe_median_filter.tif

..
Expand Down Expand Up @@ -2633,21 +2648,26 @@ Image Enhancement / Restoration

Examples:

.. tabs::

.. code-tab:: c++

ImageBuf Blurry ("tahoe.exr");
ImageBuf Sharp = ImageBufAlgo::unsharp_mask (Blurry, "gaussian", 5.0f);
.. tabs::

.. code-tab:: py
.. tab:: C++
.. literalinclude:: ../../testsuite/docs-examples-cpp/src/docs-examples-imagebufalgo.cpp
:language: c++
:start-after: BEGIN-imagebufalgo-unsharp_mask
:end-before: END-imagebufalgo-unsharp_mask
:dedent: 4

Blurry ImageBuf("tahoe.exr")
Sharp = ImageBufAlgo.unsharp_mask (Blurry, "gaussian", 5.0)
.. tab:: Python
.. literalinclude:: ../../testsuite/docs-examples-python/src/docs-examples-imagebufalgo.py
:language: py
:start-after: BEGIN-imagebufalgo-unsharp_mask
:end-before: END-imagebufalgo-unsharp_mask
:dedent: 4

.. code-tab:: bash oiiotool
.. tab:: oiiotool
.. sourcecode:: bash

oiiotool tahoe.exr --unsharp:kernel=gaussian:width=5 -o sharp.exr
oiiotool tahoe.tif --unsharp:kernel=gaussian:width=5 -o tahoe_unsharp_mask.tif

|
Expand Down
2 changes: 1 addition & 1 deletion src/include/OpenImageIO/imagebufalgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ enum NonFiniteFixMode
///< values, if any nonfinite values are found.
};

/// `fixNonFinite()` returns in image containing the values of `src` (within
/// `fixNonFinite()` returns an image containing the values of `src` (within
/// the ROI), while repairing any non-finite (NaN/Inf) pixels. If
/// `pixelsFixed` is not nullptr, store in it the number of pixels that
/// contained non-finite value. It is permissible to operate in-place (with
Expand Down
Binary file added testsuite/common/checker_with_alpha.exr
Binary file not shown.
Binary file added testsuite/common/with_nans.tif
Binary file not shown.
11 changes: 11 additions & 0 deletions testsuite/docs-examples-cpp/ref/out-arm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ example_absdiff
example_abs
example_mul
example_div
example_fixNonFinite
Repaired 48 non-finite pixels
example_fillholes_pushpull
example_median_filter
example_unsharp_mask
example_make_texture
zero1.exr : 512 x 512, 3 channel, half openexr
SHA-1: 95823C334FCE55968E8D2827CCD1CF77CEE19ABD
Expand Down Expand Up @@ -126,6 +131,12 @@ mul.exr : 256 x 256, 4 channel, half openexr
SHA-1: ECCDBBBF088912F0B77B887D6B8B480C3F93615E
div.exr : 256 x 256, 4 channel, half openexr
SHA-1: 6A85C923DB82C893C0D88028386F1C58604A4757
checker_with_alpha_filled.exr : 256 x 256, 4 channel, half openexr
SHA-1: B245E027638D5C1BA2608FEDDB3BB9B5E9FA3A44
tahoe_median_filter.tif : 512 x 384, 3 channel, uint8 tiff
SHA-1: A0B2E3A10A16EA8CC905F144C5F91B6A0964A177
tahoe_unsharp_mask.tif : 512 x 384, 3 channel, uint8 tiff
SHA-1: CDE3FAC8053381C59B7BEB3B47991F357E14D9D2
Comparing "simple.tif" and "ref/simple.tif"
PASS
Comparing "scanlines.tif" and "ref/scanlines.tif"
Expand Down
11 changes: 11 additions & 0 deletions testsuite/docs-examples-cpp/ref/out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ example_absdiff
example_abs
example_mul
example_div
example_fixNonFinite
Repaired 48 non-finite pixels
example_fillholes_pushpull
example_median_filter
example_unsharp_mask
example_make_texture
zero1.exr : 512 x 512, 3 channel, half openexr
SHA-1: 95823C334FCE55968E8D2827CCD1CF77CEE19ABD
Expand Down Expand Up @@ -126,6 +131,12 @@ mul.exr : 256 x 256, 4 channel, half openexr
SHA-1: ECCDBBBF088912F0B77B887D6B8B480C3F93615E
div.exr : 256 x 256, 4 channel, half openexr
SHA-1: 6A85C923DB82C893C0D88028386F1C58604A4757
checker_with_alpha_filled.exr : 256 x 256, 4 channel, half openexr
SHA-1: B245E027638D5C1BA2608FEDDB3BB9B5E9FA3A44
tahoe_median_filter.tif : 512 x 384, 3 channel, uint8 tiff
SHA-1: A0B2E3A10A16EA8CC905F144C5F91B6A0964A177
tahoe_unsharp_mask.tif : 512 x 384, 3 channel, uint8 tiff
SHA-1: D3B56074F48EC5D3ADDA4BDE1F487192ABE9BA76
Comparing "simple.tif" and "ref/simple.tif"
PASS
Comparing "scanlines.tif" and "ref/scanlines.tif"
Expand Down
8 changes: 6 additions & 2 deletions testsuite/docs-examples-cpp/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
command += run_app("cmake -E copy " + test_source_dir + "/../common/tahoe-small.tif tahoe.tif")
command += run_app("cmake -E copy " + test_source_dir + "/../common/grid-small.exr A.exr")
command += run_app("cmake -E copy " + test_source_dir + "/../common/grid-small.exr B.exr")

command += run_app("cmake -E copy " + test_source_dir + "/../common/with_nans.tif with_nans.tif")
command += run_app("cmake -E copy " + test_source_dir + "/../common/checker_with_alpha.exr checker_with_alpha.exr")

# Copy the grid to both a tiled and scanline version
command += oiio_app("iconvert") + "../common/grid.tif --scanline scanline.tif > out.txt ;"
Expand Down Expand Up @@ -83,7 +84,10 @@
"absdiff.exr",
"abs.exr",
"mul.exr",
"div.exr"
"div.exr",
"checker_with_alpha_filled.exr",
"tahoe_median_filter.tif",
"tahoe_unsharp_mask.tif"
]
for file in hashes :
command += info_command(file, verbose=False)
Expand Down
Loading

0 comments on commit a882bcf

Please sign in to comment.