Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 0 additions & 154 deletions .github/workflows/ci-macarm.yml

This file was deleted.

137 changes: 134 additions & 3 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,140 @@ jobs:
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to
# extract it from the headers, like the other modules.
#
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY.
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to
# the static version of the package.
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY.
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to
# the static version of the package.
run: |
cmake . \
-DCMAKE_PREFIX_PATH=../../../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dexpat_STATIC_LIBRARY=ON \
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DImath_STATIC_LIBRARY=ON \
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_STATIC_LIBRARY=ON \
-Dyaml-cpp_VERSION=0.7.0 \
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DZLIB_STATIC_LIBRARY=ON \
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dminizip-ng_STATIC_LIBRARY=ON
cmake --build . \
--config ${{ matrix.build-type }}
./consumer
working-directory: _build/tests/cmake-consumer-dist

# ---------------------------------------------------------------------------
# macOS Arm
# ---------------------------------------------------------------------------

macos-arm:
name: 'macOS 14 arm
<AppleClang
arch=${{ matrix.arch-type }},
config=${{ matrix.build-type }},
shared=${{ matrix.build-shared }},
simd=${{ matrix.use-simd }},
cxx=${{ matrix.cxx-standard }},
python=${{ matrix.python-version }},
docs=${{ matrix.build-docs }},
oiio=${{ matrix.use-oiio}}>'

