-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added LogB400, Reorganized LUTs, Added basic installer
- Loading branch information
1 parent
e88ebff
commit 5de9649
Showing
27 changed files
with
249 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//GoPro Protune LogB=400 IDT for ACES workflow inside DaVinci Resolve | ||
#if (__RESOLVE_VER_MAJOR__ >= 17) | ||
DEFINE_ACES_PARAM(IS_PARAMETRIC_ACES_TRANSFORM: 0) | ||
#endif | ||
|
||
//Rec709 to ACES using CAT02 | ||
__CONSTANT__ float rec709[3][3] = {{0.4395756842f, 0.3839125893f, 0.1765117265f},{ 0.0896003829f, 0.8147141542f, 0.0956854629f},{ 0.0174154827f, 0.1087343522f, 0.8738501650f}}; | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
p_R = protune_to_linear(p_R); | ||
p_G = protune_to_linear(p_G); | ||
p_B = protune_to_linear(p_B); | ||
|
||
float rVal = rec709[0][0] * p_R + rec709[0][1] * p_G + rec709[0][2] * p_B; | ||
float gVal = rec709[1][0] * p_R + rec709[1][1] * p_G + rec709[1][2] * p_B; | ||
float bVal = rec709[2][0] * p_R + rec709[2][1] * p_G + rec709[2][2] * p_B; | ||
|
||
return make_float3( rVal, gVal, bVal); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
xcopy "LUT\" "%ProgramData%\Blackmagic Design\DaVinci Resolve\Support\LUT\" | ||
xcopy "IDT\" "%AppData%\Blackmagic Design\DaVinci Resolve\Support\ACES Transforms\IDT\" | ||
|
||
if errorlevel 0 goto success | ||
:success | ||
msg "%username%" Transforms installed successfully! | ||
goto exit | ||
|
||
if not errorlevel 0 goto fail | ||
msg "%username%" Transform installation failed! Please install manually. | ||
goto exit | ||
|
||
:exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
#Simple Installer. Use at your own risk! | ||
|
||
if [ $(uname -s) = "Linux" ]; then | ||
IDT_FOLDER="${HOME}/.local/share/DaVinciResolve/ACES Transforms/IDT" | ||
ODT_FOLDER="${HOME}/.local/share/DaVinciResolve/ACES Transforms/ODT" | ||
LUT_FOLDER="/opt/resolve/LUT" | ||
|
||
elif [ $(uname -s) = "darwin" ]; then | ||
IDT_FOLDER="${HOME}/Library/Application Support/Blackmagic Design/DaVinci Resolve/ACES Transforms/IDT" | ||
ODT_FOLDER="${HOME}/Library/Application Support/Blackmagic Design/DaVinci Resolve/ACES Transforms/ODT" | ||
LUT_FOLDER="/Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT" | ||
fi | ||
|
||
mkdir -p "${IDT_FOLDER}" | ||
mkdir -p "${ODT_FOLDER}" | ||
|
||
cp IDT/*.dctl "${IDT_FOLDER}/" && echo "Installed IDTs" || echo "Failed to install IDTs" | ||
cp ODT/*.dctl "${ODT_FOLDER}/" && echo "Installed ODTs" || echo "Failed to install ODTs" | ||
sudo cp -R LUT/ "${LUT_FOLDER}/" && echo "Installed DCTLs to LUT Folder" || echo "Failed to install DCTLs to LUT Folder" | ||
|
||
exit 0 |
28 changes: 28 additions & 0 deletions
28
LUT/LogB400/Rec.709/GoPro_Protune-LogB400_Rec709_DWG_DaVinci-Intermediate.dctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//GoPro Protune Input Transform for DaVinci YRGB workflow inside DaVinci Resolve | ||
|
||
//Protune Rec.709 to DaVinci Wide Gamut | ||
__CONSTANT__ float rec709_to_dwg[3][3] = { { 0.5627674560f, 0.3235165887f, 0.1137159553f}, { 0.0777546353f, 0.7495773462f, 0.1726680186f}, { 0.0646691999f, 0.1919986920f, 0.7433321080f} }; | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
__DEVICE__ float lin_to_inter(float x) { | ||
if(x > 0.00262409f) return (_log2f(x + 0.0075f) + 7.0f) * 0.07329248f; | ||
else return x * 10.44426855f; | ||
} | ||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
float3 RGBv; | ||
|
||
p_R = protune_to_linear(p_R); | ||
p_G = protune_to_linear(p_G); | ||
p_B = protune_to_linear(p_B); | ||
|
||
RGBv.x = lin_to_inter(rec709_to_dwg[0][0] * p_R + rec709_to_dwg[0][1] * p_G + rec709_to_dwg[0][2] * p_B); | ||
RGBv.y = lin_to_inter(rec709_to_dwg[1][0] * p_R + rec709_to_dwg[1][1] * p_G + rec709_to_dwg[1][2] * p_B); | ||
RGBv.z = lin_to_inter(rec709_to_dwg[2][0] * p_R + rec709_to_dwg[2][1] * p_G + rec709_to_dwg[2][2] * p_B); | ||
|
||
return RGBv; | ||
} |
28 changes: 28 additions & 0 deletions
28
LUT/LogB400/Rec.709/GoPro_Protune-LogB400_Rec709_Rec2020_DaVinci-Intermediate.dctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//GoPro Protune Input Transform for DaVinci YRGB workflow inside DaVinci Resolve | ||
|
||
//Protune Rec.709 to Rec.2020 | ||
__CONSTANT__ float rec709_to_rec2020[3][3] = { { 0.6274038959f, 0.3292830384f, 0.0433130657f}, { 0.0690972894f, 0.9195403951f, 0.0113623156f}, { 0.0163914389f, 0.0880133079f, 0.8955952532f} }; | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
__DEVICE__ float lin_to_inter(float x) { | ||
if(x > 0.00262409f) return (_log2f(x + 0.0075f) + 7.0f) * 0.07329248f; | ||
else return x * 10.44426855f; | ||
} | ||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
float3 RGBv; | ||
|
||
p_R = protune_to_linear(p_R); | ||
p_G = protune_to_linear(p_G); | ||
p_B = protune_to_linear(p_B); | ||
|
||
RGBv.x = lin_to_inter(rec709_to_rec2020[0][0] * p_R + rec709_to_rec2020[0][1] * p_G + rec709_to_rec2020[0][2] * p_B); | ||
RGBv.y = lin_to_inter(rec709_to_rec2020[1][0] * p_R + rec709_to_rec2020[1][1] * p_G + rec709_to_rec2020[1][2] * p_B); | ||
RGBv.z = lin_to_inter(rec709_to_rec2020[2][0] * p_R + rec709_to_rec2020[2][1] * p_G + rec709_to_rec2020[2][2] * p_B); | ||
|
||
return RGBv; | ||
} |
20 changes: 20 additions & 0 deletions
20
LUT/LogB400/Rec.709/GoPro_Protune-LogB400_Rec709_Rec709_Gamma-2.2.dctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//GoPro Protune Input Transform for DaVinci YRGB workflow inside DaVinci Resolve | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
__DEVICE__ float lin_to_gamma(float x) { | ||
if(x >= 0) return _powf(x, 1.0f/2.2f); | ||
else return 0.0f; | ||
} | ||
|
||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
p_R = lin_to_gamma(protune_to_linear(p_R)); | ||
p_G = lin_to_gamma(protune_to_linear(p_G)); | ||
p_B = lin_to_gamma(protune_to_linear(p_B)); | ||
|
||
return make_float3(p_R,p_G,p_B); | ||
} |
20 changes: 20 additions & 0 deletions
20
LUT/LogB400/Rec.709/GoPro_Protune-LogB400_Rec709_Rec709_Gamma-2.4.dctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//GoPro Protune Input Transform for DaVinci YRGB workflow inside DaVinci Resolve | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
__DEVICE__ float lin_to_gamma(float x) { | ||
if(x >= 0) return _powf(x, 1.0f/2.4f); | ||
else return 0.0f; | ||
} | ||
|
||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
p_R = lin_to_gamma(protune_to_linear(p_R)); | ||
p_G = lin_to_gamma(protune_to_linear(p_G)); | ||
p_B = lin_to_gamma(protune_to_linear(p_B)); | ||
|
||
return make_float3(p_R,p_G,p_B); | ||
} |
20 changes: 20 additions & 0 deletions
20
LUT/LogB400/Rec.709/GoPro_Protune-LogB400_Rec709_Rec709_Gamma-2.6.dctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//GoPro Protune Input Transform for DaVinci YRGB workflow inside DaVinci Resolve | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
__DEVICE__ float lin_to_gamma(float x) { | ||
if(x >= 0) return _powf(x, 1.0f/2.6f); | ||
else return 0.0f; | ||
} | ||
|
||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
p_R = lin_to_gamma(protune_to_linear(p_R)); | ||
p_G = lin_to_gamma(protune_to_linear(p_G)); | ||
p_B = lin_to_gamma(protune_to_linear(p_B)); | ||
|
||
return make_float3(p_R,p_G,p_B); | ||
} |
19 changes: 19 additions & 0 deletions
19
LUT/LogB400/Rec.709/GoPro_Protune-LogB400_Rec709_Rec709_Scene.dctl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//GoPro Protune Input Transform for DaVinci YRGB workflow inside DaVinci Resolve | ||
|
||
__DEVICE__ float protune_to_linear(float xV) { | ||
return ((_powf(400.0f, xV) - 1.0f) / 399.0f); | ||
} | ||
|
||
__DEVICE__ float lin_to_rec(float x) { | ||
if(x < .0018f) return 4.5f * x; | ||
else return 1.099f * _powf(x,0.45f) - 0.099f; | ||
} | ||
|
||
__DEVICE__ float3 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B) { | ||
|
||
p_R = lin_to_rec(protune_to_linear(p_R)); | ||
p_G = lin_to_rec(protune_to_linear(p_G)); | ||
p_B = lin_to_rec(protune_to_linear(p_B)); | ||
|
||
return make_float3(p_R,p_G,p_B); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters