Skip to content

Commit 8eb068c

Browse files
authored
Merge branch 'main' into issues/remove-realloc
2 parents 8e9d4c5 + d8a5996 commit 8eb068c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+15988
-243
lines changed

.github/workflows/ci_steps.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ on:
5151
type: string
5252
OPENEXR_FORCE_INTERNAL_OPENJPH:
5353
type: string
54+
CMAKE_OSX_ARCHITECTURES:
55+
type: string
5456
BUILD_TESTING:
5557
type: string
5658
namespace:
@@ -168,6 +170,9 @@ jobs:
168170
cmake_args+=("-DCMAKE_C_FLAGS=-msse2 -mfpmath=sse")
169171
cmake_args+=("-DCMAKE_CXX_FLAGS=-msse2 -mfpmath=sse")
170172
fi
173+
if [ -n "${{ inputs.CMAKE_OSX_ARCHITECTURES }}" ]; then
174+
cmake_args+=("CMAKE_OSX_ARCHITECTURES='${{ inputs.CMAKE_OSX_ARCHITECTURES }}'")
175+
fi
171176
172177
quoted_args=$(printf '%q ' "${cmake_args[@]}")
173178
echo "CMAKE_ARGS=$quoted_args" >> "$GITHUB_ENV"
@@ -238,3 +243,43 @@ jobs:
238243
share/ci/scripts/validate_install.py "_build/$INSTALL_MANIFEST" "share/ci/install_manifest/$INSTALL_MANIFEST"
239244
shell: bash
240245

246+
- name: Website examples
247+
# Build the "hello, world" exrwriter example program from the
248+
# website, both to confirm it builds and as an example of an
249+
# application building against the just-installed openexr
250+
# libary, to validate the cmake configuration for downstream
251+
# applications.
252+
if: inputs.namespace == '' && inputs.msystem == '' && inputs.OPENEXR_BUILD_EXAMPLES != ''
253+
run: |
254+
set -x
255+
if [[ "$RUNNER_OS" == "Windows" ]]; then
256+
WORKSPACE=$(cygpath -u "$GITHUB_WORKSPACE")
257+
else
258+
WORKSPACE=$GITHUB_WORKSPACE
259+
fi
260+
INSTALL_DIR=$WORKSPACE/_install
261+
EXRWRITER_BUILD_DIR=$WORKSPACE/_build.exrwriter
262+
cmake -S website/src/exrwriter -B $EXRWRITER_BUILD_DIR \
263+
-DCMAKE_PREFIX_PATH=$INSTALL_DIR \
264+
-DCMAKE_VERBOSE_MAKEFILE=ON
265+
cmake --build $EXRWRITER_BUILD_DIR --config ${{ inputs.build-type }}
266+
if [[ "$RUNNER_OS" == "Windows" ]]; then
267+
export PATH="$INSTALL_DIR/bin;$INSTALL_DIR/lib;C:/Program Files (x86)/Imath/bin;C:/Program Files (x86)/Imath/lib;C:/Program Files (x86)/libdeflate/bin;C:/Program Files (x86)/libdeflate/lib;C:/Program Files (x86)/openjph/lib;C:/Program Files (x86)/openjph/bin;$PATH"
268+
EXRWRITER=$EXRWRITER_BUILD_DIR/${{ inputs.build-type }}/exrwriter.exe
269+
EXRINFO=$INSTALL_DIR/bin/exrinfo.exe
270+
else
271+
EXRWRITER=$EXRWRITER_BUILD_DIR/exrwriter
272+
EXRINFO=$INSTALL_DIR/bin/exrinfo
273+
fi
274+
if [ -x "$EXRWRITER" ]; then
275+
"$EXRWRITER"
276+
else
277+
echo "can't find exrwriter: $EXRWRITER"
278+
fi
279+
if [ -x "$EXRINFO" ]; then
280+
"$EXRINFO" stripes.exr
281+
else
282+
echo "can't find exrinfo: $EXRINFO"
283+
fi
284+
shell: bash
285+

.github/workflows/ci_workflow.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
OPENEXR_FORCE_INTERNAL_IMATH: ${{ matrix.OPENEXR_FORCE_INTERNAL_IMATH || 'OFF' }}
148148
OPENEXR_FORCE_INTERNAL_DEFLATE: ${{ matrix.OPENEXR_FORCE_INTERNAL_DEFLATE || 'OFF' }}
149149
OPENEXR_FORCE_INTERNAL_OPENJPH: ${{ matrix.OPENEXR_FORCE_INTERNAL_OPENJPH || 'OFF' }}
150+
CMAKE_OSX_ARCHITECTURES: ${{ matrix.CMAKE_OSX_ARCHITECTURES }}
150151
BUILD_TESTING: ${{ matrix.BUILD_TESTING || 'ON' }}
151152
validate_install: ${{ matrix.validate_install || 'ON' }}
152153

