How to make encrypted DCPs in Easydcp Creator Plus and make KDMs and DKDMs in KDM generator

A DKDM is a KDM made for Easydcp creator + and similar programs that can do versioning like adding subtitles change audio and add logo reels to DCPs .

A KDM is for a cinema server/player that can only play the DCP.

When a distributor buys a DCP for versioning it is often encrypted and you can buy a DKDM that lets you do versioning on it. When the new version is ready you can encrypt it again.

It is possible to get the public encryption keys from cinemas that will screen a movie and make KDMs. I mostly send encrypted DCP to cinemas in Norway via Unique Movie transit and let them handle the logistics of generating and sending KDMs to cinemas. It is no extra cost to let them handle the KDMs.

This is how I make an encrypted DCP and a DKDM for a DCP lab or Movie Transit.

Convertering a DCP to an encrypted DCP in Easydcp Creator +

To enable encyption I click on the key on the video track and choose Enable for all tracks.

Now the lock icon is locked

To make the encrypted DCP I click on Generate DCP

Choose to make DCP digest in the Generate Package Wizard

To make a test KDM you can first make a KDM for your copy of Easydcp Creator.

Open the encrypted DCP in Easydcp creator. The keys are red and the DCP is locked.

Export the Public encryption key File – Content decryption – Export public certificate

Making a KDM/DKDM in Easydcp Generator

In KDM Generator choose the DCP-Digest that was created when the DCP was created. Choose the public certificate that you exported from Easydcp Creator and choose valid dates and then click on Generate KDM

In Easydcp Creator choose Export the Public encryption key File – Content decryption – Load Content Keys and load the KDM you generated.

Now the DCP has green lock icons and the DCP is unlocked.

When generating the DKDM for Movie Transit I use the public certificate they sent me and generate a key for them in KDM generator.

How to calculate RP-177 3×3 matrices in Matlab. Part 2. TRA. Rec709/P3 to Rec2020.

(work in progress)
Matlab code made by Tinna Lif Gunnarsdottir.

Part 1 is here

SMPTE RP-177:1993  Rec709/P3 to Rec2020 NPM/TRA

COLOR REC 2020 NPM & NPM INV

%COLOR REC 2020 NPM & NPM INV        
R = [0.708 ; 0.292 ; 0.000];
G = [0.170 ; 0.797 ; 0.0330];
B = [0.131 ; 0.046 ; 0.8230];
P = [R G B] ;

%White Point D65        
X = 0.3127;
Y = 0.3290;
Z = 0.3583;        
W = [X/Y ; 1 ; Z/Y];
CC = P \ W;
C = [CC(1,1) 0 0 ; 0 CC(2,1) 0 ; 0 0 CC(3,1)];
format long 
NPM = P * C
NPM_inv = inv(NPM) 
NPM =
0.636958048301291   0.144616903586208   0.168880975164172
0.262700212011267   0.677998071518871   0.059301716469862
0                   0.028072693049088   1.060985057710791

NPM_inv =
 1.716651187971268  -0.355670783776393  -0.253366281373660
-0.666684351832489   1.616481236634939   0.015768545813911
 0.017639857445311  -0.042770613257809   0.942103121235474


From P3 D65 to Rec-2020
(note: The color red may needs some adjusting in the P3 to Rec2020 TRAs if trying to do a 3d LUT in nuke with degamma/gamma)

% COLOR DCI P3 - D65
R_P3 = [0.6800   ; 0.3200 ; 0.0000];
G_P3 = [0.2650  ; 0.6900 ; 0.0450];
B_P3 = [0.1500  ; 0.0600 ; 0.7900];
P_P3 = [R_P3 G_P3 B_P3];
X_P3 = 0.3127;
Y_P3 = 0.3290;
Z_P3 = 0.3583;
W_P3 = [X_P3/Y_P3 ; 1 ; Z_P3/Y_P3];
CC_P3 = P_P3 \ W_P3;
C_P3 = [ CC_P3(1,1) 0 0 ;  0  CC_P3(2,1) 0 ;  0    0   CC_P3(3,1)];
NPM_P3 = P_P3 * C_P3
% TRA
TRA_P3 =  NPM \ NPM_P3
NPM_P3 =
0.486570948648216   0.265667693169093   0.198217285234362
0.228974564069749   0.691738521836506   0.079286914093745
                0   0.045113381858903   1.043944368900976

TRA_P3 =
 0.753833034361722   0.198597369052617   0.047569596585662
 0.045743848965358   0.941777219811693   0.012478931222948
-0.001210340354518   0.017601717301090   0.983608623053428

From REC709 D65 to Rec-2020

