1 /*! 2 * \copy 3 * Copyright (c) 2009-2013, Cisco Systems 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * * Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 * 31 * 32 * \file error_code.h 33 * 34 * \brief Error codes used in Wels decoder side 35 * 36 * \date 3/4/2009 Created 37 * 38 ************************************************************************************* 39 */ 40 #ifndef WELS_ERROR_CODE_H__ 41 #define WELS_ERROR_CODE_H__ 42 43 namespace WelsDec { 44 45 typedef enum TagWelsErr { 46 ERR_NONE = 0, 47 ERR_INVALID_PARAMETERS = 1, 48 ERR_MALLOC_FAILED = 2, 49 ERR_API_FAILED = 3, 50 51 ERR_BOUND = 31 52 } EWelsErr; 53 54 /* 55 * Specified error format: 56 * ERR_NO = (ERR_LEVEL_FROM (HIGH WORD) << 16) | (ERR_INFO_FROM (LOW WORD)) 57 * 58 */ 59 #define GENERATE_ERROR_NO(iErrLevel, iErrInfo) ((iErrLevel << 16) | (iErrInfo & 0xFFFF)) 60 #define ERR_INVALID_INTRA4X4_MODE -1 61 62 /* ERR_LEVEL */ 63 //----------------------------------------------------------------------------------------------------------- 64 enum { 65 ERR_LEVEL_ACCESS_UNIT = 1, 66 ERR_LEVEL_NAL_UNIT_HEADER, 67 ERR_LEVEL_PREFIX_NAL, 68 ERR_LEVEL_PARAM_SETS, 69 ERR_LEVEL_SLICE_HEADER, 70 ERR_LEVEL_SLICE_DATA, 71 ERR_LEVEL_MB_DATA 72 }; 73 74 //----------------------------------------------------------------------------------------------------------- 75 76 /* More detailed error information, maximal value is 65535 */ 77 //----------------------------------------------------------------------------------------------------------- 78 #define ERR_INFO_COMMON_BASE 1 79 #define ERR_INFO_SYNTAX_BASE 1001 80 #define ERR_INFO_LOGIC_BASE 10001 81 enum { 82 /* Error from common system level: 1-1000 */ 83 ERR_INFO_OUT_OF_MEMORY = ERR_INFO_COMMON_BASE, 84 ERR_INFO_INVALID_ACCESS, 85 ERR_INFO_INVALID_PTR, 86 ERR_INFO_INVALID_PARAM, 87 ERR_INFO_FILE_NO_FOUND, 88 ERR_INFO_PATH_NO_FOUND, 89 ERR_INFO_ACCESS_DENIED, 90 ERR_INFO_NOT_READY, 91 ERR_INFO_WRITE_FAULT, 92 ERR_INFO_READ_FAULT, 93 ERR_INFO_READ_OVERFLOW, 94 ERR_INFO_READ_LEADING_ZERO, 95 ERR_INFO_UNINIT, 96 /* Error from H.264 syntax elements parser: 1001-10000 */ 97 ERR_INFO_NO_PREFIX_CODE = ERR_INFO_SYNTAX_BASE, // No start prefix code indication 98 ERR_INFO_NO_PARAM_SETS, // No SPS and/ PPS before sequence header 99 ERR_INFO_PARAM_SETS_NOT_INTEGRATED, // Parameters sets (sps/pps) are not integrated at all before to decode VCL nal 100 ERR_INFO_SPS_ID_OVERFLOW, 101 ERR_INFO_PPS_ID_OVERFLOW, 102 ERR_INFO_INVALID_PROFILE_IDC, 103 ERR_INFO_UNMATCHED_LEVEL_IDC, 104 ERR_INFO_INVALID_POC_TYPE, 105 ERR_INFO_INVALID_MB_SIZE_INFO, 106 ERR_INFO_REF_COUNT_OVERFLOW, 107 ERR_INFO_CROPPING_NO_SUPPORTED, 108 ERR_INFO_INVALID_CROPPING_DATA, 109 ERR_INFO_UNSUPPORTED_VUI_HRD, 110 ERR_INFO_INVALID_SLICEGROUP, 111 ERR_INFO_INVALID_SLICEGROUP_MAP_TYPE, 112 ERR_INFO_INVALID_FRAME_NUM, 113 ERR_INFO_INVALID_IDR_PIC_ID, 114 ERR_INFO_INVALID_REDUNDANT_PIC_CNT, 115 ERR_INFO_INVALID_MAX_NUM_REF_FRAMES, 116 ERR_INFO_INVALID_MAX_MB_SIZE, 117 ERR_INFO_INVALID_FIRST_MB_IN_SLICE, 118 ERR_INFO_INVALID_NUM_REF_IDX_L0_ACTIVE_MINUS1, 119 ERR_INFO_INVALID_NUM_REF_IDX_L1_ACTIVE_MINUS1, 120 ERR_INFO_INVALID_SLICE_ALPHA_C0_OFFSET_DIV2, 121 ERR_INFO_INVALID_SLICE_BETA_OFFSET_DIV2, 122 ERR_INFO_FMO_INIT_FAIL, 123 ERR_INFO_SLICE_TYPE_OVERFLOW, 124 ERR_INFO_INVALID_CABAC_INIT_IDC, 125 ERR_INFO_INVALID_QP, 126 ERR_INFO_INVALID_PIC_INIT_QS, 127 ERR_INFO_INVALID_CHROMA_QP_INDEX_OFFSET, 128 ERR_INFO_INVALID_PIC_INIT_QP, 129 ERR_INFO_INVALID_LOG2_MAX_FRAME_NUM_MINUS4, 130 ERR_INFO_INVALID_LOG2_MAX_PIC_ORDER_CNT_LSB_MINUS4, 131 ERR_INFO_INVALID_NUM_REF_FRAME_IN_PIC_ORDER_CNT_CYCLE, 132 ERR_INFO_INVALID_DBLOCKING_IDC, 133 ERR_INFO_INVALID_MB_TYPE, 134 ERR_INFO_INVALID_MB_SKIP_RUN, 135 ERR_INFO_INVALID_SPS_ID, 136 ERR_INFO_INVALID_PPS_ID, 137 ERR_INFO_INVALID_SUB_MB_TYPE, 138 ERR_INFO_UNAVAILABLE_TOP_BLOCK_FOR_INTRA, 139 ERR_INFO_UNAVAILABLE_LEFT_BLOCK_FOR_INTRA, 140 ERR_INFO_INVALID_REF_INDEX, 141 ERR_INFO_INVALID_CBP, 142 ERR_INFO_DQUANT_OUT_OF_RANGE, 143 ERR_INFO_CAVLC_INVALID_PREFIX, 144 ERR_INFO_CAVLC_INVALID_LEVEL, 145 ERR_INFO_CAVLC_INVALID_TOTAL_COEFF_OR_TRAILING_ONES, 146 ERR_INFO_CAVLC_INVALID_ZERO_LEFT, 147 ERR_INFO_CAVLC_INVALID_RUN_BEFORE, 148 ERR_INFO_MV_OUT_OF_RANGE, 149 150 ERR_INFO_INVALID_I4x4_PRED_MODE, 151 ERR_INFO_INVALID_I16x16_PRED_MODE, 152 ERR_INFO_INVALID_I_CHROMA_PRED_MODE, 153 154 ERR_INFO_INVALID_LUMA_LOG2_WEIGHT_DENOM, 155 ERR_INFO_INVALID_CHROMA_LOG2_WEIGHT_DENOM, 156 ERR_INFO_INVALID_LUMA_WEIGHT, 157 ERR_INFO_INVALID_CHROMA_WEIGHT, 158 ERR_INFO_INVALID_LUMA_OFFSET, 159 ERR_INFO_INVALID_CHROMA_OFFSET, 160 161 ERR_INFO_UNSUPPORTED_NON_BASELINE, 162 ERR_INFO_UNSUPPORTED_FMOTYPE, 163 ERR_INFO_UNSUPPORTED_MBAFF, 164 ERR_INFO_UNSUPPORTED_ILP, 165 ERR_INFO_UNSUPPORTED_CABAC_EL, 166 ERR_INFO_UNSUPPORTED_SPSI, 167 ERR_INFO_UNSUPPORTED_MGS, 168 ERR_INFO_UNSUPPORTED_BIPRED, 169 ERR_INFO_UNSUPPORTED_WP, 170 ERR_INFO_UNSUPPORTED_SLICESKIP, 171 172 ERR_INFO_FRAMES_LOST, 173 ERR_INFO_DEPENDENCY_SPATIAL_LAYER_LOST, 174 ERR_INFO_DEPENDENCY_QUALIT_LAYER_LOST, 175 ERR_INFO_REFERENCE_PIC_LOST, 176 ERR_INFO_INVALID_REORDERING, 177 ERR_INFO_INVALID_MARKING, 178 179 ERR_INFO_FMO_NOT_SUPPORTED_IN_BASE_LAYER, 180 ERR_INFO_INVALID_ESS, 181 ERR_INFO_INVALID_SLICE_TYPE, 182 ERR_INFO_INVALID_REF_MARKING, 183 ERR_INFO_INVALID_REF_REORDERING, 184 185 /* Error from corresponding logic, 10001-65535 */ 186 ERR_INFO_NO_IDR_PIC = ERR_INFO_LOGIC_BASE, // NO IDR picture available before sequence header 187 ERR_INFO_EC_NO_NEIGHBOUR_MBS, 188 ERR_INFO_EC_UNEXPECTED_MB_TYPE, 189 ERR_INFO_EC_NO_ENOUGH_NEIGHBOUR_MBS, 190 ERR_INFO_DUPLICATE_FRAME_NUM, 191 //for LTR 192 ERR_INFO_INVALID_MMCO_NUM, 193 ERR_INFO_INVALID_MMCO_OPCODE_BASE, 194 ERR_INFO_INVALID_MMCO_SHORT2UNUSED, 195 EER_INFO_INVALID_MMCO_LONG2UNUSED, 196 ERR_INFO_INVALID_MMCO_SHOART2LONG, 197 ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW, 198 ERR_INFO_INVALID_MMCO_REF_NUM_NOT_ENOUGH, 199 ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX, 200 //for CABAC 201 ERR_CABAC_NO_BS_TO_READ, 202 ERR_CABAC_UNEXPECTED_VALUE, 203 //for scaling list 204 ERR_SCALING_LIST_DELTA_SCALE, 205 //logic error related to multi-layer 206 ERR_INFO_WIDTH_MISMATCH, 207 //reconstruction error 208 ERR_INFO_MB_RECON_FAIL, 209 ERR_INFO_MB_NUM_EXCEED_FAIL, 210 ERR_INFO_BS_INCOMPLETE, 211 ERR_INFO_MB_NUM_INADEQUATE, 212 //parse only error 213 ERR_INFO_PARSEONLY_PENDING, 214 ERR_INFO_PARSEONLY_ERROR, 215 }; 216 //----------------------------------------------------------------------------------------------------------- 217 218 } // namespace WelsDec 219 220 #endif//WELS_ERROR_CODE_H__ 221 222 223