@@ -185,6 +186,11 @@ jobs:
185186
label: macos-13
186187
os: macos-13
187188

189+
- build: 7
190+
label: universal2
191+
CMAKE_OSX_ARCHITECTURES: "x86_64;arm64"
192+
193+
188194
windows:
189195
name: 'Windows.${{ matrix.build}}: ${{ matrix.label }}'
190196
uses: ./.github/workflows/ci_steps.yml
@@ -241,8 +247,8 @@ jobs:
241247
BUILD_TESTING: 'OFF'
242248

243249
- build: 6
244-
label: vfx2022
245-
os: windows-2019
250+
label: vfx2023
251+
os: windows-2022
246252

247253
# Build w/msys2, mingw32 and ucrt64, shared and static.
248254

.github/workflows/python-wheels-publish-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
output-dir: wheelhouse
6464
env:
6565
MACOSX_DEPLOYMENT_TARGET: 10.15
66-
CIBW_ARCHS_MACOS: x86_64 arm64
66+
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
6767
# Build Python 3.7 through 3.12.
6868
# Skip python 3.6 since scikit-build-core requires 3.7+
6969
# Skip 32-bit wheels builds on Windows

.github/workflows/python-wheels-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
output-dir: wheelhouse
5858
env:
5959
MACOSX_DEPLOYMENT_TARGET: 10.15
60-
CIBW_ARCHS_MACOS: x86_64 arm64
60+
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
6161
# Build Python 3.7 through 3.12.
6262
# Skip python 3.6 since scikit-build-core requires 3.7+
6363
# Skip 32-bit wheels builds on Windows

.github/workflows/python-wheels.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
branches-ignore:
1818
- RB-*
1919
paths:
20+
- 'cmake/**'
2021
- 'src/lib/**'
2122
- 'src/wrappers/python/**'
2223
- 'pyproject.toml'
@@ -27,6 +28,7 @@ on:
2728
branches-ignore:
2829
- RB-*
2930
paths:
31+
- 'cmake/**'
3032
- 'src/lib/**'
3133
- 'src/wrappers/python/**'
3234
- 'pyproject.toml'
@@ -73,7 +75,7 @@ jobs:
7375
- name: Build wheel
7476
uses: pypa/cibuildwheel@v2.23
7577
env:
76-
CIBW_ARCHS_MACOS: x86_64 arm64
78+
CIBW_ARCHS_MACOS: x86_64 arm64 universal2
7779
# Build Python 3.7 through 3.12.
7880
# Skip python 3.6 since scikit-build-core requires 3.7+
7981
# Skip 32-bit wheels builds on Windows

BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ expand_template(
6969
name = "OpenEXRConfigInternal",
7070
out = "src/lib/OpenEXR/OpenEXRConfigInternal.h",
7171
substitutions = {
72+
"#cmakedefine OPENEXR_USE_INTERNAL_DEFLATE 1": "#define OPENEXR_USE_INTERNAL_DEFLATE 0",
7273
"#cmakedefine OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1": "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1",
7374
"#cmakedefine OPENEXR_IMF_HAVE_DARWIN 1": "/* #undef OPENEXR_IMF_HAVE_DARWIN */",
7475
"#cmakedefine OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1": "/* #undef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX */",

CHANGES.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# OpenEXR Release Notes
55

6+
* [Version 3.3.4](#version-334-june-9-2025) June 9, 2025
67
* [Version 3.3.3](#version-333-march-23-2025) March 23, 2025
78
* [Version 3.3.2](#version-332-november-11-2024) November 11, 2024
89
* [Version 3.3.1](#version-331-october-8-2024) October 8, 2024
@@ -78,6 +79,37 @@
7879
* [Version 1.0.1](#version-101)
7980
* [Version 1.0](#version-10)
8081

82+
## Version 3.3.4 (June 9, 2025)
83+
84+
Patch release with several bug/build/performance fixes:
85+
86+
* :bug: Fix a crash with deep scanline input
87+
* :bug: Fix a bug when reading a file with missing tiles
88+
* :bug: Fix a crash in exrmetrics
89+
* :hammer_and_wrench: Fix a problem with /EHsc and /MP flags that broke CUDA compilation
90+
* :hammer_and_wrench: Fix a build failure on MinGW
91+
* :rocket: Enable vectorisation for ZIP reconstruct stage on Windows
92+
93+
### Merged Pull Requests
94+
95+
* [2047](https://github.com/AcademySoftwareFoundation/openexr/pull/2047)
96+
Use default generator for oss_fuzz
97+
* [2046](https://github.com/AcademySoftwareFoundation/openexr/pull/2046)
98+
Fix crash in exrmetrics when running in single part mode.
99+
* [2043](https://github.com/AcademySoftwareFoundation/openexr/pull/2043)
100+
Enable vectorisation for ZIP reconstruct stage on Windows
101+
* [2042](https://github.com/AcademySoftwareFoundation/openexr/pull/2042)
102+
Use CMake to build oss-fuzzers
103+
* [2036](https://github.com/AcademySoftwareFoundation/openexr/pull/2036)
104+
Allow partial reconstruction of the chunk table to succeed
105+
* [2021](https://github.com/AcademySoftwareFoundation/openexr/pull/2021)
106+
Fix handling of /EHsc and /MP flags
107+
* [2019](https://github.com/AcademySoftwareFoundation/openexr/pull/2019)
108+
Fix Deep Scanline Input crash when using a framebuffer as parameter
109+
* [2013](https://github.com/AcademySoftwareFoundation/openexr/pull/2013)
110+
simplify atomic pointer code for the chunk table
111+
112+
81113
## Version 3.3.3 (March 23, 2025)
82114

83115
Patch release with miscellaneous bug/build/documentation fixes:

README.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,45 @@ complete details, but to get started, the "Hello, world" [`exrwriter.cpp`](https
6464
#include <ImfRgbaFile.h>
6565
#include <ImfArray.h>
6666
#include <iostream>
67-
67+
6868
int
6969
main()
7070
{
71+
int width = 100;
72+
int height = 50;
73+
74+
Imf::Array2D<Imf::Rgba> pixels(height, width);
75+
for (int y=0; y<height; y++)
76+
{
77+
float c = (y / 5 % 2 == 0) ? (y / (float) height) : 0.0;
78+
for (int x=0; x<width; x++)
79+
pixels[y][x] = Imf::Rgba(c, c, c);
80+
}
81+
7182
try {
72-
int width = 10;
73-
int height = 10;
74-
75-
Imf::Array2D<Imf::Rgba> pixels(width, height);
76-
for (int y=0; y<height; y++)
77-
for (int x=0; x<width; x++)
78-
pixels[y][x] = Imf::Rgba(0, x / (width-1.0f), y / (height-1.0f));
79-
80-
Imf::RgbaOutputFile file ("hello.exr", width, height, Imf::WRITE_RGBA);
83+
Imf::RgbaOutputFile file ("stripes.exr", width, height, Imf::WRITE_RGBA);
8184
file.setFrameBuffer (&pixels[0][0], 1, width);
8285
file.writePixels (height);
8386
} catch (const std::exception &e) {
84-
std::cerr << "Unable to read image file hello.exr:" << e.what() << std::endl;
87+
std::cerr << "error writing image file stripes.exr:" << e.what() << std::endl;
8588
return 1;
8689
}
8790
return 0;
8891
}
8992

93+
This creates an image 100 pixels wide and 50 pixels high with
94+
horizontal stripes 5 pixels high of graduated intensity, bright on the
95+
bottom of the image and dark towards the top. Note that ``pixel[0][0]``
96+
is in the upper left:
97+
98+
![stripes](website/images/stripes.png)
99+
90100
The [`CMakeLists.txt`](https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr/main/website/src/exrwriter/CMakeLists.txt) to build:
91101

92102
cmake_minimum_required(VERSION 3.12)
93103
project(exrwriter)
94104
find_package(OpenEXR REQUIRED)
95-
105+
96106
add_executable(${PROJECT_NAME} exrwriter.cpp)
97107
target_link_libraries(${PROJECT_NAME} OpenEXR::OpenEXR)
98108

@@ -135,7 +145,7 @@ API](https://openexr.readthedocs.io/en/latest/API.html#the-openexr-api).
135145

136146
- Sign the [Contributor License
137147
Agreement](https://contributor.easycla.lfx.linuxfoundation.org/#/cla/project/2e8710cb-e379-4116-a9ba-964f83618cc5/user/564e571e-12d7-4857-abd4-898939accdd7)
138-
148+
139149
- Submit a Pull Request: https://github.com/AcademySoftwareFoundation/openexr/pulls
140150

141151
# Resources

cmake/LibraryDefine.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ function(OPENEXR_DEFINE_LIBRARY libname)
2424
PRIVATE cxx_std_${OPENEXR_CXX_STANDARD}
2525
INTERFACE cxx_std_17 )
2626

27-
# we are embedding libdeflate
28-
target_include_directories(${objlib} PRIVATE ${EXR_DEFLATE_INCLUDE_DIR})
29-
3027
if(OPENEXR_CURLIB_PRIV_EXPORT AND BUILD_SHARED_LIBS)
3128
target_compile_definitions(${objlib} PRIVATE ${OPENEXR_CURLIB_PRIV_EXPORT})
3229
if(WIN32)

cmake/OpenEXRConfig.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ if (@libdeflate_FOUND@)
1818
find_dependency(libdeflate)
1919
endif()
2020

21+
if (@openjph_FOUND@)
22+
find_dependency(openjph)
23+
endif()
24+
2125
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
2226
check_required_components("@PROJECT_NAME@")

0 commit comments

Comments
 (0)