| 109 | } |
| 110 | |
| 111 | static const Color::Lut* |
| 112 | lutFromColorspace(ViewerColorSpaceEnum cs) |
| 113 | { |
| 114 | const Color::Lut* lut; |
| 115 | |
| 116 | switch (cs) { |
| 117 | case eViewerColorSpaceSRGB: |
| 118 | lut = Color::LutManager::sRGBLut(); |
| 119 | break; |
| 120 | case eViewerColorSpaceRec709: |
| 121 | lut = Color::LutManager::Rec709Lut(); |
| 122 | break; |
| 123 | case eViewerColorSpaceLinear: |
| 124 | default: |
| 125 | lut = 0; |
| 126 | break; |
| 127 | } |
| 128 | if (lut) { |
| 129 | lut->validate(); |
| 130 | } |
| 131 | |
| 132 | return lut; |
| 133 | } |
| 134 | |
| 135 | ///Fast version when components are the same |
| 136 | template <typename SRCPIX, typename DSTPIX, int srcMaxValue, int dstMaxValue> |
no test coverage detected