Skip to content

Instantly share code, notes, and snippets.

View remia's full-sized avatar

Rémi Achard remia

View GitHub Profile
@remia
remia / patch.diff
Created October 29, 2023 12:12
OCIO yaml-cpp target handling
From 2eaaf6a8e8c715706c51391276c04f966cb9f737 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Achard?= <remiachard@gmail.com>
Date: Sun, 29 Oct 2023 12:08:02 +0000
Subject: [PATCH 1/1] Handle yaml-cpp target name update
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Rémi Achard <remiachard@gmail.com>
---
import json
import importlib
from inspect import getmembers, isfunction
from clairmeta.settings import DCP_CHECK_SETTINGS
all_checks = {}
prefix = DCP_CHECK_SETTINGS['module_prefix']
for k, v in DCP_CHECK_SETTINGS['modules'].items():
diff --git a/src/bindings/python/PyConfigIOProxy.cpp b/src/bindings/python/PyConfigIOProxy.cpp
index 5d04161f..7e2f5538 100644
--- a/src/bindings/python/PyConfigIOProxy.cpp
+++ b/src/bindings/python/PyConfigIOProxy.cpp
@@ -52,6 +52,7 @@ struct PyConfigIOProxy : ConfigIOProxy
void bindPyConfigIOProxy(py::module & m)
{
py::bind_vector<std::vector<uint8_t>>(m, "vector_of_uint8_t");
+ py::implicitly_convertible<py::list, std::vector<uint8_t>>();
@remia
remia / ocio_icc.py
Created September 27, 2022 18:02
ICC and ParametricCurve tests in Python
import os
import re
import subprocess as sp
import tempfile
from warnings import warn
import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
import numpy as np
# -*- coding: utf-8 -*-
import os
import sys
import colour
import numpy as np
import subprocess
ocio_profile_version: 2
description: Prototype OCIO v2 config for ACES 1.2.
name: ACES 1.2 2021-02-01
roles:
aces_interchange: ACES2065-1
cie_xyz_d65_interchange: CIE-XYZ D65
color_timing: ACEScct
compositing_log: ACEScct
@remia
remia / Patch
Created October 22, 2020 20:59
OCIO LookTransform inversion
diff --git a/src/OpenColorIO/transforms/LookTransform.cpp b/src/OpenColorIO/transforms/LookTransform.cpp
index 5458e9a9..8afee104 100755
--- a/src/OpenColorIO/transforms/LookTransform.cpp
+++ b/src/OpenColorIO/transforms/LookTransform.cpp
@@ -327,12 +327,13 @@ void BuildLookOps(OpRcPtrVec & ops,
looks.parse(lookTransform.getLooks());
// We must handle the inverse src/dst colorspace transformation explicitly.
- if(dir == TRANSFORM_DIR_INVERSE)
+ auto combinedDir = CombineTransformDirections(dir, lookTransform.getDirection());
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
devscripts \
fakeroot \
cmake \
python -m clairmeta.cli probe -type dcp tests/resources/DCP/ECL-SET/ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV
{'asset_list': {'23ca1be9-2a3e-42bf-8b29-9cbc52d9be46': 'ECL28-SINGLE-CPL_TST_F_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV_03.mxf',
'3fd640ec-f75e-4f91-8849-e29cda6cf79b': 'ECL28-SINGLE-CPL_TST_F_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV_audio_02.mxf',
'99150145-69c1-4589-b78d-33f84eae6efd': 'PKL_99150145-69c1-4589-b78d-33f84eae6efd.xml',
'99bb3528-4a7b-423d-8a09-465f4f8dee4d': 'j2c_99bb3528-4a7b-423d-8a09-465f4f8dee4d.mxf',
'ad46379a-a41c-4e57-9e45-c0b9a7a9ba1a': 'CPL_ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV.xml',
'cd62a8fc-3271-4e86-99a3-6285336eb9be': 'ECL28-SINGLE-CPL_TST_F_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV_audio_03.mxf',
'd68127a0-4f7e-4b7a-8211-ec48213546fe': 'ECL28-SINGLE-CPL_TST_F_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV_audio_01.mxf',
python -m clairmeta.cli check -type dcp tests/resources/DCP/ECL-SET/ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV
2020-09-01 19:44:40,577 - Clairmeta - INFO - Probing DCP : tests/resources/DCP/ECL-SET/ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV
2020-09-01 19:44:40,745 - Clairmeta - INFO - Total time : 0.17 seconds
2020-09-01 19:44:40,843 - Clairmeta - INFO - Checking DCP : tests/resources/DCP/ECL-SET/ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV
2020-09-01 19:44:40,941 - Clairmeta - INFO - DCP : tests/resources/DCP/ECL-SET/ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV
2020-09-01 19:44:40,941 - Clairmeta - INFO - Size : 42.09 MiB
2020-09-01 19:44:40,941 - Clairmeta - INFO - Error(s):
+ CPL_ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV.xml (ECL39-SINGLE-CPL-LVLS_TST_C_EN-XX_UK-U_51_4K_DI_20180103_ECL_SMPTE_OV)
. CPL reel attributes shall be coherents across all reels.