Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/python_cibuildwheels' into pytho…
Browse files Browse the repository at this point in the history
…n_cibuildwheels
  • Loading branch information
zachlewis committed Sep 23, 2024
2 parents b11c4f5 + 18d192f commit 0879030
Show file tree
Hide file tree
Showing 34 changed files with 734 additions and 285 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ jobs:
simd: avx2,f16c
setenvs: export LIBJPEGTURBO_VERSION=3.0.3
LIBRAW_VERSION=0.21.2
LIBTIFF_VERSION=v4.6.0
LIBTIFF_VERSION=v4.7.0
OPENJPEG_VERSION=v2.5.2
PTEX_VERSION=v2.4.3
PUGIXML_VERSION=v1.14
Expand Down Expand Up @@ -377,8 +377,8 @@ jobs:
python_ver: "3.10"
simd: avx2,f16c
setenvs: export OpenImageIO_BUILD_LOCAL_DEPS=all
LIBJPEGTURBO_VERSION=3.0.1
LIBRAW_VERSION=0.21.2
LIBJPEGTURBO_VERSION=3.0.4
LIBRAW_VERSION=0.21.3
OPENJPEG_VERSION=v2.4.0
PTEX_VERSION=v2.4.2
PUGIXML_VERSION=v1.14
Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_Freetype.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -ex

