Use run-time-generated LUTs for XYZ/RGB conversion.
[dcpomatic.git] / src / lib / colour_matrices.cc
1 /*
2     Taken from OpenDCP: Builds Digital Cinema Packages
3     Copyright (c) 2010-2011 Terrence Meiczinger, All Rights Reserved
4
5     This program is free software: you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation, either version 3 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "colour_matrices.h"
20
21 /* Color Matrices */
22 float color_matrix[3][3][3] = {
23     /* SRGB */
24     {{0.4124564, 0.3575761, 0.1804375},
25      {0.2126729, 0.7151522, 0.0721750},
26      {0.0193339, 0.1191920, 0.9503041}},
27
28     /* REC.709 */
29     {{0.4124564, 0.3575761, 0.1804375},
30      {0.2126729, 0.7151522, 0.0721750},
31      {0.0193339, 0.1191920, 0.9503041}},
32
33     /* DC28.30 (2006-02-24) */
34     {{0.4451698156, 0.2771344092, 0.1722826698},
35      {0.2094916779, 0.7215952542, 0.0689130679},
36      {0.0000000000, 0.0470605601, 0.9073553944}}
37 };