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