runs-on: macos-14
strategy:
matrix:
build: [1, 2]
include:
- build: 1
arch-type: "arm64"
test-rosetta: "OFF"
build-type: Release
build-shared: 'ON'
build-docs: 'OFF'
build-openfx: 'OFF'
use-simd: 'ON'
use-oiio: 'OFF'
cxx-standard: 11
python-version: '3.11'
- build: 2
arch-type: "x86_64;arm64"
test-rosetta: "ON"
build-type: Release
build-shared: 'ON'
build-docs: 'OFF'
build-openfx: 'OFF'
use-simd: 'ON'
use-oiio: 'OFF'
cxx-standard: 11
python-version: '3.11'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v3
- name: Install docs env
run: share/ci/scripts/macos/install_docs_env.sh
if: matrix.build-docs == 'ON'
- name: Install tests env
run: share/ci/scripts/macos/install_tests_env.sh
- name: Create build directories
run: |
mkdir _install
mkdir _build
- name: Configure
run: |
cmake ../. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \
-DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \
-DOCIO_BUILD_DOCS=${{ matrix.build-docs }} \
-DOCIO_BUILD_OPENFX=${{ matrix.build-openfx }} \
-DOCIO_BUILD_GPU_TESTS=OFF \
-DOCIO_USE_SIMD=${{ matrix.use-simd }} \
-DOCIO_USE_OIIO_FOR_APPS=${{ matrix.use-oiio }} \
-DOCIO_INSTALL_EXT_PACKAGES=ALL \
-DOCIO_WARNING_AS_ERROR=ON \
-DPython_EXECUTABLE=$(which python) \
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch-type }}"
working-directory: _build
- name: Build
run: |
cmake --build . \
--target install \
--config ${{ matrix.build-type }} \
-- -j$(sysctl -n hw.ncpu)
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV
working-directory: _build
- name: Test
run: ctest -V -C ${{ matrix.build-type }}
working-directory: _build
- name: Test Rosetta
if: matrix.test-rosetta == 'ON'
run: |
/usr/bin/arch -x86_64 /bin/zsh -c "ctest -V -C ${{ matrix.build-type }}"
working-directory: _build
- name: Test CMake Consumer with shared OCIO
if: matrix.build-shared == 'ON'
run: |
cmake . \
-DCMAKE_PREFIX_PATH=../../../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
cmake --build . \
--config ${{ matrix.build-type }}
./consumer
working-directory: _build/tests/cmake-consumer-dist
- name: Test CMake Consumer with static OCIO
if: matrix.build-shared == 'OFF'
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to
# extract it from the headers, like the other modules.
#
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY.
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to
# the static version of the package.
run: |
cmake . \
-DCMAKE_PREFIX_PATH=../../../_install \
Expand Down
29 changes: 21 additions & 8 deletions tests/cpu/CPUProcessor_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2772,14 +2772,27 @@ void ComputeImage(unsigned width, unsigned height, unsigned nChannels,
for(size_t idx=0; idx<(width*height);)
{
// Manual computation of the results.

const float pxl[4]{ (float(inValues[idx+0]) * inScale + (float)offset4[0]) * outScale,
(float(inValues[idx+1]) * inScale + (float)offset4[1]) * outScale,
(float(inValues[idx+2]) * inScale + (float)offset4[2]) * outScale,
nChannels==4
? ((float(inValues[idx+3]) * inScale + (float)offset4[3]) * outScale)
: 0.0f
};
// Break operations into steps similar to cpu processor
// to avoid potential fma compiler optimizations
const float in_scale[4]{ float(inValues[idx+0]) * inScale,
float(inValues[idx+1]) * inScale,
float(inValues[idx+2]) * inScale,
nChannels==4
? float(inValues[idx+3]) * inScale
: 0.0f
};

const float operation[4]{ in_scale[0] + (float)offset4[0],
in_scale[1] + (float)offset4[1],
in_scale[2] + (float)offset4[2],
in_scale[3] + (float)offset4[3],
};

const float pxl[4]{ operation[0] * outScale,
operation[1] * outScale,
operation[2] * outScale,
operation[3] * outScale,
};

// Validate all the results.

Expand Down
38 changes: 34 additions & 4 deletions tests/cpu/fileformats/FileFormatCTF_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6934,8 +6934,23 @@ OCIO_ADD_TEST(CTFTransform, grading_rgbcurve_lin_ctf)
</ProcessList>
)" };

OCIO_CHECK_EQUAL(expected.size(), outputTransform.str().size());
OCIO_CHECK_EQUAL(expected, outputTransform.str());
const StringUtils::StringVec osvec = StringUtils::SplitByLines(outputTransform.str());
const StringUtils::StringVec resvec = StringUtils::SplitByLines(expected);
OCIO_CHECK_EQUAL(osvec.size(), resvec.size());
for(unsigned int i = 0; i < resvec.size(); ++i)
{
if ( (i >= 5 && i <= 7) ||
(i >= 12 && i <= 15) ||
(i == 18))
{
OCIO_CHECK_STR_FLOAT_VEC_CLOSE(osvec[i], resvec[i], 1e-5f);
}
else
{
OCIO_CHECK_EQUAL(osvec[i], resvec[i]);
}

}
}

// All curves are default curves, no curve is saved.
Expand Down Expand Up @@ -8326,8 +8341,23 @@ R"(<?xml version="1.0" encoding="UTF-8"?>
</LUT3D>
</ProcessList>
)" };
OCIO_CHECK_EQUAL(expectedCLF.size(), output1.str().size());
OCIO_CHECK_EQUAL(expectedCLF, output1.str());

const StringUtils::StringVec osvec = StringUtils::SplitByLines(output1.str());
const StringUtils::StringVec resvec = StringUtils::SplitByLines(expectedCLF);
OCIO_CHECK_EQUAL(osvec.size(), resvec.size());
for(unsigned int i = 0; i < resvec.size(); ++i)
{
if ( (i >= 10 && i <= 19) ||
(i >= 24 && i <= 31))
{
OCIO_CHECK_STR_FLOAT_VEC_CLOSE(osvec[i], resvec[i], 1e-5f);
}
else
{
OCIO_CHECK_EQUAL(osvec[i], resvec[i]);
}

}
}

OCIO_ADD_TEST(FileFormatCTF, lut_interpolation_option)
Expand Down
Loading