%From REC 709 D65 to REC-2020        
R_7 = [0.640 ;  0.330 ; 0.030];
G_7 = [0.300 ;  0.600 ; 0.100];
B_7 = [0.150 ;  0.060 ; 0.790];
P_7 = [R_7 G_7 B_7];
% White Point  D65
X_7 = 0.3127;
Y_7 = 0.3290;
Z_7 = 0.3583;
W_7 = [X_7/Y_7 ; 1 ; Z_7/Y_7];
CC_7 = P_7 \ W_7;             
% P inv
C_7 = [ CC_7(1,1) 0 0 ; 0 CC_7(2,1) 0 ; 0 0 CC_7(3,1)];
NPM_7 = P_7 * C_7
TRA_7 =  NPM \ NPM_7 
% Rec709 source, NPM/2020 dest, and inv
NPM_7 =
0.412390799265959   0.357584339383878   0.180480788401834
0.212639005871510   0.715168678767756   0.072192315360734
0.019330818715592   0.119194779794626   0.950532152249661

TRA_7 =
0.627403895934699   0.329283038377884   0.043313065687417
0.069097289358232   0.919540395075459   0.011362315566309
0.016391438875150   0.088013307877226   0.895595253247624

From P3 DCI WHITE to Rec-2020
(note: The color red may needs some adjusting in the P3 to Rec2020 TRAs if trying to do a 3d LUT in nuke with degamma/gamma)

X_P3_W = 0.314;
Y_P3_W = 0.351;
Z_P3_W = 0.335;
W_P3_W = [X_P3_W/Y_P3_W ; 1 ; Z_P3_W/Y_P3_W];
CC_P3_W = P_P3 \ W_P3_W;
C_P3_W = [ CC_P3_W(1,1) 0 0 ; 0 CC_P3_W(2,1) 0 ;  0 0 CC_P3_W(3,1)];
NPM_P3_W = P_P3 * C_P3_W
TRA_P3_W =  NPM \ NPM_P3_W
NPM_P3_W =
0.445169815564552   0.277134409206778   0.172282669815565
0.209491677912731   0.721595254161044   0.068913067926226
                0   0.047060560053981   0.907355394361973
TRA_P3_W =
 0.689691223459987   0.207169204075508   0.041345622770170
 0.041851616632057   0.982426091420886   0.010846196309229
-0.001107355451221   0.018361440441151   0.854913936657422

How to apply X’Y’Z’ 3D LUTS in Photoshop to an image so it will match the white point of a DCP

Sometimes you may want to add something to a DCP trailer or feature film.
Example: Trailers often need new graphics in a new language.

In Photoshop and Resolve you can apply 3D LUTS to an image to match the white point of the original DCP.

If the DCP has a warm white you could use a D60 3D LUT and if it has a cooler white you can use a D65 3D LUT.

If you render a video file in Final Cut X or Premiere with graphics that has a X’Y’Z’ 3D LUT applied, remember to choose no color transform in Easydcp and similar DCP mastering software.

You can apply Cube 3D LUTs in Resolve

The CUBE LUT can be placed in a folder you call Nuke or DCP inside Resolve´s LUT folder:
On a Mac: /Library/Application Support/Blackmagic Design/Davinci Resolve/LUT
On a PC: C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\LUT\

In Resolve you can apply it to the timeline from:
Project settings – Timeline Lookup tables – 3D Output Lookup table
or you can use a corrector node
You can also apply them to clips.

You can render DCPs directly from Resolve. If you choose DCI X´Y´Z´ in the timeline color space no color transform will be applied and you can use the 3D luts to DCI X´Y´Z´

How to apply a 3D LUT in Photoshop
Layer – New adjustment Layer – Color lookup

Click on load 3d lut and choose a 3D LUT. You can now use a cube 3D LUT.

Some 3D LUTS TESTS

Here are some P3 and REC709 3D LUTS tests using the Nuke 3D LUT method from this post and the matlab NPMs from this post.

You can buy the CUBE 3D LUTS from the tests here

P3 D61 2.6 gamma to X’Y’Z’ 7z

White in the 12 bit 3dl file is 3885 3960 3997 It is the correct D61 value in SMPTE EG-432-1-10

P3 D60 2.6 gamma to X’Y’Z’ 7z

White in the 12 bit 3dl file is 3886 3960 3972. It is the correct D60 value in SMPTE EG-432-1-10

P3D65 2.6 gamma to X’Y’Z’ 7z

White in the 12 bit 3dl file is 3883 3960 4092
It is the correct D65 value in SMPTE EG-432-1-10

P3 DCI WHITE 2.6 gamma to X’Y’Z’  

White in the 12 bit 3dl file is 3794 3960 3890
It is the correct DCI WHITE value in SMPTE EG-432-1-10

REC709 D65 2.2 2.4 2.6 gamma to X’Y’Z’ 7z


White in the 12 bit 3dl files is 3883 3960 4092
It is the correct D65 value in SMPTE EG-432-1-10

REC 709 D60 2.2 2.4 2.6 gamma to X’Y’Z’

White in the 12 bit 3dl files is 3886 3960 3972. It is the correct D60 value in SMPTE EG-432-1-10