Skip to content

Commit fa52192

Browse files
doug-walkermarkreidvfxchenrui333phanenremia
authored
Create RB-2.3.2 release (#1940)
* Fix ssse3 detection typo (#1929) Signed-off-by: Mark Reid <[email protected]> (cherry picked from commit 003b6a1) Signed-off-by: Doug Walker <[email protected]> * fix: use system `include pystring.h` for `ConfigUtils.cpp` (#1921) Signed-off-by: Rui Chen <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit e747e9c) Signed-off-by: Doug Walker <[email protected]> * Fix narrowing conversion error on riscv64 (#1924) Signed-off-by: phancb <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit a95febc) Signed-off-by: Doug Walker <[email protected]> * Add manylinux_2_28 Python wheels (#1933) Signed-off-by: Rémi Achard <[email protected]> Co-authored-by: Michael Dolan <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit f925099) Signed-off-by: Doug Walker <[email protected]> * 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 <[email protected]> * Review feedback to enable printe of transforms list when using -s flag. Signed-off-by: pylee <[email protected]> * Print transform description for each step instead. Signed-off-by: pylee <[email protected]> --------- Signed-off-by: pylee <[email protected]> Co-authored-by: Doug Walker <[email protected]> (cherry picked from commit aadf595) Signed-off-by: Doug Walker <[email protected]> * 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 <[email protected]> * Fix another case pointed out in review Signed-off-by: Brecht Van Lommel <[email protected]> --------- Signed-off-by: Brecht Van Lommel <[email protected]> (cherry picked from commit 0c90ded) Signed-off-by: Doug Walker <[email protected]> * Increment library version to 2.3.2 Signed-off-by: Doug Walker <[email protected]> --------- Signed-off-by: Mark Reid <[email protected]> Signed-off-by: Doug Walker <[email protected]> Signed-off-by: Rui Chen <[email protected]> Signed-off-by: phancb <[email protected]> Signed-off-by: Rémi Achard <[email protected]> Signed-off-by: pylee <[email protected]> Signed-off-by: Brecht Van Lommel <[email protected]> Co-authored-by: Mark Reid <[email protected]> Co-authored-by: Rui Chen <[email protected]> Co-authored-by: phanium <[email protected]> Co-authored-by: Rémi Achard <[email protected]> Co-authored-by: Michael Dolan <[email protected]> Co-authored-by: PenneLee <[email protected]> Co-authored-by: Brecht Van Lommel <[email protected]>
1 parent 92db29b commit fa52192

File tree

8 files changed

+196
-71
lines changed

8 files changed

+196
-71
lines changed

.github/workflows/wheel_workflow.yml

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,45 +78,84 @@ jobs:
7878
matrix:
7979
include:
8080
# -------------------------------------------------------------------
81-
# CPython 64 bits
81+
# CPython 64 bits manylinux_2_28
8282
# -------------------------------------------------------------------
83-
- build: CPython 3.7 64 bits
83+
- build: CPython 3.7 64 bits manylinux_2_28
84+
manylinux: manylinux_2_28
8485
python: cp37-manylinux*
8586
arch: x86_64
86-
- build: CPython 3.8 64 bits
87+
- build: CPython 3.8 64 bits manylinux_2_28
88+
manylinux: manylinux_2_28
8789
python: cp38-manylinux*
8890
arch: x86_64
89-
- build: CPython 3.9 64 bits
91+
- build: CPython 3.9 64 bits manylinux_2_28
92+
manylinux: manylinux_2_28
9093
python: cp39-manylinux*
9194
arch: x86_64
92-
- build: CPython 3.10 64 bits
95+
- build: CPython 3.10 64 bits manylinux_2_28
96+
manylinux: manylinux_2_28
9397
python: cp310-manylinux*
9498
arch: x86_64
95-
- build: CPython 3.11 64 bits
99+
- build: CPython 3.11 64 bits manylinux_2_28
100+
manylinux: manylinux_2_28
96101
python: cp311-manylinux*
97102
arch: x86_64
98-
- build: CPython 3.12 64 bits
103+
- build: CPython 3.12 64 bits manylinux_2_28
104+
manylinux: manylinux_2_28
99105
python: cp312-manylinux*
100106
arch: x86_64
101107
# -------------------------------------------------------------------
102-
# CPython ARM 64 bits
108+
# CPython 64 bits manylinux2014
103109
# -------------------------------------------------------------------
104-
- build: CPython 3.7 ARM 64 bits
110+
- build: CPython 3.7 64 bits manylinux2014
111+
manylinux: manylinux2014
112+
python: cp37-manylinux*
113+
arch: x86_64
114+
- build: CPython 3.8 64 bits manylinux2014
115+
manylinux: manylinux2014
116+
python: cp38-manylinux*
117+
arch: x86_64
118+
- build: CPython 3.9 64 bits manylinux2014
119+
manylinux: manylinux2014
120+
python: cp39-manylinux*
121+
arch: x86_64
122+
- build: CPython 3.10 64 bits manylinux2014
123+
manylinux: manylinux2014
124+
python: cp310-manylinux*
125+
arch: x86_64
126+
- build: CPython 3.11 64 bits manylinux2014
127+
manylinux: manylinux2014
128+
python: cp311-manylinux*
129+
arch: x86_64
130+
- build: CPython 3.12 64 bits manylinux2014
131+
manylinux: manylinux2014
132+
python: cp312-manylinux*
133+
arch: x86_64
134+
# -------------------------------------------------------------------
135+
# CPython ARM 64 bits manylinux2014
136+
# -------------------------------------------------------------------
137+
- build: CPython 3.7 ARM 64 bits manylinux2014
138+
manylinux: manylinux2014
105139
python: cp37-manylinux*
106140
arch: aarch64
107-
- build: CPython 3.8 ARM 64 bits
141+
- build: CPython 3.8 ARM 64 bits manylinux2014
142+
manylinux: manylinux2014
108143
python: cp38-manylinux*
109144
arch: aarch64
110-
- build: CPython 3.9 ARM 64 bits
145+
- build: CPython 3.9 ARM 64 bits manylinux2014
146+
manylinux: manylinux2014
111147
python: cp39-manylinux*
112148
arch: aarch64
113-
- build: CPython 3.10 ARM 64 bits
149+
- build: CPython 3.10 ARM 64 bits manylinux2014
150+
manylinux: manylinux2014
114151
python: cp310-manylinux*
115152
arch: aarch64
116-
- build: CPython 3.11 ARM 64 bits
153+
- build: CPython 3.11 ARM 64 bits manylinux2014
154+
manylinux: manylinux2014
117155
python: cp311-manylinux*
118156
arch: aarch64
119-
- build: CPython 3.12 ARM 64 bits
157+
- build: CPython 3.12 ARM 64 bits manylinux2014
158+
manylinux: manylinux2014
120159
python: cp312-manylinux*
121160
arch: aarch64
122161

@@ -138,6 +177,8 @@ jobs:
138177
env:
139178
CIBW_BUILD: ${{ matrix.python }}
140179
CIBW_ARCHS: ${{ matrix.arch }}
180+
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux }}
181+
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux }}
141182

