Avisynth DGCube
DGCube applies a color lookup table (LUT) in .cube format on an NVIDIA graphics card (CUDA). It does the same job as AVSCube — camera log to BT.709, conversions between SDR, PQ and HLG, film looks — but on the GPU and with 16-bit data. It is part of Donald Graft's DGDecNV tools.
Filtering → Avisynth → Color → Conversion

What it does
Every pixel is looked up in the 3D table of the chosen .cube file and replaced by the interpolated result. The ranges of input, LUT and output are given separately, so DGCube can expand or compress the range along the way.
Requirements
- Windows with an NVIDIA graphics card (CUDA).
- DGDecNV (licensed software by Donald Graft); Hybrid only enables DGCube when DGDecNV is available.
- The LUT component of the general add-on.
Settings
| Control | Parameter | Values | Hybrid default | Meaning |
|---|---|---|---|---|
| LUT | cube | the .cube files of Hybrid's LUT folder | first file of the list | LUT to apply. Disabled with custom folder. |
| custom folder | – | on/off, folder | off | Use the .cube files of another folder (path field and Select button), e.g. the color subfolder with creative LUTs. |
| Input | in | limited, full | limited | Range of the input. |
| LUT range | lut | limited, full | full | Range the LUT was made for; the shipped LUTs are full range. |
| Output | out | limited, full | limited | Range of the output. |
| Interpolation | interp | tetrahedral, trilinear | tetrahedral | Interpolation between the grid points. |
| GPU | device | 0–255 | 255 | Graphics card to use; 255 = chosen automatically. |
Example
BT.709 to BT.601 PAL on a 10-bit YUV 4:2:0 source; Hybrid converts to 16 bit for the plugin:
# Converting from 10 to 16bit for DGCube
ConvertBits(16)
# color adjustment using DGCube
DGCube("C:\Program Files\Hybrid\64bit\LUTs\BT709_to_BT601_PAL.cube",in="lim",lut="full",out="lim",interp="tetrahedral",device=255)
# DGCube changed the color matrix to bt601
# Converting from 16 to 10bit for encoder
ConvertBits(10)
How Hybrid calls it
- Hybrid loads DGCube.dll. The plugin accepts YUV 4:2:0 16 bit or planar RGB 16 bit; Hybrid converts the clip to one of them first.
- All parameters are always written.
- Full range input and output are only implemented for RGB. With a YUV clip Hybrid uses limited for Input and Output, whatever is selected, and writes a script comment about it.
- Hybrid reads the target of the LUT from its file name (the part after "_to_") and uses that matrix for the following conversions; the range afterwards follows Output.
- If no LUT is selected or the file does not exist, Hybrid writes a comment and skips the filter.
- DGCube also offers the common options and can be added to the filter queue several times.
Background
DGCube ships with DGDecNV as one DLL for AviSynth+ and VapourSynth, with a short text file as documentation. In the plugin the three ranges are mandatory and have no defaults; Hybrid supplies them.
See also: Vapoursynth TimeCube
Sources
- DGCube.txt (documentation shipped with DGDecNV)
- Hybrid's tooltips
- The AviSynth+ documentation does not cover DGCube.