DGCube: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
DGCube (2022/08/11)
 
FranceBB (talk | contribs)
 
(4 intermediate revisions by one other user not shown)
Line 2: Line 2:
{{Filter3
{{Filter3
|{{Author/Donald Graft}}
|{{Author/Donald Graft}}
|2022/08/11
|2022/08/20
|3=[https://rationalqm.us/misc/DGCube.zip DGCube.zip]
|3=[https://rationalqm.us/misc/DGCube.zip DGCube.zip]
|4=Adjustment Filters
|4=Adjustment Filters
Line 14: Line 14:
== Requirements ==
== Requirements ==
* [[AviSynth+]] (x86 and x64)
* [[AviSynth+]] (x86 and x64)
* Supported color formats: [[RGBP16]]
* Supported color formats: [[RGBP16]], [[YUV420P16]]
<br>
<br>


== [[Script variables|Syntax and Parameters]] ==
== [[Script variables|Syntax and Parameters]] ==


:{{Template:FuncDef|DGCube (clip, string "cube", bool "fullrange", string "interp", int "device")}}
:{{Template:FuncDef|DGCube (clip, string "cube", bool "expand_in", bool "compress_out", string "interp", int "device")}}
<br>
<br>
::{{Par2| |clip| }}
::{{Par2| |clip| }}
:::Input clip; the filter receives and delivers the RGBP16 color space.
:::Input clip; the filter receives and delivers either RGBP16 or YUV420P16 color space.
<br>
<br>
::{{Par2|cube|string|""}}
::{{Par2|cube|string|""}}
:::Full path of the 3D LUT file. This must be an Adobe *.cube file.
:::Full path of the 3D LUT file. This must be an Adobe *.cube file.
<br>
<br>
::{{Par2|fullrange|bool|true}}
::{{Par2|expand_in|bool|false}}
:::*false : limited range
:::Expand the input from limited range to full range. Default is false.
:::*true : full range
<br>
::{{Par2|compress_out|bool|false}}
:::Compress the output from full range to limited range. Default is false.
<br>
<br>
::{{Par2|interp|string|"tetrahedral"}}
::{{Par2|interp|string|"tetrahedral"}}
Line 44: Line 46:
  [[Convert|ConvertToYUV420()]]
  [[Convert|ConvertToYUV420()]]


Apply 3D LUT to HDR10 PQ clip obtained from [[DGDecNV|DGSource]]:
Apply 3D LUT to HDR10 PQ clip obtained from [[DGDecNV|DGSource]] using internal YUV<->RGB conversions:
# Source
DGSource("THE GREAT WALL.dgi")<br>
# Load and apply [https://github.com/FranceBB/LinearTransformation "PQ_to_BT709_slope" cube]. Input and output is Limited Range YUV420P16
DGCube("PQ_to_BT709_v1.cube", expand_in=true, compress_out=true, interp="tetrahedral")<br>
 
Apply 3D LUT to HDR10 PQ clip obtained from [[DGDecNV|DGSource]] using external conversions to RGBP16:
   
   
  # Source
  # Source
  DGSource("THE GREAT WALL.dgi")<br>
  DGSource("THE GREAT WALL.dgi")<br>
  # From 4:2:0 10bit planar Limited Range to RGB Planar 16bit Full Range
  # From 4:2:0 10bit planar Limited Range to RGB Planar 16bit Full Range
  [[Avsresize#z_ConvertFormat|z_ConvertFormat]](pixel_type="RGBP16", colorspace_op="2020:st2084:2020:limited=>rgb:st2084:2020:full", resample_filter_uv="spline64", dither_type="error_diffusion")<br>
  [[Avsresize#z_ConvertFormat|z_ConvertFormat]](pixel_type="RGBP16", colorspace_op="2020:st2084:2020:limited=>rgb:st2084:2020:full", resample_filter_uv="Spline64", dither_type="error_diffusion", use_props=0)<br>
  #Load and apply cube
  # Load and apply [https://github.com/FranceBB/LinearTransformation "PQ_to_BT709_slope" cube]
  DGCube("PQ_to_BT709_slope.cube", fullrange=true, interp="tetrahedral")<br>
  DGCube("PQ_to_BT709_v1.cube", in="full", out="full", lut="full", interp="tetrahedral")<br>
  # From RGB 16bit planar Full Range to YUV420 10bit planar Limited Range with dithering
  # From RGB 16bit planar Full Range to YUV420 10bit planar Limited Range with dithering
  [[Avsresize#z_ConvertFormat|z_ConvertFormat]](pixel_type="YUV420P10", colorspace_op="rgb:std-b67:2020:full=>2020:std-b67:2020:limited", resample_filter_uv="spline64", dither_type="error_diffusion")
  [[Avsresize#z_ConvertFormat|z_ConvertFormat]](pixel_type="YUV420P10", colorspace_op="rgb:709:709:full=>709:709:709:limited", resample_filter_uv="Spline64", dither_type="error_diffusion", use_props=0)
 
<br>
<br>


== Changelog ==
== Changelog ==
  Version        Date            Changes
  Version        Date            Changes
                2022/08/20      - "full_range" parameter removed.
                                - Faster cube loading.
                2022/08/19      - Added "expand_in" and "compress_out" parameters.
                                - "full_range" parameter ignored.
                2022/08/17      - Add support for YUV420P16.
                 2022/08/11      - VapourSynth support.
                 2022/08/11      - VapourSynth support.
                                 - 'device' parameter to select GPU device.
                                 - 'device' parameter to select GPU device.
Line 73: Line 86:
!!width="150px"| Download
!!width="150px"| Download
!!width="150px"| Mirror
!!width="150px"| Mirror
|-
!2022/08/20
|[https://web.archive.org/web/20220821161252if_/https://www.rationalqm.us/misc/DGCube.zip DGCube.zip]
|
|-
|-
!2022/08/11
!2022/08/11
|[https://rationalqm.us/misc/DGCube.zip DGCube.zip]
|[https://web.archive.org/web/20220811180805if_/https://www.rationalqm.us/misc/DGCube.zip DGCube.zip]
|[https://web.archive.org/web/20220811180805if_/https://www.rationalqm.us/misc/DGCube.zip DGCube.zip]
|
|}
|}
<br>
<br>

Latest revision as of 16:55, 13 June 2023

Abstract
Author Donald Graft
Version 2022/08/20
Download DGCube.zip
Category Adjustment Filters
License Closed source
Discussion DG Tools Support Forum

Description

AviSynth+ plugin to load and apply Adobe 3D LUTs to a clip. DGCube is a CUDA version of the AVSCube filter.

Requirements


DGCube (clip, string "cube", bool "expand_in", bool "compress_out", string "interp", int "device")


clip   =
Input clip; the filter receives and delivers either RGBP16 or YUV420P16 color space.


string  cube = ""
Full path of the 3D LUT file. This must be an Adobe *.cube file.


bool  expand_in = false
Expand the input from limited range to full range. Default is false.


bool  compress_out = false
Compress the output from full range to limited range. Default is false.


string  interp = "tetrahedral"
String specifying the interpolation method: "tetrahedral" (default) or "trilinear".


int  device = 255
GPU device number to use. If device is 255 (default), then the GPU device will be automatically selected.


Examples

Apply 3D LUT to clip obtained from BlankClip:

BlankClip(pixel_type="RGBP16", color=$ff0000)
DGCube("...\test.cube")
ConvertToYUV420()

Apply 3D LUT to HDR10 PQ clip obtained from DGSource using internal YUV<->RGB conversions:

# Source
DGSource("THE GREAT WALL.dgi")
# Load and apply "PQ_to_BT709_slope" cube. Input and output is Limited Range YUV420P16 DGCube("PQ_to_BT709_v1.cube", expand_in=true, compress_out=true, interp="tetrahedral")

Apply 3D LUT to HDR10 PQ clip obtained from DGSource using external conversions to RGBP16:

# Source
DGSource("THE GREAT WALL.dgi")
# From 4:2:0 10bit planar Limited Range to RGB Planar 16bit Full Range z_ConvertFormat(pixel_type="RGBP16", colorspace_op="2020:st2084:2020:limited=>rgb:st2084:2020:full", resample_filter_uv="Spline64", dither_type="error_diffusion", use_props=0)
# Load and apply "PQ_to_BT709_slope" cube DGCube("PQ_to_BT709_v1.cube", in="full", out="full", lut="full", interp="tetrahedral")
# From RGB 16bit planar Full Range to YUV420 10bit planar Limited Range with dithering z_ConvertFormat(pixel_type="YUV420P10", colorspace_op="rgb:709:709:full=>709:709:709:limited", resample_filter_uv="Spline64", dither_type="error_diffusion", use_props=0)


Changelog

Version         Date            Changes
                2022/08/20      - "full_range" parameter removed.
                                - Faster cube loading.
                2022/08/19      - Added "expand_in" and "compress_out" parameters.
                                - "full_range" parameter ignored.
                2022/08/17      - Add support for YUV420P16.
                2022/08/11      - VapourSynth support.
                                - 'device' parameter to select GPU device.
                                - Updated user manual.
                2022/08/10      - Added tetrahedral interpolation.
                2022/08/08      - Ability to open any size cube file, no longer limited to 65.
                2022/08/07      - Initial release


Archived Downloads

Version Download Mirror
2022/08/20 DGCube.zip
2022/08/11 DGCube.zip





Back to External Filters