Skip to content

Instantly share code, notes, and snippets.

@sobotka
sobotka / basic-decode-loop.c
Created November 17, 2012 23:57
The Basic FFMPEG Decoding Loop
int gotFrame = 0;
while (av_read_frame(pFormatCtx, &packet) == 0)
{
if (packet.stream_index == myVideoStream)
{
avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet);
if (gotFrame)
{
@sobotka
sobotka / node_composite_blur.c
Created December 2, 2012 01:04
How to set the default to Gaussian Blur
[...]
static void node_composit_init_blur(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
{
node->storage = MEM_callocN(sizeof(NodeBlurData), "node blur data");
}
[...]
// Changes to:
@sobotka
sobotka / ffmbc-to-dpx.txt
Created March 5, 2013 20:59
Dumping 16 bit DPX files from ffmbc.
./ffmbc -i A014_C014_08289J_S000.mov -pix_fmt rgb48be image-%4d.dpx
@sobotka
sobotka / ocio-node.patch
Created April 19, 2013 05:25
OCIO patch for a Blender node. Doesn't quite do what is needed, as it adjusts the input image's ImBuf directly. It needs to be an arbitrary application on data so that an artist can control the transformations with granularity and without worrying about the input image's ImBuf space.
Index: source/blender/blenkernel/BKE_node.h
===================================================================
--- source/blender/blenkernel/BKE_node.h (revision 55048)
+++ source/blender/blenkernel/BKE_node.h (working copy)
@@ -717,6 +717,8 @@
#define CMP_NODE_MAP_RANGE 319
+#define CMP_NODE_COLORSPACETRANSFORM 320
+
@sobotka
sobotka / dcip3
Created July 5, 2013 06:01
Inverted DCI-P3 transform
!<ColorSpace>
name: dcip3
family:
equalitygroup:
bitdepth: 16f
description: |
OpenDCP input LUT with DCI reference white and Gamma 2.6
isdata: false
allocation: uniform
allocationvars: [0, 1]
@sobotka
sobotka / config.ocio
Created January 14, 2015 05:28
Greyscale config.ocio for sRGB primaries in Blender
# OpenColorIO configuration file for Blender
#
# Based on aces, nuke-default and spi configurations from OpenColorIO-Config
ocio_profile_version: 1
search_path: luts
strictparsing: true
luma: [0.2126, 0.7152, 0.0722]
@sobotka
sobotka / config-snippet.ocio
Created December 4, 2016 02:04
OpenColorIO stanza for SLog3 / SGamut3 transform
- !<ColorSpace>
name: Sony-S-Log3-S-Gamut3.Cine
family:
equalitygroup:
bitdepth: 32f
description: |
S-Log3-S-Gamut3.Cine to XYZ to 709
isdata: false
allocation: uniform
@sobotka
sobotka / config.ocio
Last active November 21, 2018 04:14
VRay Config
# Filmlike Dynamic Range LUT configuration for
# Blender. Crafted by Troy James Sobotka with
# special thanks and feedback from Guillermo
# Espertino, Claudio Rocha, Bassam Kurdali, Eugenio
# Pignataro, Henri Hebeisen, Jason Clarke,
# Haarm-Peter Duiker, Thomas Mansencal, and Timothy
# Lottes.
ocio_profile_version: 1
@sobotka
sobotka / XYZ_to_CIELab_nonlinear.spi1d
Last active June 2, 2017 22:33
CIE Lab OCIO Transform
Version 1
From 0.000000 1.000000
Length 4096
Components 1
{
1.3793103448276E-1
1.3983263082880E-1
1.4173422717484E-1
1.4363582352088E-1
1.4553741986692E-1
- !<ColorSpace>
name: Custom Base Contrast Filmic Log Encoding
family:
equalitygroup:
bitdepth: 32f
description: |
Custom experimental Filmic Log with Base Contrast encoding.
isdata: false
allocation: lg2
allocationvars: [-12.473931188, 12.526068812]