Skip to content

Instantly share code, notes, and snippets.

View UnaiM's full-sized avatar
🤖
Beep boop

Unai Martínez Barredo UnaiM

🤖
Beep boop
View GitHub Profile
@UnaiM
UnaiM / the-magic-of-kronos.md
Created November 7, 2023 09:20
Why my rolling shutter fix didn’t match with RollingShutter

The magic of Kronos

(AKA Why My Rolling Shutter Fix Didn’t Match with RollingShutter) – 20th December 2014
WARNING: doesn’t come to any solution.

My last post was about trying to recreate The Foundry’s RollingShutter plugin, using the new Kronos 2 technology instead of the old one, which the discontinued plugin was left with. And while the proposed solution benefitted from Regularized motion estimation, when switching back to Local it was clear that RollingShutter still won over it. So there’s something missing that I didn’t recreate, and have yet to figure out.


@UnaiM
UnaiM / just_convert_everything_to_acescg.md
Last active February 11, 2024 23:09
An investigation on whether “respecting” plate colour in a VFX pipeline makes any real difference

“Just convert everything to ACEScg”

An investigation on whether “respecting” plate colour in a VFX pipeline makes any real difference

Motivation

Until 2020, I always had worked either without any real colour management, or in an environment where everything was converted to (and encoded in) ACEScg on ingest, effectively before anyone used it. But I always had a hunch that this solution wasn’t “pure”— if the Academy had devised another linear colour space (ACES2065–1) for archival, it had to have a reason.

@UnaiM
UnaiM / hash_colour_file.py
Last active December 31, 2024 16:23
Hashes the colour transform(s) defined in a colour (CDL, LUT) file.
"""Requirements:
Python 3.7.2+
NumPy 1.14.5+
OpenColorIO 2
The xxhash Python package v2+ is recommended, which uses the xxHash library v0.8+.
"""
import hashlib
import os
@UnaiM
UnaiM / TopFrozenTable.py
Last active March 1, 2025 22:55
PySide2 QTableView-like widget where the top rows are “frozen” or “sticky”
import functools
import typing
from PySide2 import QtCore, QtWidgets
class _TopLinkedTable(QtWidgets.QTableView):
def __init__(self, other):
super().__init__()
@UnaiM
UnaiM / timehash.py
Created August 23, 2025 18:14
Time-dependent hash generation.
"""Time-dependent hash generation.
The original use-case called for the hashes to be short and easy for humans to
communicate, in a context where it doesn't matter if hashes repeat themselves after
some days, plus there's an implicit guarantee that seconds will pass between hash
requests, hence the `resolution` argument.
"""
from collections import abc
import datetime