142183
- uses: actions/upload-artifact@v3
143184
with:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ endif()
2929
# Project definition.
3030

3131
project(OpenColorIO
32-
VERSION 2.3.1
32+
VERSION 2.3.2
3333
DESCRIPTION "OpenColorIO (OCIO) is a complete color management solution"
3434
HOMEPAGE_URL https://github.com/AcademySoftwareFoundation/OpenColorIO
3535
LANGUAGES CXX C)

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ test-command = [
2626
"ociocheck"
2727
]
2828

29-
manylinux-x86_64-image = "manylinux2014"
30-
manylinux-i686-image = "manylinux2014"
31-
manylinux-aarch64-image = "manylinux2014"
32-
3329
[tool.cibuildwheel.linux]
3430
before-build = "share/ci/scripts/linux/yum/install_docs_env.sh"
3531

share/cmake/utils/CheckSupportSSSE3.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif()
1313

1414
# MSVC doesn't have flags
1515
if(USE_GCC OR USE_CLANG)
16-
set(CMAKE_CXX_FLAGS "-w -msse3")
16+
set(CMAKE_CXX_FLAGS "-w -mssse3")
1717
endif()
1818

1919
if (APPLE AND __universal_build)

src/OpenColorIO/CPUInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ CPUInfo::CPUInfo()
107107
flags |= X86_CPU_FLAG_SSE42;
108108

