1 /* 2 * Copyright (c) 2019, Alliance for Open Media. All rights reserved 3 * 4 * This source code is subject to the terms of the BSD 2 Clause License and 5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License 6 * was not distributed with this source code in the LICENSE file, you can 7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open 8 * Media Patent License 1.0 was not distributed with this source code in the 9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 10 */ 11 12 #ifndef AOM_AV1_ENCODER_ENC_ENUMS_H_ 13 #define AOM_AV1_ENCODER_ENC_ENUMS_H_ 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 // This enumerator type needs to be kept aligned with the mode order in 20 // const MODE_DEFINITION av1_mode_defs[MAX_MODES] used in the rd code. 21 enum { 22 THR_NEARESTMV, 23 THR_NEARESTL2, 24 THR_NEARESTL3, 25 THR_NEARESTB, 26 THR_NEARESTA2, 27 THR_NEARESTA, 28 THR_NEARESTG, 29 30 THR_NEWMV, 31 THR_NEWL2, 32 THR_NEWL3, 33 THR_NEWB, 34 THR_NEWA2, 35 THR_NEWA, 36 THR_NEWG, 37 38 THR_NEARMV, 39 THR_NEARL2, 40 THR_NEARL3, 41 THR_NEARB, 42 THR_NEARA2, 43 THR_NEARA, 44 THR_NEARG, 45 46 THR_GLOBALMV, 47 THR_GLOBALL2, 48 THR_GLOBALL3, 49 THR_GLOBALB, 50 THR_GLOBALA2, 51 THR_GLOBALA, 52 THR_GLOBALG, 53 54 THR_COMP_NEAREST_NEARESTLA, 55 THR_COMP_NEAREST_NEARESTL2A, 56 THR_COMP_NEAREST_NEARESTL3A, 57 THR_COMP_NEAREST_NEARESTGA, 58 THR_COMP_NEAREST_NEARESTLB, 59 THR_COMP_NEAREST_NEARESTL2B, 60 THR_COMP_NEAREST_NEARESTL3B, 61 THR_COMP_NEAREST_NEARESTGB, 62 THR_COMP_NEAREST_NEARESTLA2, 63 THR_COMP_NEAREST_NEARESTL2A2, 64 THR_COMP_NEAREST_NEARESTL3A2, 65 THR_COMP_NEAREST_NEARESTGA2, 66 THR_COMP_NEAREST_NEARESTLL2, 67 THR_COMP_NEAREST_NEARESTLL3, 68 THR_COMP_NEAREST_NEARESTLG, 69 THR_COMP_NEAREST_NEARESTBA, 70 71 THR_COMP_NEAR_NEARLB, 72 THR_COMP_NEW_NEWLB, 73 THR_COMP_NEW_NEARESTLB, 74 THR_COMP_NEAREST_NEWLB, 75 THR_COMP_NEW_NEARLB, 76 THR_COMP_NEAR_NEWLB, 77 THR_COMP_GLOBAL_GLOBALLB, 78 79 THR_COMP_NEAR_NEARLA, 80 THR_COMP_NEW_NEWLA, 81 THR_COMP_NEW_NEARESTLA, 82 THR_COMP_NEAREST_NEWLA, 83 THR_COMP_NEW_NEARLA, 84 THR_COMP_NEAR_NEWLA, 85 THR_COMP_GLOBAL_GLOBALLA, 86 87 THR_COMP_NEAR_NEARL2A, 88 THR_COMP_NEW_NEWL2A, 89 THR_COMP_NEW_NEARESTL2A, 90 THR_COMP_NEAREST_NEWL2A, 91 THR_COMP_NEW_NEARL2A, 92 THR_COMP_NEAR_NEWL2A, 93 THR_COMP_GLOBAL_GLOBALL2A, 94 95 THR_COMP_NEAR_NEARL3A, 96 THR_COMP_NEW_NEWL3A, 97 THR_COMP_NEW_NEARESTL3A, 98 THR_COMP_NEAREST_NEWL3A, 99 THR_COMP_NEW_NEARL3A, 100 THR_COMP_NEAR_NEWL3A, 101 THR_COMP_GLOBAL_GLOBALL3A, 102 103 THR_COMP_NEAR_NEARGA, 104 THR_COMP_NEW_NEWGA, 105 THR_COMP_NEW_NEARESTGA, 106 THR_COMP_NEAREST_NEWGA, 107 THR_COMP_NEW_NEARGA, 108 THR_COMP_NEAR_NEWGA, 109 THR_COMP_GLOBAL_GLOBALGA, 110 111 THR_COMP_NEAR_NEARL2B, 112 THR_COMP_NEW_NEWL2B, 113 THR_COMP_NEW_NEARESTL2B, 114 THR_COMP_NEAREST_NEWL2B, 115 THR_COMP_NEW_NEARL2B, 116 THR_COMP_NEAR_NEWL2B, 117 THR_COMP_GLOBAL_GLOBALL2B, 118 119 THR_COMP_NEAR_NEARL3B, 120 THR_COMP_NEW_NEWL3B, 121 THR_COMP_NEW_NEARESTL3B, 122 THR_COMP_NEAREST_NEWL3B, 123 THR_COMP_NEW_NEARL3B, 124 THR_COMP_NEAR_NEWL3B, 125 THR_COMP_GLOBAL_GLOBALL3B, 126 127 THR_COMP_NEAR_NEARGB, 128 THR_COMP_NEW_NEWGB, 129 THR_COMP_NEW_NEARESTGB, 130 THR_COMP_NEAREST_NEWGB, 131 THR_COMP_NEW_NEARGB, 132 THR_COMP_NEAR_NEWGB, 133 THR_COMP_GLOBAL_GLOBALGB, 134 135 THR_COMP_NEAR_NEARLA2, 136 THR_COMP_NEW_NEWLA2, 137 THR_COMP_NEW_NEARESTLA2, 138 THR_COMP_NEAREST_NEWLA2, 139 THR_COMP_NEW_NEARLA2, 140 THR_COMP_NEAR_NEWLA2, 141 THR_COMP_GLOBAL_GLOBALLA2, 142 143 THR_COMP_NEAR_NEARL2A2, 144 THR_COMP_NEW_NEWL2A2, 145 THR_COMP_NEW_NEARESTL2A2, 146 THR_COMP_NEAREST_NEWL2A2, 147 THR_COMP_NEW_NEARL2A2, 148 THR_COMP_NEAR_NEWL2A2, 149 THR_COMP_GLOBAL_GLOBALL2A2, 150 151 THR_COMP_NEAR_NEARL3A2, 152 THR_COMP_NEW_NEWL3A2, 153 THR_COMP_NEW_NEARESTL3A2, 154 THR_COMP_NEAREST_NEWL3A2, 155 THR_COMP_NEW_NEARL3A2, 156 THR_COMP_NEAR_NEWL3A2, 157 THR_COMP_GLOBAL_GLOBALL3A2, 158 159 THR_COMP_NEAR_NEARGA2, 160 THR_COMP_NEW_NEWGA2, 161 THR_COMP_NEW_NEARESTGA2, 162 THR_COMP_NEAREST_NEWGA2, 163 THR_COMP_NEW_NEARGA2, 164 THR_COMP_NEAR_NEWGA2, 165 THR_COMP_GLOBAL_GLOBALGA2, 166 167 THR_COMP_NEAR_NEARLL2, 168 THR_COMP_NEW_NEWLL2, 169 THR_COMP_NEW_NEARESTLL2, 170 THR_COMP_NEAREST_NEWLL2, 171 THR_COMP_NEW_NEARLL2, 172 THR_COMP_NEAR_NEWLL2, 173 THR_COMP_GLOBAL_GLOBALLL2, 174 175 THR_COMP_NEAR_NEARLL3, 176 THR_COMP_NEW_NEWLL3, 177 THR_COMP_NEW_NEARESTLL3, 178 THR_COMP_NEAREST_NEWLL3, 179 THR_COMP_NEW_NEARLL3, 180 THR_COMP_NEAR_NEWLL3, 181 THR_COMP_GLOBAL_GLOBALLL3, 182 183 THR_COMP_NEAR_NEARLG, 184 THR_COMP_NEW_NEWLG, 185 THR_COMP_NEW_NEARESTLG, 186 THR_COMP_NEAREST_NEWLG, 187 THR_COMP_NEW_NEARLG, 188 THR_COMP_NEAR_NEWLG, 189 THR_COMP_GLOBAL_GLOBALLG, 190 191 THR_COMP_NEAR_NEARBA, 192 THR_COMP_NEW_NEWBA, 193 THR_COMP_NEW_NEARESTBA, 194 THR_COMP_NEAREST_NEWBA, 195 THR_COMP_NEW_NEARBA, 196 THR_COMP_NEAR_NEWBA, 197 THR_COMP_GLOBAL_GLOBALBA, 198 199 THR_DC, 200 THR_PAETH, 201 THR_SMOOTH, 202 THR_SMOOTH_V, 203 THR_SMOOTH_H, 204 THR_H_PRED, 205 THR_V_PRED, 206 THR_D135_PRED, 207 THR_D203_PRED, 208 THR_D157_PRED, 209 THR_D67_PRED, 210 THR_D113_PRED, 211 THR_D45_PRED, 212 213 MAX_MODES, 214 SINGLE_REF_MODE_START = THR_NEARESTMV, 215 SINGLE_REF_MODE_END = THR_COMP_NEAREST_NEARESTLA, 216 NUM_SINGLE_REF_MODES = SINGLE_REF_MODE_END - SINGLE_REF_MODE_START, 217 THR_MODE_START = THR_NEARESTMV, 218 THR_MODE_END = MAX_MODES, 219 THR_INTER_MODE_START = THR_MODE_START, 220 THR_INTER_MODE_END = THR_DC, 221 THR_INVALID = 255 222 } UENUM1BYTE(THR_MODES); 223 224 enum { 225 THR_LAST, 226 THR_LAST2, 227 THR_LAST3, 228 THR_BWDR, 229 THR_ALTR2, 230 THR_GOLD, 231 THR_ALTR, 232 233 THR_COMP_LA, 234 THR_COMP_L2A, 235 THR_COMP_L3A, 236 THR_COMP_GA, 237 238 THR_COMP_LB, 239 THR_COMP_L2B, 240 THR_COMP_L3B, 241 THR_COMP_GB, 242 243 THR_COMP_LA2, 244 THR_COMP_L2A2, 245 THR_COMP_L3A2, 246 THR_COMP_GA2, 247 248 THR_INTRA, 249 250 MAX_REFS 251 } UENUM1BYTE(THR_MODES_SUB8X8); 252 253 enum { 254 FULL_TXFM_RD, 255 LOW_TXFM_RD, 256 } UENUM1BYTE(TXFM_RD_MODEL); 257 258 enum { 259 USE_FULL_RD = 0, 260 USE_FAST_RD, 261 USE_LARGESTALL, 262 } UENUM1BYTE(TX_SIZE_SEARCH_METHOD); 263 264 #ifdef __cplusplus 265 } // extern "C" 266 #endif 267 268 #endif // AOM_AV1_ENCODER_ENC_ENUMS_H_ 269