Compare commits

...
1 Commits
Author SHA1 Message Date
fa521922c9 Create RB-2.3.2 release (#1940)
* Fix ssse3 detection typo (#1929)

Signed-off-by: Mark Reid <mindmark@gmail.com>
(cherry picked from commit 003b6a19e6)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* fix: use system `include pystring.h` for `ConfigUtils.cpp` (#1921)

Signed-off-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
(cherry picked from commit e747e9c0bd)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Fix narrowing conversion error on riscv64 (#1924)

Signed-off-by: phancb <nxhsdu@qq.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
(cherry picked from commit a95febc70e)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Add manylinux_2_28 Python wheels (#1933)

Signed-off-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
(cherry picked from commit f9250992eb)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Enhance ociochecklut to print the output after each step in a multi-t… (#1925)

* Enhance ociochecklut to print the output after each step in a multi-transform LUT

Signed-off-by: pylee <penne.y.lee@intel.com>

* Review feedback to enable printe of transforms list when using -s flag.

Signed-off-by: pylee <penne.y.lee@intel.com>

* Print transform description for each step instead.

Signed-off-by: pylee <penne.y.lee@intel.com>

---------

Signed-off-by: pylee <penne.y.lee@intel.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
(cherry picked from commit aadf595946)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Fix AVX instructions used on CPUs that don't support them (#1935)

* Fix AVX instructions used on CPUs that don't support them

It's supposed to check all bits are enabled, not just one of them.
This causes a crash using OpenColorIO on older CPUs.

Thanks to Ray Molenkamp for help tracking this down.

Signed-off-by: Brecht Van Lommel <brecht@blender.org>

* Fix another case pointed out in review

Signed-off-by: Brecht Van Lommel <brecht@blender.org>

---------

Signed-off-by: Brecht Van Lommel <brecht@blender.org>
(cherry picked from commit 0c90ded166)
Signed-off-by: Doug Walker <doug.walker@autodesk.com>

* Increment library version to 2.3.2

Signed-off-by: Doug Walker <doug.walker@autodesk.com>

---------

Signed-off-by: Mark Reid <mindmark@gmail.com>
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: phancb <nxhsdu@qq.com>
Signed-off-by: Rémi Achard <remiachard@gmail.com>
Signed-off-by: pylee <penne.y.lee@intel.com>
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Mark Reid <mindmark@gmail.com>
Co-authored-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
Co-authored-by: Rémi Achard <remiachard@gmail.com>
Co-authored-by: Michael Dolan <michdolan@gmail.com>
Co-authored-by: PenneLee <penne.y.lee@intel.com>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-01-30 02:11:35 -05:00
8 changed files with 197 additions and 72 deletions
+55 -14
View File
@@ -78,45 +78,84 @@ jobs:
matrix:
include:
# -------------------------------------------------------------------
# CPython 64 bits
# CPython 64 bits manylinux_2_28
# -------------------------------------------------------------------
- build: CPython 3.7 64 bits
- build: CPython 3.7 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp37-manylinux*
arch: x86_64
- build: CPython 3.8 64 bits
- build: CPython 3.8 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp38-manylinux*
arch: x86_64
- build: CPython 3.9 64 bits
- build: CPython 3.9 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp39-manylinux*
arch: x86_64
- build: CPython 3.10 64 bits
- build: CPython 3.10 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp310-manylinux*
arch: x86_64
- build: CPython 3.11 64 bits
- build: CPython 3.11 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp311-manylinux*
arch: x86_64
- build: CPython 3.12 64 bits
- build: CPython 3.12 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp312-manylinux*
arch: x86_64
# -------------------------------------------------------------------
# CPython ARM 64 bits
# CPython 64 bits manylinux2014
# -------------------------------------------------------------------
- build: CPython 3.7 ARM 64 bits
- build: CPython 3.7 64 bits manylinux2014
manylinux: manylinux2014
python: cp37-manylinux*
arch: x86_64
- build: CPython 3.8 64 bits manylinux2014
manylinux: manylinux2014
python: cp38-manylinux*
arch: x86_64
- build: CPython 3.9 64 bits manylinux2014
manylinux: manylinux2014
python: cp39-manylinux*
arch: x86_64
- build: CPython 3.10 64 bits manylinux2014
manylinux: manylinux2014
python: cp310-manylinux*
arch: x86_64
- build: CPython 3.11 64 bits manylinux2014
manylinux: manylinux2014
python: cp311-manylinux*
arch: x86_64
- build: CPython 3.12 64 bits manylinux2014
manylinux: manylinux2014
python: cp312-manylinux*
arch: x86_64
# -------------------------------------------------------------------
# CPython ARM 64 bits manylinux2014
# -------------------------------------------------------------------
- build: CPython 3.7 ARM 64 bits manylinux2014
manylinux: manylinux2014
python: cp37-manylinux*
arch: aarch64
- build: CPython 3.8 ARM 64 bits
- build: CPython 3.8 ARM 64 bits manylinux2014
manylinux: manylinux2014
python: cp38-manylinux*
arch: aarch64
- build: CPython 3.9 ARM 64 bits
- build: CPython 3.9 ARM 64 bits manylinux2014
manylinux: manylinux2014
python: cp39-manylinux*
arch: aarch64
- build: CPython 3.10 ARM 64 bits
- build: CPython 3.10 ARM 64 bits manylinux2014
manylinux: manylinux2014
python: cp310-manylinux*
arch: aarch64
- build: CPython 3.11 ARM 64 bits
- build: CPython 3.11 ARM 64 bits manylinux2014
manylinux: manylinux2014
python: cp311-manylinux*
arch: aarch64
- build: CPython 3.12 ARM 64 bits
- build: CPython 3.12 ARM 64 bits manylinux2014
manylinux: manylinux2014
python: cp312-manylinux*
arch: aarch64
@@ -138,6 +177,8 @@ jobs:
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux }}
- uses: actions/upload-artifact@v3
with:
+1 -1
View File
@@ -29,7 +29,7 @@ endif()
# Project definition.
project(OpenColorIO
VERSION 2.3.1
VERSION 2.3.2
DESCRIPTION "OpenColorIO (OCIO) is a complete color management solution"
HOMEPAGE_URL https://github.com/AcademySoftwareFoundation/OpenColorIO
LANGUAGES CXX C)
-4
View File
@@ -26,10 +26,6 @@ test-command = [
"ociocheck"
]
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
[tool.cibuildwheel.linux]
before-build = "share/ci/scripts/linux/yum/install_docs_env.sh"
+1 -1
View File
@@ -13,7 +13,7 @@ endif()
# MSVC doesn't have flags
if(USE_GCC OR USE_CLANG)
set(CMAKE_CXX_FLAGS "-w -msse3")
set(CMAKE_CXX_FLAGS "-w -mssse3")
endif()
if (APPLE AND __universal_build)
+3 -3
View File
@@ -107,10 +107,10 @@ CPUInfo::CPUInfo()
flags |= X86_CPU_FLAG_SSE42;
/* Check OSXSAVE and AVX bits */
if (info.reg.ecx & 0x18000000)
if ((info.reg.ecx & 0x18000000) == 0x18000000)
{
xcr = xgetbv();
if(xcr & 0x6) {
if((xcr & 0x6) == 0x6) {
flags |= X86_CPU_FLAG_AVX;
if(info.reg.ecx & 0x20000000) {
@@ -129,7 +129,7 @@ CPUInfo::CPUInfo()
/* OPMASK/ZMM state */
if ((xcr & 0xe0) == 0xe0) {
if ((flags & X86_CPU_FLAG_AVX2) && (info.reg.ebx & 0xd0030000))
if ((flags & X86_CPU_FLAG_AVX2) && ((info.reg.ebx & 0xd0030000) == 0xd0030000))
flags |= X86_CPU_FLAG_AVX512;
}
}
+2 -1
View File
@@ -1,9 +1,10 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.
#include <pystring.h>
#include "ConfigUtils.h"
#include "MathUtils.h"
#include "pystring/pystring.h"
#include "utils/StringUtils.h"
namespace OCIO_NAMESPACE
+134 -47
View File
@@ -50,12 +50,16 @@ public:
void setGPU(OCIO::ConstGPUProcessorRcPtr gpu)
{
m_gpu = gpu;
m_oglApp = OCIO::OglApp::CreateOglApp("ociochecklut", 256, 20);
if (m_verbose)
if (!m_oglApp)
{
m_oglApp->printGLInfo();
m_oglApp = OCIO::OglApp::CreateOglApp("ociochecklut", 256, 20);
if (m_verbose)
{
m_oglApp->printGLInfo();
}
}
m_oglApp->setPrintShader(m_verbose);
float image[4]{ 0.f, 0.f, 0.f, 0.f };
m_oglApp->initImage(1, 1, OCIO::OglApp::COMPONENTS_RGBA, image);
@@ -191,6 +195,7 @@ int main (int argc, const char* argv[])
bool usegpu = false;
bool usegpuLegacy = false;
bool outputgpuInfo = false;
bool stepInfo = false;
ArgParse ap;
ap.options("ociochecklut -- check any LUT file and optionally convert a pixel\n\n"
@@ -199,6 +204,7 @@ int main (int argc, const char* argv[])
"<SEPARATOR>", "Options:",
"-t", &test, "Test a set a predefined RGB values",
"-v", &verbose, "Verbose",
"-s", &stepInfo, "Print the output after each step in a multi - transform LUT",
"--help", &help, "Print help message",
"--inv", &invlut, "Apply LUT in inverse direction",
"--gpu", &usegpu, "Use GPU instead of CPU",
@@ -346,7 +352,7 @@ int main (int argc, const char* argv[])
0.f, 1.f, 0.f,
0.f, 0.f, 1.f };
if (verbose)
if (verbose || stepInfo)
{
std::cout << std::endl;
}
@@ -357,59 +363,140 @@ int main (int argc, const char* argv[])
{
std::vector<float> pixel = { input[curPix], input[curPix+1], input[curPix+2],
comp == 3 ? 0.0f : input[curPix + 3] };
try
{
proc.apply(pixel);
}
catch (const OCIO::Exception & e)
{
std::cerr << "ERROR: Processing pixel: " << e.what() << std::endl;
return 1;
}
catch (...)
{
std::cerr << "ERROR: Unknown error encountered while processing pixel." << std::endl;
return 1;
}
// Print to string so that in & out values can be aligned if needed.
std::vector<std::string> out;
ToString(out, pixel, 0, comp);
if (verbose)
if (stepInfo)
{
std::vector<std::string> in;
ToString(in, input, curPix, comp);
std::cout << "Input [R G B";
if (comp == 4)
// Process each step in a multi - transform LUT
try
{
std::cout << " A";
}
std::cout << "]: [";
PrintAlignedVec(in, out, comp);
std::cout << "]" << std::endl;
// Create GroupTransform so that each can be processed one at a time.
auto processor = config->getProcessor(t);
auto transform = processor->createGroupTransform();
std::vector<float> inputPixel = pixel;
std::vector<float> outputPixel = pixel;
const auto numTransforms = transform->getNumTransforms();
std::cout << std::endl;
std::cout << "Output [R G B";
if (comp == 4)
{
std::cout << " A";
for (int i = 0; i < numTransforms; ++i)
{
auto transformStep = transform->getTransform(i);
auto processorStep = config->getProcessor(transformStep);
if (usegpu || usegpuLegacy)
{
proc.setGPU(usegpuLegacy ? processorStep->getOptimizedLegacyGPUProcessor(OCIO::OPTIMIZATION_DEFAULT, 32)
: processorStep->getDefaultGPUProcessor());
}
else
{
proc.setCPU(processorStep->getDefaultCPUProcessor());
}
// Process the pixel
proc.apply(outputPixel);
// Print the input/output pixel
std::vector<std::string> in;
ToString(in, inputPixel, 0, comp);
std::vector<std::string> out;
ToString(out, outputPixel, 0, comp);
std::cout << "\n" << *(transform->getTransform(i)) << std::endl;
std::cout << "Input [R G B";
if (comp == 4)
{
std::cout << " A";
}
std::cout << "]: [";
PrintAlignedVec(in, out, comp);
std::cout << "]" << std::endl;
std::cout << "Output [R G B";
if (comp == 4)
{
std::cout << " A";
}
std::cout << "]: [";
PrintAlignedVec(out, in, comp);
std::cout << "]" << std::endl;
inputPixel = outputPixel;
}
}
std::cout << "]: [";
PrintAlignedVec(out, in, comp);
std::cout << "]" << std::endl;
catch (const OCIO::Exception& exception)
{
std::cerr << "ERROR: " << exception.what() << std::endl;
return 1;
}
catch (...)
{
std::cerr << "ERROR: Unknown error encountered while processing single step operator." << std::endl;
return 1;
}
curPix += comp;
}
else
{
std::cout << out[0] << " " << out[1] << " " << out[2];
if (comp == 4)
// Process in a single step
try
{
std::cout << " " << out[3];
proc.apply(pixel);
}
catch (const OCIO::Exception& e)
{
std::cerr << "ERROR: Processing pixel: " << e.what() << std::endl;
return 1;
}
catch (...)
{
std::cerr << "ERROR: Unknown error encountered while processing pixel." << std::endl;
return 1;
}
// Print to string so that in & out values can be aligned if needed.
std::vector<std::string> out;
ToString(out, pixel, 0, comp);
std::cout << std::endl;
}
curPix += comp;
if (verbose)
{
std::vector<std::string> in;
ToString(in, input, curPix, comp);
std::cout << "Input [R G B";
if (comp == 4)
{
std::cout << " A";
}
std::cout << "]: [";
PrintAlignedVec(in, out, comp);
std::cout << "]" << std::endl;
std::cout << "Output [R G B";
if (comp == 4)
{
std::cout << " A";
}
std::cout << "]: [";
PrintAlignedVec(out, in, comp);
std::cout << "]" << std::endl;
}
else
{
std::cout << out[0] << " " << out[1] << " " << out[2];
if (comp == 4)
{
std::cout << " " << out[3];
}
std::cout << std::endl;
}
curPix += comp;
}
}
else if (test)
{
+1 -1
View File
@@ -53,7 +53,7 @@ OCIO_ADD_TEST(StringUtils, trim)
{
// Test that no assert happens when the Trim argument is not an unsigned char (see issue #1874).
constexpr char ref2[]{ -1, -2, -3, '\0' };
constexpr char ref2[]{ char(-1), char(-2), char(-3), '\0' };
const std::string str = StringUtils::Trim(ref2);
}
}