# Repo and branch/tag/commit of Freetype to download if we don't have it yet
FREETYPE_REPO=${FREETYPE_REPO:=https://github.com/freetype/freetype.git}
FREETYPE_VERSION=${FREETYPE_VERSION:=VER-2-13-2}
FREETYPE_VERSION=${FREETYPE_VERSION:=VER-2-13-3}

# Where to put Freetype repo source (default to the ext area)
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_OpenJPEG.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -ex

# Repo and branch/tag/commit of OpenJPEG to download if we don't have it yet
OPENJPEG_REPO=${OPENJPEG_REPO:=https://github.com/uclouvain/openjpeg.git}
OPENJPEG_VERSION=${OPENJPEG_VERSION:=v2.4.0}
OPENJPEG_VERSION=${OPENJPEG_VERSION:=v2.5.2}

# Where to put OpenJPEG repo source (default to the ext area)
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_libjpeg-turbo.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -ex

# Repo and branch/tag/commit of libjpeg-turbo to download if we don't have it yet
LIBJPEGTURBO_REPO=${LIBJPEGTURBO_REPO:=https://github.com/libjpeg-turbo/libjpeg-turbo.git}
LIBJPEGTURBO_VERSION=${LIBJPEGTURBO_VERSION:=3.0.0}
LIBJPEGTURBO_VERSION=${LIBJPEGTURBO_VERSION:=3.0.4}

# Where to put libjpeg-turbo repo source (default to the ext area)
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_libraw.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -ex

# Which LibRaw to retrieve, how to build it
LIBRAW_REPO=${LIBRAW_REPO:=https://github.com/LibRaw/LibRaw.git}
LIBRAW_VERSION=${LIBRAW_VERSION:=0.21.2}
LIBRAW_VERSION=${LIBRAW_VERSION:=0.21.3}

# Where to install the final results
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_libtiff.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LIBTIFF_REPO=${LIBTIFF_REPO:=https://gitlab.com/libtiff/libtiff.git}
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
LIBTIFF_BUILD_DIR=${LIBTIFF_BUILD_DIR:=${LOCAL_DEPS_DIR}/libtiff}
LIBTIFF_INSTALL_DIR=${LIBTIFF_INSTALL_DIR:=${PWD}/ext/dist}
LIBTIFF_VERSION=${LIBTIFF_VERSION:=v4.3.0}
LIBTIFF_VERSION=${LIBTIFF_VERSION:=v4.6.0}
LIBTIFF_BUILD_TYPE=${LIBTIFF_BUILD_TYPE:=Release}
if [[ `uname` == "Linux" ]] ; then
LIBTIFF_CXX_FLAGS=${LIBTIFF_CXX_FLAGS:="-O3 -Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"}
Expand Down
2 changes: 1 addition & 1 deletion src/cmake/build_libjpeg-turbo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
# https://github.com/Academ SoftwareFoundation/OpenImageIO

set_cache (libjpeg-turbo_BUILD_VERSION 3.0.3 "libjpeg-turbo version for local builds")
set_cache (libjpeg-turbo_BUILD_VERSION 3.0.4 "libjpeg-turbo version for local builds")
set (libjpeg-turbo_GIT_REPOSITORY "https://github.com/libjpeg-turbo/libjpeg-turbo")
set (libjpeg-turbo_GIT_TAG "${libjpeg-turbo_BUILD_VERSION}")
set_cache (libjpeg-turbo_BUILD_SHARED_LIBS OFF #${LOCAL_BUILD_SHARED_LIBS_DEFAULT}
Expand Down
10 changes: 10 additions & 0 deletions src/cmake/compiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,16 @@ if (CODECOV AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
endif ()


###########################################################################
# Profiling
#
set_cache (PROFILER "" "Build executables with profiler support (choices: gperftools)")
if (PROFILER STREQUAL "gperftools")
find_library(PROFILER_LIBRARIES NAMES profiler)
message (STATUS "Compiling for profiling with ${PROFILER}, found ${PROFILER_LIBRARIES}")
endif ()


###########################################################################
# Sanitizer options
#
Expand Down
14 changes: 8 additions & 6 deletions src/doc/imagebuf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ Getting and setting pixel values
.. doxygenfunction:: OIIO::ImageBuf::getchannel
.. doxygenfunction:: OIIO::ImageBuf::getpixel(int x, int y, int z, float *pixel, int maxchannels = 1000, WrapMode wrap = WrapBlack) const

.. doxygenfunction:: OIIO::ImageBuf::interppixel
.. doxygenfunction:: OIIO::ImageBuf::interppixel_bicubic
.. doxygenfunction:: OIIO::ImageBuf::interppixel_NDC
.. doxygenfunction:: OIIO::ImageBuf::interppixel_bicubic_NDC
.. doxygenfunction:: OIIO::ImageBuf::interppixel(float, float, span<float>, WrapMode) const
.. doxygenfunction:: OIIO::ImageBuf::interppixel_bicubic(float, float, span<float>, WrapMode) const
.. doxygenfunction:: OIIO::ImageBuf::interppixel_NDC(float, float, span<float>, WrapMode) const
.. doxygenfunction:: OIIO::ImageBuf::interppixel_bicubic_NDC(float, float, span<float>, WrapMode) const

.. doxygenfunction:: OIIO::ImageBuf::setpixel(int x, int y, int z, cspan<float> pixel)
.. doxygenfunction:: OIIO::ImageBuf::setpixel(int i, cspan<float> pixel)
Expand All @@ -175,8 +175,10 @@ Getting and setting pixel values
**Getting and setting regions of pixels -- fast**

.. doxygenfunction:: OIIO::ImageBuf::get_pixels
.. doxygenfunction:: OIIO::ImageBuf::set_pixels
.. doxygenfunction:: OIIO::ImageBuf::get_pixels(ROI, span<T>, stride_t, stride_t, stride_t) const
.. doxygenfunction:: OIIO::ImageBuf::get_pixels(ROI, span<T>, T*, stride_t, stride_t, stride_t) const
.. doxygenfunction:: OIIO::ImageBuf::set_pixels(ROI, span<T>, stride_t, stride_t, stride_t)
.. doxygenfunction:: OIIO::ImageBuf::set_pixels(ROI, span<T>, const T*, stride_t, stride_t, stride_t)



Expand Down
37 changes: 37 additions & 0 deletions src/doc/imagebufalgo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,43 @@ Shuffling channels
|

.. doxygengroup:: st_warp
..
..
Examples:
FIX ME! This is not complete, examples need to be added to docs-examples-imagebufalgo.{cpp,py}
.. tabs::

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

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

.. tab:: oiiotool
.. code-block:: bash
oiiotool mandrill.tif distortion_st.tif --st_warp -o mandrill_distorted.tif
# Using an `st` map authored in terms of a lower-left origin (e.g. by
# Nuke), so flip the vertical (`t`) coordinate.
oiiotool mandrill.tif st_from_nuke.tif --st_warp:filter=triangle:flip_t=1 -o mandrill_distorted.tif
oiiotool grid.exr --st_warp 0.7071068,0.7071068,0,-0.7071068,0.7071068,0,20,-8.284271,1 -o out.exr
|

.. doxygenfunction:: demosaic(const ImageBuf &src, KWArgs options = {}, ROI roi = {}, int nthreads = 0)
..
Expand Down
20 changes: 20 additions & 0 deletions src/doc/pythonbindings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2696,6 +2696,26 @@ Image transformations and data movement
.. py:method:: ImageBuf ImageBufAlgo.st_warp (src, M, filtername="", filtersize=0.0, wrap="default", recompute_roi=False, roi=ROI.All, nthreads=0)
bool ImageBufAlgo.st_warp (dst, src, M, filtername="", filtersize=0.0, wrap="default", recompute_roi=False, roi=ROI.All, nthreads=0)
Compute a warped (transformed) copy of `src`, with the warp specified by
`M` consisting of 9 floating-point numbers representing a 3x3
transformation matrix. If the filter and size are not specified, an
appropriate default will be chosen.
Example:
.. code-block:: python
# distortion_st.tif is a map where every pixel value contains the 2D
# coordinate of where to copy from.
Distort = ImageBuf("distortion_st.tif")
Src = ImageBuf("tahoe.exr")
Dst = ImageBufAlgo.st_warp(Src, Distort)
.. py:method:: ImageBuf ImageBufAlgo.resize (src, filtername="", filtersize=0.0, roi=ROI.All, nthreads=0)
bool ImageBufAlgo.resize (dst, src, filtername="", filtersize=0.0, roi=ROI.All, nthreads=0)
Expand Down
Loading

0 comments on commit 0879030

Please sign in to comment.