1 /* 2 * Copyright 2015 The Etc2Comp Authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 namespace Etc 20 { 21 22 enum ErrorMetric 23 { 24 RGBA, 25 RGBX, 26 REC709, 27 NUMERIC, 28 NORMALXYZ, 29 // 30 ERROR_METRICS, 31 // 32 BT709 = REC709 33 }; 34 ErrorMetricToString(ErrorMetric errorMetric)35 inline const char *ErrorMetricToString(ErrorMetric errorMetric) 36 { 37 switch (errorMetric) 38 { 39 case RGBA: 40 return "RGBA"; 41 case RGBX: 42 return "RGBX"; 43 case REC709: 44 return "REC709"; 45 case NUMERIC: 46 return "NUMERIC"; 47 case NORMALXYZ: 48 return "NORMALXYZ"; 49 case ERROR_METRICS: 50 default: 51 return "UNKNOWN"; 52 } 53 } 54 } // namespace Etc 55