ACES IDT DCTL Generator

Nice! Are the BMD matrices reverse engineered out of the Resolve Color Space Transform OFX?

I’ve not experimented with it, but DCTLs can apply LUTs, so I wonder if it might be possible to have generated DCTLs for BMD transforms make use of the 1D LUTs which ship with Resolve to do the linearisation?

EDIT
Just tested, and as an example the following DCTL seems to work:

DEFINE_LUT(BMDFilm46, ../VFX IO/BMDFilm 4.6K to Linear.cube)

__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B)
{
  const float mtx[9] = {0.6472787323041167f,0.2410444287328754f,0.11167683903633815f, 0.06552081891597149f,1.0229602491189127f,-0.08848106807427779f, -0.027417492153046195f,-0.07610880957393346f,1.1035263016789891f};
  
  float3 rgb = APPLY_LUT(p_R, p_G, p_B, BMDFilm46);
  
  float r2 = rgb.x * mtx[0] + rgb.y * mtx[1] + rgb.z * mtx[2];
  float g2 = rgb.x * mtx[3] + rgb.y * mtx[4] + rgb.z * mtx[5];
  float b2 = rgb.x * mtx[6] + rgb.y * mtx[7] + rgb.z * mtx[8];

  return make_float3(r2, g2, b2);
}

Note: The relative path of the LUT needs to be correct. I have a first level sub-folder of IDTs, hence the ../ at the start of the LUT path. I only tested on a Mac. Cross platform compatibility might complicate path naming.