109109
/* Check OSXSAVE and AVX bits */
110-
if (info.reg.ecx & 0x18000000)
110+
if ((info.reg.ecx & 0x18000000) == 0x18000000)
111111
{
112112
xcr = xgetbv();
113-
if(xcr & 0x6) {
113+
if((xcr & 0x6) == 0x6) {
114114
flags |= X86_CPU_FLAG_AVX;
115115

116116
if(info.reg.ecx & 0x20000000) {
@@ -129,7 +129,7 @@ CPUInfo::CPUInfo()
129129

130130
/* OPMASK/ZMM state */
131131
if ((xcr & 0xe0) == 0xe0) {
132-
if ((flags & X86_CPU_FLAG_AVX2) && (info.reg.ebx & 0xd0030000))
132+
if ((flags & X86_CPU_FLAG_AVX2) && ((info.reg.ebx & 0xd0030000) == 0xd0030000))
133133
flags |= X86_CPU_FLAG_AVX512;
134134
}
135135
}

src/OpenColorIO/ConfigUtils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// SPDX-License-Identifier: BSD-3-Clause
22
// Copyright Contributors to the OpenColorIO Project.
33

4+
#include <pystring.h>
5+
46
#include "ConfigUtils.h"
57
#include "MathUtils.h"
6-
#include "pystring/pystring.h"
78
#include "utils/StringUtils.h"
89

910
namespace OCIO_NAMESPACE

src/apps/ociochecklut/main.cpp

Lines changed: 133 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@ class ProcessorWrapper
5050
void setGPU(OCIO::ConstGPUProcessorRcPtr gpu)
5151
{
5252
m_gpu = gpu;
53-
m_oglApp = OCIO::OglApp::CreateOglApp("ociochecklut", 256, 20);
54-
55-
if (m_verbose)
53+
if (!m_oglApp)
5654
{
57-
m_oglApp->printGLInfo();
55+
m_oglApp = OCIO::OglApp::CreateOglApp("ociochecklut", 256, 20);
56+
57+
if (m_verbose)
58+
{
59+
m_oglApp->printGLInfo();
60+
}
5861
}
62+
5963
m_oglApp->setPrintShader(m_verbose);
6064
float image[4]{ 0.f, 0.f, 0.f, 0.f };
6165
m_oglApp->initImage(1, 1, OCIO::OglApp::COMPONENTS_RGBA, image);
@@ -191,6 +195,7 @@ int main (int argc, const char* argv[])
191195
bool usegpu = false;
192196
bool usegpuLegacy = false;
193197
bool outputgpuInfo = false;
198+
bool stepInfo = false;
194199

195200
ArgParse ap;
196201
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[])
199204
"<SEPARATOR>", "Options:",
200205
"-t", &test, "Test a set a predefined RGB values",
201206
"-v", &verbose, "Verbose",
207+
"-s", &stepInfo, "Print the output after each step in a multi - transform LUT",
202208
"--help", &help, "Print help message",
203209
"--inv", &invlut, "Apply LUT in inverse direction",
204210
"--gpu", &usegpu, "Use GPU instead of CPU",
@@ -346,7 +352,7 @@ int main (int argc, const char* argv[])
346352
0.f, 1.f, 0.f,
347353
0.f, 0.f, 1.f };
348354

349-
if (verbose)
355+
if (verbose || stepInfo)
350356
{
351357
std::cout << std::endl;
352358
}
@@ -357,59 +363,140 @@ int main (int argc, const char* argv[])
357363
{
358364
std::vector<float> pixel = { input[curPix], input[curPix+1], input[curPix+2],
359365
comp == 3 ? 0.0f : input[curPix + 3] };
360-
try
361-
{
362-
proc.apply(pixel);
363-
}
364-
catch (const OCIO::Exception & e)
365-
{
366-
std::cerr << "ERROR: Processing pixel: " << e.what() << std::endl;
367-
return 1;
368-
}
369-
catch (...)
370-
{
371-
std::cerr << "ERROR: Unknown error encountered while processing pixel." << std::endl;
372-
return 1;
373-
}
374-
375-
// Print to string so that in & out values can be aligned if needed.
376366

377-
std::vector<std::string> out;
378-
ToString(out, pixel, 0, comp);
379-
380-
if (verbose)
367+
if (stepInfo)
381368
{
382-
std::vector<std::string> in;
383-
ToString(in, input, curPix, comp);
384-
385-
std::cout << "Input [R G B";
386-
if (comp == 4)
369+
// Process each step in a multi - transform LUT
370+
try
387371
{
388-
std::cout << " A";
372+
// Create GroupTransform so that each can be processed one at a time.
373+
auto processor = config->getProcessor(t);
374+
auto transform = processor->createGroupTransform();
375+
std::vector<float> inputPixel = pixel;
376+
std::vector<float> outputPixel = pixel;
377+
const auto numTransforms = transform->getNumTransforms();
378+
379+
std::cout << std::endl;
380+
381+
for (int i = 0; i < numTransforms; ++i)
382+
{
383+
auto transformStep = transform->getTransform(i);
384+
auto processorStep = config->getProcessor(transformStep);
385+
386+
if (usegpu || usegpuLegacy)
387+
{
388+
proc.setGPU(usegpuLegacy ? processorStep->getOptimizedLegacyGPUProcessor(OCIO::OPTIMIZATION_DEFAULT, 32)
389+
: processorStep->getDefaultGPUProcessor());
390+
}
391+
else
392+
{
393+
proc.setCPU(processorStep->getDefaultCPUProcessor());
394+
}
395+
396+
// Process the pixel
397+
proc.apply(outputPixel);
398+
399+
// Print the input/output pixel
400+
std::vector<std::string> in;
401+
ToString(in, inputPixel, 0, comp);
402+
403+
std::vector<std::string> out;
404+
ToString(out, outputPixel, 0, comp);
405+
406+
std::cout << "\n" << *(transform->getTransform(i)) << std::endl;
407+
std::cout << "Input [R G B";
408+
if (comp == 4)
409+
{
410+
std::cout << " A";
411+
}
412+
std::cout << "]: [";
413+
PrintAlignedVec(in, out, comp);
414+
std::cout << "]" << std::endl;
415+
416+
std::cout << "Output [R G B";
417+
if (comp == 4)
418+
{
419+
std::cout << " A";
420+
}
421+
std::cout << "]: [";
422+
PrintAlignedVec(out, in, comp);
423+
std::cout << "]" << std::endl;
424+
425+
inputPixel = outputPixel;
426+
}
389427
}
390-
std::cout << "]: [";
391-
PrintAlignedVec(in, out, comp);
392-
std::cout << "]" << std::endl;
393-
394-
std::cout << "Output [R G B";
395-
if (comp == 4)
428+
catch (const OCIO::Exception& exception)
396429
{
397-
std::cout << " A";
430+
std::cerr << "ERROR: " << exception.what() << std::endl;
431+
return 1;
398432
}
399-
std::cout << "]: [";
400-
PrintAlignedVec(out, in, comp);
401-
std::cout << "]" << std::endl;
433+
catch (...)
434+
{
435+
std::cerr << "ERROR: Unknown error encountered while processing single step operator." << std::endl;
436+
return 1;
437+
}
438+
439+
curPix += comp;
402440
}
403441
else
404442
{
405-
std::cout << out[0] << " " << out[1] << " " << out[2];
406-
if (comp == 4)
443+
// Process in a single step
444+
try
445+
{
446+
proc.apply(pixel);
447+
}
448+
catch (const OCIO::Exception& e)
449+
{
450+
std::cerr << "ERROR: Processing pixel: " << e.what() << std::endl;
451+
return 1;
452+
}
453+
catch (...)
407454
{
408-
std::cout << " " << out[3];
455+
std::cerr << "ERROR: Unknown error encountered while processing pixel." << std::endl;
456+
return 1;
409457
}
458+
459+
// Print to string so that in & out values can be aligned if needed.
460+
461+
std::vector<std::string> out;
462+
ToString(out, pixel, 0, comp);
463+
410464
std::cout << std::endl;
411-
}
412-
curPix += comp;
465+
466+
if (verbose)
467+
{
468+
std::vector<std::string> in;
469+
ToString(in, input, curPix, comp);
470+
471+
std::cout << "Input [R G B";
472+
if (comp == 4)
473+
{
474+
std::cout << " A";
475+
}
476+
std::cout << "]: [";
477+
PrintAlignedVec(in, out, comp);
478+
std::cout << "]" << std::endl;
479+
480+
std::cout << "Output [R G B";
481+
if (comp == 4)
482+
{
483+
std::cout << " A";
484+
}
485+
std::cout << "]: [";
486+
PrintAlignedVec(out, in, comp);
487+
std::cout << "]" << std::endl;
488+
}
489+
else
490+
{
491+
std::cout << out[0] << " " << out[1] << " " << out[2];
492+
if (comp == 4)
493+
{
494+
std::cout << " " << out[3];
495+
}
496+
std::cout << std::endl;
497+
}
498+
curPix += comp;
499+
}
413500
}
414501
else if (test)
415502
{

0 commit comments

Comments
 (0)