[5] | 1 | /* The copyright in this software is being made available under the BSD |
---|
| 2 | * License, included below. This software may be subject to other third party |
---|
| 3 | * and contributor rights, including patent rights, and no such rights are |
---|
[56] | 4 | * granted under this license. |
---|
[5] | 5 | * |
---|
[56] | 6 | * Copyright (c) 2010-2012, ITU/ISO/IEC |
---|
[5] | 7 | * All rights reserved. |
---|
| 8 | * |
---|
| 9 | * Redistribution and use in source and binary forms, with or without |
---|
| 10 | * modification, are permitted provided that the following conditions are met: |
---|
| 11 | * |
---|
| 12 | * * Redistributions of source code must retain the above copyright notice, |
---|
| 13 | * this list of conditions and the following disclaimer. |
---|
| 14 | * * Redistributions in binary form must reproduce the above copyright notice, |
---|
| 15 | * this list of conditions and the following disclaimer in the documentation |
---|
| 16 | * and/or other materials provided with the distribution. |
---|
[56] | 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
[5] | 18 | * be used to endorse or promote products derived from this software without |
---|
| 19 | * specific prior written permission. |
---|
| 20 | * |
---|
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
| 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS |
---|
| 25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
| 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
| 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
| 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
---|
| 31 | * THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 32 | */ |
---|
[2] | 33 | |
---|
| 34 | /** \file ContextTables.h |
---|
| 35 | \brief Defines constants and tables for SBAC |
---|
| 36 | \todo number of context models is not matched to actual use, should be fixed |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | #ifndef __CONTEXTTABLES__ |
---|
| 40 | #define __CONTEXTTABLES__ |
---|
| 41 | |
---|
[56] | 42 | //! \ingroup TLibCommon |
---|
| 43 | //! \{ |
---|
| 44 | |
---|
[2] | 45 | // ==================================================================================================================== |
---|
| 46 | // Constants |
---|
| 47 | // ==================================================================================================================== |
---|
| 48 | |
---|
[56] | 49 | #define MAX_NUM_CTX_MOD 512 ///< maximum number of supported contexts |
---|
| 50 | |
---|
[2] | 51 | #define NUM_SPLIT_FLAG_CTX 3 ///< number of context models for split flag |
---|
| 52 | #define NUM_SKIP_FLAG_CTX 3 ///< number of context models for skip flag |
---|
| 53 | |
---|
[189] | 54 | #if LGE_ILLUCOMP_B0045 |
---|
| 55 | #define NUM_IC_FLAG_CTX 3 ///< number of context models for illumination compensation flag |
---|
| 56 | #endif |
---|
| 57 | |
---|
[56] | 58 | #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended |
---|
| 59 | #if MRG_IDX_CTX_RED |
---|
| 60 | #define NUM_MERGE_IDX_EXT_CTX 1 ///< number of context models for merge index of merge extended |
---|
| 61 | #else |
---|
[2] | 62 | #define NUM_MERGE_IDX_EXT_CTX 4 ///< number of context models for merge index of merge extended |
---|
[56] | 63 | #endif |
---|
[2] | 64 | |
---|
[56] | 65 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
| 66 | #define NUM_RES_PRED_FLAG_CTX 4 ///< number of context for residual prediction flag |
---|
| 67 | #endif |
---|
| 68 | |
---|
| 69 | #define NUM_ALF_CTRL_FLAG_CTX 1 ///< number of context models for ALF control flag |
---|
| 70 | #define NUM_PART_SIZE_CTX 4 ///< number of context models for partition size |
---|
| 71 | #if AMP_CTX |
---|
| 72 | #define NUM_CU_AMP_CTX 1 ///< number of context models for partition size (AMP) |
---|
[2] | 73 | #else |
---|
[56] | 74 | #define NUM_CU_X_POS_CTX 2 ///< number of context models for partition size (AMP) |
---|
| 75 | #define NUM_CU_Y_POS_CTX 2 ///< number of context models for partition size (AMP) |
---|
[2] | 76 | #endif |
---|
[56] | 77 | #define NUM_PRED_MODE_CTX 1 ///< number of context models for prediction mode |
---|
[2] | 78 | |
---|
[56] | 79 | #define NUM_ADI_CTX 1 ///< number of context models for intra prediction |
---|
| 80 | |
---|
| 81 | #define NUM_CHROMA_PRED_CTX 2 ///< number of context models for intra prediction (chroma) |
---|
[2] | 82 | #define NUM_INTER_DIR_CTX 4 ///< number of context models for inter prediction direction |
---|
[56] | 83 | #define NUM_MV_RES_CTX 2 ///< number of context models for motion vector difference |
---|
[2] | 84 | |
---|
[56] | 85 | #define NUM_REF_NO_CTX 4 ///< number of context models for reference index |
---|
[2] | 86 | #define NUM_TRANS_SUBDIV_FLAG_CTX 10 ///< number of context models for transform subdivision flags |
---|
[56] | 87 | #define NUM_QT_CBF_CTX 5 ///< number of context models for QT CBF |
---|
| 88 | #define NUM_QT_ROOT_CBF_CTX 1 ///< number of context models for QT ROOT CBF |
---|
| 89 | #define NUM_DELTA_QP_CTX 3 ///< number of context models for dQP |
---|
[2] | 90 | |
---|
[56] | 91 | #define NUM_SIG_CG_FLAG_CTX 2 ///< number of context models for MULTI_LEVEL_SIGNIFICANCE |
---|
| 92 | |
---|
| 93 | #define NUM_SIG_FLAG_CTX 48 ///< number of context models for sig flag |
---|
| 94 | |
---|
| 95 | #define NUM_SIG_FLAG_CTX_LUMA 27 ///< number of context models for luma sig flag |
---|
| 96 | #define NUM_SIG_FLAG_CTX_CHROMA 21 ///< number of context models for chroma sig flag |
---|
| 97 | #if LAST_CTX_REDUCTION |
---|
| 98 | #define NUM_CTX_LAST_FLAG_XY 15 ///< number of context models for last coefficient position |
---|
[2] | 99 | #else |
---|
[56] | 100 | #define NUM_CTX_LAST_FLAG_XY 18 ///< number of context models for last coefficient position |
---|
[2] | 101 | #endif |
---|
| 102 | |
---|
[56] | 103 | #if LEVEL_CTX_LUMA_RED |
---|
| 104 | #define NUM_ONE_FLAG_CTX 24 ///< number of context models for greater than 1 flag |
---|
| 105 | #define NUM_ONE_FLAG_CTX_LUMA 16 ///< number of context models for greater than 1 flag of luma |
---|
| 106 | #define NUM_ONE_FLAG_CTX_CHROMA 8 ///< number of context models for greater than 1 flag of chroma |
---|
| 107 | #if RESTRICT_GR1GR2FLAG_NUMBER |
---|
| 108 | #define NUM_ABS_FLAG_CTX 6 ///< number of context models for greater than 2 flag |
---|
| 109 | #define NUM_ABS_FLAG_CTX_LUMA 4 ///< number of context models for greater than 2 flag of luma |
---|
| 110 | #define NUM_ABS_FLAG_CTX_CHROMA 2 ///< number of context models for greater than 2 flag of chroma |
---|
| 111 | #else |
---|
| 112 | #define NUM_ABS_FLAG_CTX 18 ///< number of context models for greater than 2 flag |
---|
| 113 | #define NUM_ABS_FLAG_CTX_LUMA 12 ///< number of context models for greater than 2 flag of luma |
---|
| 114 | #define NUM_ABS_FLAG_CTX_CHROMA 6 ///< number of context models for greater than 2 flag of chroma |
---|
| 115 | #endif |
---|
| 116 | #else |
---|
| 117 | #define NUM_ONE_FLAG_CTX 32 ///< number of context models for greater than 1 flag |
---|
| 118 | #define NUM_ONE_FLAG_CTX_LUMA 24 ///< number of context models for greater than 1 flag of luma |
---|
| 119 | #define NUM_ONE_FLAG_CTX_CHROMA 8 ///< number of context models for greater than 1 flag of chroma |
---|
| 120 | #if RESTRICT_GR1GR2FLAG_NUMBER |
---|
| 121 | #define NUM_ABS_FLAG_CTX 8 ///< number of context models for greater than 2 flag |
---|
| 122 | #define NUM_ABS_FLAG_CTX_LUMA 6 ///< number of context models for greater than 2 flag of luma |
---|
| 123 | #define NUM_ABS_FLAG_CTX_CHROMA 2 ///< number of context models for greater than 2 flag of chroma |
---|
| 124 | #else |
---|
| 125 | #define NUM_ABS_FLAG_CTX 24 ///< number of context models for greater than 2 flag |
---|
| 126 | #define NUM_ABS_FLAG_CTX_LUMA 18 ///< number of context models for greater than 2 flag of luma |
---|
| 127 | #define NUM_ABS_FLAG_CTX_CHROMA 6 ///< number of context models for greater than 2 flag of chroma |
---|
| 128 | #endif |
---|
| 129 | #endif |
---|
| 130 | |
---|
[2] | 131 | #define NUM_MVP_IDX_CTX 2 ///< number of context models for MVP index |
---|
| 132 | |
---|
| 133 | #define NUM_ALF_FLAG_CTX 1 ///< number of context models for ALF flag |
---|
| 134 | #define NUM_ALF_UVLC_CTX 2 ///< number of context models for ALF UVLC (filter length) |
---|
| 135 | #define NUM_ALF_SVLC_CTX 3 ///< number of context models for ALF SVLC (filter coeff.) |
---|
| 136 | |
---|
[56] | 137 | #define NUM_SAO_FLAG_CTX 1 ///< number of context models for SAO flag |
---|
| 138 | #define NUM_SAO_UVLC_CTX 2 ///< number of context models for SAO UVLC |
---|
| 139 | #define NUM_SAO_SVLC_CTX 3 ///< number of context models for SAO SVLC |
---|
| 140 | #if SAO_UNIT_INTERLEAVING |
---|
| 141 | #define NUM_SAO_RUN_CTX 3 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 142 | #define NUM_SAO_MERGE_LEFT_FLAG_CTX 3 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 143 | #define NUM_SAO_MERGE_UP_FLAG_CTX 1 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 144 | #define NUM_SAO_TYPE_IDX_CTX 2 ///< number of context models for AO SVLC (filter coeff.) |
---|
[2] | 145 | #endif |
---|
[56] | 146 | #if CABAC_LINEAR_INIT |
---|
| 147 | #define CNU 154 ///< dummy initialization value for unused context models 'Context model Not Used' |
---|
| 148 | #else |
---|
| 149 | #define CNU 119 ///< dummy initialization value for unused context models 'Context model Not Used' |
---|
| 150 | #endif |
---|
[2] | 151 | |
---|
[5] | 152 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
[56] | 153 | #define NUM_DMM_FLAG_CTX 1 ///< number of context models for DMM flag |
---|
| 154 | #define NUM_DMM_MODE_CTX 1 ///< number of context models for DMM mode |
---|
[251] | 155 | #if LGE_DMM3_SIMP_C0044 |
---|
| 156 | #define NUM_DMM_DATA_CTX 4 ///< number of context models for DMM data |
---|
| 157 | #else |
---|
[56] | 158 | #define NUM_DMM_DATA_CTX 3 ///< number of context models for DMM data |
---|
[2] | 159 | #endif |
---|
[251] | 160 | #endif |
---|
[2] | 161 | |
---|
[189] | 162 | #if LGE_EDGE_INTRA_A0070 |
---|
[100] | 163 | #define NUM_EDGE_INTRA_CTX 1 |
---|
| 164 | #if LGE_EDGE_INTRA_DELTA_DC |
---|
| 165 | #define NUM_EDGE_INTRA_DELTA_DC_CTX 2 // one for Delta_DC flag, another for Delta_DC value |
---|
| 166 | #endif |
---|
| 167 | #endif |
---|
| 168 | |
---|
[189] | 169 | #if RWTH_SDC_DLT_B0036 |
---|
| 170 | #define SDC_NUM_FLAG_CTX 3 |
---|
| 171 | #define SDC_NUM_RESIDUAL_FLAG_CTX 1 |
---|
| 172 | #define SDC_NUM_SIGN_FLAG_CTX 1 |
---|
| 173 | #define SDC_NUM_RESIDUAL_CTX 10 |
---|
| 174 | |
---|
| 175 | #define SDC_NUM_PRED_MODE_CTX 5 |
---|
| 176 | #endif |
---|
| 177 | |
---|
[2] | 178 | // ==================================================================================================================== |
---|
| 179 | // Tables |
---|
| 180 | // ==================================================================================================================== |
---|
| 181 | |
---|
[56] | 182 | // initial probability for split flag |
---|
| 183 | #if CABAC_LINEAR_INIT |
---|
| 184 | static const UChar |
---|
| 185 | INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] = |
---|
[2] | 186 | { |
---|
[56] | 187 | { 139, 141, 157, }, |
---|
| 188 | { 107, 139, 126, }, |
---|
| 189 | { 107, 139, 126, }, |
---|
[2] | 190 | }; |
---|
| 191 | |
---|
[56] | 192 | static const UChar |
---|
| 193 | INIT_SKIP_FLAG[3][NUM_SKIP_FLAG_CTX] = |
---|
[2] | 194 | { |
---|
[56] | 195 | { CNU, CNU, CNU, }, |
---|
| 196 | { 197, 185, 201, }, |
---|
| 197 | { 197, 185, 201, }, |
---|
[2] | 198 | }; |
---|
| 199 | |
---|
[189] | 200 | #if LGE_ILLUCOMP_B0045 |
---|
[56] | 201 | static const UChar |
---|
[189] | 202 | INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = |
---|
| 203 | { |
---|
| 204 | { CNU, CNU, CNU, }, |
---|
| 205 | { 197, 185, 201, }, |
---|
| 206 | { 197, 185, 201, }, |
---|
| 207 | }; |
---|
| 208 | #endif |
---|
| 209 | |
---|
| 210 | static const UChar |
---|
[56] | 211 | INIT_ALF_CTRL_FLAG[3][NUM_ALF_CTRL_FLAG_CTX] = |
---|
[2] | 212 | { |
---|
[56] | 213 | { 200, }, |
---|
| 214 | { 139, }, |
---|
| 215 | { 169, }, |
---|
[2] | 216 | }; |
---|
| 217 | |
---|
[56] | 218 | static const UChar |
---|
| 219 | INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = |
---|
| 220 | { |
---|
| 221 | { CNU, }, |
---|
| 222 | { 110, }, |
---|
| 223 | { 154, }, |
---|
| 224 | }; |
---|
[2] | 225 | |
---|
[56] | 226 | static const UChar |
---|
| 227 | INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] = |
---|
[2] | 228 | { |
---|
[56] | 229 | #if MRG_IDX_CTX_RED |
---|
| 230 | { CNU, }, |
---|
| 231 | { 122, }, |
---|
| 232 | { 137, }, |
---|
| 233 | #else |
---|
| 234 | { CNU, CNU, CNU, CNU, }, |
---|
| 235 | { 122, 138, 153, 182, }, |
---|
| 236 | { 137, 139, 154, 139, }, |
---|
| 237 | #endif |
---|
| 238 | }; |
---|
| 239 | |
---|
| 240 | #if HHI_INTER_VIEW_RESIDUAL_PRED |
---|
| 241 | static const UChar |
---|
| 242 | INIT_RES_PRED_FLAG[3][NUM_RES_PRED_FLAG_CTX] = |
---|
| 243 | { |
---|
| 244 | { CNU, CNU, CNU, CNU }, |
---|
| 245 | { 154, 154, 154, 154 }, |
---|
| 246 | { 154, 154, 154, 154 }, |
---|
| 247 | }; |
---|
| 248 | #endif |
---|
| 249 | |
---|
| 250 | static const UChar |
---|
| 251 | INIT_PART_SIZE[3][NUM_PART_SIZE_CTX] = |
---|
| 252 | { |
---|
| 253 | { 184, CNU, CNU, CNU, }, |
---|
| 254 | { 154, 139, CNU, CNU, }, |
---|
| 255 | { 154, 139, CNU, CNU, }, |
---|
| 256 | }; |
---|
| 257 | |
---|
| 258 | #if AMP_CTX |
---|
| 259 | static const UChar |
---|
| 260 | INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] = |
---|
| 261 | { |
---|
| 262 | { CNU, }, |
---|
| 263 | { 154, }, |
---|
| 264 | { 154, }, |
---|
| 265 | }; |
---|
| 266 | #else |
---|
| 267 | static const UChar |
---|
| 268 | INIT_CU_X_POS[3][NUM_CU_X_POS_CTX] = |
---|
| 269 | { |
---|
| 270 | { CNU, CNU, }, |
---|
| 271 | { 154, 139, }, |
---|
| 272 | { 154, 139, }, |
---|
| 273 | }; |
---|
| 274 | |
---|
| 275 | static const UChar |
---|
| 276 | INIT_CU_Y_POS[3][NUM_CU_Y_POS_CTX] = |
---|
| 277 | { |
---|
| 278 | { CNU, CNU, }, |
---|
| 279 | { 154, 154, }, |
---|
| 280 | { 154, 139, }, |
---|
| 281 | }; |
---|
| 282 | #endif |
---|
| 283 | |
---|
| 284 | static const UChar |
---|
| 285 | INIT_PRED_MODE[3][NUM_PRED_MODE_CTX] = |
---|
| 286 | { |
---|
| 287 | { CNU, }, |
---|
| 288 | { 149, }, |
---|
| 289 | { 134, }, |
---|
| 290 | }; |
---|
| 291 | |
---|
| 292 | static const UChar |
---|
| 293 | INIT_INTRA_PRED_MODE[3][NUM_ADI_CTX] = |
---|
| 294 | { |
---|
| 295 | { 184, }, |
---|
| 296 | { 154, }, |
---|
| 297 | { 183, }, |
---|
| 298 | }; |
---|
| 299 | |
---|
| 300 | static const UChar |
---|
| 301 | INIT_CHROMA_PRED_MODE[3][NUM_CHROMA_PRED_CTX] = |
---|
| 302 | { |
---|
| 303 | { 63, 139, }, |
---|
| 304 | { 152, 139, }, |
---|
| 305 | { 152, 139, }, |
---|
| 306 | }; |
---|
| 307 | |
---|
| 308 | static const UChar |
---|
| 309 | INIT_INTER_DIR[3][NUM_INTER_DIR_CTX] = |
---|
| 310 | { |
---|
| 311 | { CNU, CNU, CNU, CNU, }, |
---|
| 312 | #if CABAC_INIT_FLAG |
---|
| 313 | { 95, 79, 63, 31, }, |
---|
| 314 | #else |
---|
| 315 | { CNU, CNU, CNU, CNU, }, |
---|
| 316 | #endif |
---|
| 317 | { 95, 79, 63, 31, }, |
---|
| 318 | }; |
---|
| 319 | |
---|
| 320 | static const UChar |
---|
| 321 | INIT_MVD[3][NUM_MV_RES_CTX] = |
---|
| 322 | { |
---|
| 323 | { CNU, CNU, }, |
---|
| 324 | { 140, 198, }, |
---|
| 325 | { 169, 198, }, |
---|
| 326 | }; |
---|
| 327 | |
---|
| 328 | static const UChar |
---|
| 329 | INIT_REF_PIC[3][NUM_REF_NO_CTX] = |
---|
| 330 | { |
---|
| 331 | { CNU, CNU, CNU, CNU, }, |
---|
| 332 | { 153, 153, 139, CNU, }, |
---|
| 333 | { 153, 153, 168, CNU, }, |
---|
| 334 | }; |
---|
| 335 | |
---|
| 336 | static const UChar |
---|
| 337 | INIT_DQP[3][NUM_DELTA_QP_CTX] = |
---|
| 338 | { |
---|
| 339 | { 154, 154, 154, }, |
---|
| 340 | { 154, 154, 154, }, |
---|
| 341 | { 154, 154, 154, }, |
---|
| 342 | }; |
---|
| 343 | |
---|
| 344 | static const UChar |
---|
| 345 | INIT_QT_CBF[3][2*NUM_QT_CBF_CTX] = |
---|
| 346 | { |
---|
| 347 | { 111, 141, CNU, CNU, CNU, 94, 138, 182, CNU, CNU, }, |
---|
| 348 | { 153, 111, CNU, CNU, CNU, 149, 107, 167, CNU, CNU, }, |
---|
| 349 | { 153, 111, CNU, CNU, CNU, 149, 92, 167, CNU, CNU, }, |
---|
| 350 | }; |
---|
| 351 | |
---|
| 352 | static const UChar |
---|
| 353 | INIT_QT_ROOT_CBF[3][NUM_QT_ROOT_CBF_CTX] = |
---|
| 354 | { |
---|
| 355 | { CNU, }, |
---|
| 356 | { 79, }, |
---|
| 357 | { 79, }, |
---|
| 358 | }; |
---|
| 359 | |
---|
| 360 | #if LAST_CTX_REDUCTION |
---|
| 361 | static const UChar |
---|
| 362 | INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = |
---|
| 363 | { |
---|
| 364 | { 110, 110, 124, 110, 140, 111, 125, 111, 127, 111, 111, 156, 127, 127, 111, |
---|
| 365 | 108, 123, 63, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 366 | }, |
---|
| 367 | { 125, 110, 94, 110, 125, 110, 125, 111, 111, 110, 139, 111, 111, 111, 125, |
---|
| 368 | 108, 123, 108, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 369 | }, |
---|
| 370 | { 125, 110, 124, 110, 125, 110, 125, 111, 111, 110, 139, 111, 111, 111, 125, |
---|
| 371 | 108, 123, 93, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 372 | }, |
---|
| 373 | }; |
---|
| 374 | #else |
---|
| 375 | static const UChar |
---|
| 376 | INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = |
---|
| 377 | { |
---|
| 378 | { 110, 110, 124, 110, 140, 111, 124, 125, 111, 127, 111, 138, 111, 156, 127, 127, 111, 94, |
---|
| 379 | 108, 123, 63, 63, 139, 124, 93, 108, 125, 111, 110, 63, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 380 | }, |
---|
| 381 | { 125, 110, 124, 110, 125, 110, 153, 125, 111, 111, 110, 153, 139, 111, 111, 111, 125, 139, |
---|
| 382 | 108, 123, 108, 152, 124, 94, 123, 137, 139, 110, 110, 154, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 383 | }, |
---|
| 384 | { 125, 110, 124, 110, 125, 110, 153, 125, 111, 111, 110, 153, 139, 111, 111, 111, 125, 139, |
---|
| 385 | 108, 123, 93, 152, 124, 94, 123, 152, 139, 110, 110, 154, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 386 | }, |
---|
| 387 | }; |
---|
| 388 | #endif |
---|
| 389 | |
---|
| 390 | static const UChar |
---|
| 391 | INIT_SIG_CG_FLAG[3][2 * NUM_SIG_CG_FLAG_CTX] = |
---|
| 392 | { |
---|
| 393 | { 91, 171, |
---|
| 394 | 134, 141, |
---|
| 395 | }, |
---|
| 396 | { 121, 140, |
---|
| 397 | 61, 154, |
---|
| 398 | }, |
---|
| 399 | { 121, 140, |
---|
| 400 | 61, 154, |
---|
| 401 | }, |
---|
| 402 | }; |
---|
| 403 | |
---|
| 404 | static const UChar |
---|
| 405 | INIT_SIG_FLAG[3][NUM_SIG_FLAG_CTX] = |
---|
| 406 | { |
---|
| 407 | { 141, 111, 125, 110, 110, 94, 124, 108, 124, 125, 139, 124, 63, 139, 168, 138, 107, 123, 92, 111, 141, 107, 125, 141, 179, 153, 125, 140, 139, 182, 123, 47, 153, 182, 137, 149, 192, 152, 224, 136, 31, 136, 74, 140, 141, 136, 139, 111, }, |
---|
| 408 | { 170, 154, 139, 153, 139, 123, 123, 63, 153, 168, 153, 152, 92, 152, 152, 137, 122, 92, 61, 155, 185, 166, 183, 140, 136, 153, 154, 155, 153, 123, 63, 61, 167, 153, 167, 136, 149, 107, 136, 121, 122, 91, 149, 170, 185, 151, 183, 140, }, |
---|
| 409 | { 170, 154, 139, 153, 139, 123, 123, 63, 124, 139, 153, 152, 92, 152, 152, 137, 137, 92, 61, 170, 185, 166, 183, 140, 136, 153, 154, 155, 153, 138, 107, 61, 167, 153, 167, 136, 121, 122, 136, 121, 122, 91, 149, 170, 170, 151, 183, 140, }, |
---|
| 410 | }; |
---|
| 411 | |
---|
| 412 | #if LEVEL_CTX_LUMA_RED |
---|
| 413 | static const UChar |
---|
| 414 | INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = |
---|
| 415 | { |
---|
| 416 | { 140, 92, 137, 138, 140, 152, 138, 139, 153, 74, 149, 92, 139, 107, 122, 152, 140, 179, 166, 182, 140, 227, 122, 197, }, |
---|
| 417 | { 154, 196, 196, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, 136, 137, 169, 194, 166, 167, 154, 167, 137, 182, }, |
---|
| 418 | { 154, 196, 167, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, 136, 122, 169, 208, 166, 167, 154, 152, 167, 182, }, |
---|
| 419 | }; |
---|
| 420 | |
---|
| 421 | #if RESTRICT_GR1GR2FLAG_NUMBER |
---|
| 422 | static const UChar |
---|
| 423 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 424 | { |
---|
| 425 | { 138, 153, 136, 167, 152, 152, }, |
---|
| 426 | { 107, 167, 91, 122, 107, 167, }, |
---|
| 427 | { 107, 167, 91, 107, 107, 167, }, |
---|
| 428 | }; |
---|
| 429 | #else |
---|
| 430 | static const UChar |
---|
| 431 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 432 | { |
---|
| 433 | { 138, 139, 111, 153, 139, 111, 136, 167, 139, 167, 153, 139, 152, 139, 140, 152, 184, 141, }, |
---|
| 434 | { 107, 153, 125, 167, 153, 140, 91, 137, 153, 122, 167, 139, 107, 153, 140, 167, 183, 140, }, |
---|
| 435 | { 107, 153, 125, 167, 153, 140, 91, 137, 153, 107, 167, 139, 107, 153, 140, 167, 183, 140, }, |
---|
| 436 | }; |
---|
| 437 | #endif |
---|
| 438 | #else |
---|
| 439 | static const UChar |
---|
| 440 | INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = |
---|
| 441 | { |
---|
| 442 | { 140, 92, 137, 138, 140, 152, 138, 139, 126, 168, 139, 139, 153, 74, 149, 92, 139, 107, 122, 152, 110, 93, 152, 138, 140, 179, 166, 182, 140, 227, 122, 197, }, |
---|
| 443 | { 154, 196, 196, 167, 154, 152, 167, 182, 155, 139, 139, 139, 182, 134, 149, 136, 153, 121, 136, 137, 139, 122, 152, 167, 169, 194, 166, 167, 154, 167, 137, 182, }, |
---|
| 444 | { 154, 196, 167, 167, 154, 152, 167, 182, 155, 139, 139, 139, 182, 134, 149, 136, 153, 121, 136, 122, 139, 107, 152, 152, 169, 208, 166, 167, 154, 152, 167, 182, }, |
---|
| 445 | }; |
---|
| 446 | |
---|
| 447 | #if RESTRICT_GR1GR2FLAG_NUMBER |
---|
| 448 | static const UChar |
---|
| 449 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 450 | { |
---|
| 451 | { 138, 153, 139, 136, 167, 153, 152, 152, }, |
---|
| 452 | { 107, 167, 139, 91, 122, 152, 107, 167, }, |
---|
| 453 | { 107, 167, 139, 91, 107, 93, 107, 167, }, |
---|
| 454 | }; |
---|
| 455 | #else |
---|
| 456 | static const UChar |
---|
| 457 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 458 | { |
---|
| 459 | { 138, 139, 111, 153, 139, 111, 139, 125, 111, 136, 167, 139, 167, 153, 139, 153, 139, 110, 152, 139, 140, 152, 184, 141, }, |
---|
| 460 | { 107, 153, 125, 167, 153, 140, 139, 154, 155, 91, 137, 153, 122, 167, 139, 152, 138, 139, 107, 153, 140, 167, 183, 140, }, |
---|
| 461 | { 107, 153, 125, 167, 153, 140, 139, 154, 155, 91, 137, 153, 107, 167, 139, 93, 138, 139, 107, 153, 140, 167, 183, 140, }, |
---|
| 462 | }; |
---|
| 463 | #endif |
---|
| 464 | #endif |
---|
| 465 | |
---|
| 466 | static const UChar |
---|
| 467 | INIT_MVP_IDX[3][NUM_MVP_IDX_CTX] = |
---|
| 468 | { |
---|
| 469 | { CNU, CNU, }, |
---|
| 470 | { 168, CNU, }, |
---|
| 471 | { 168, CNU, }, |
---|
| 472 | }; |
---|
| 473 | |
---|
| 474 | static const UChar |
---|
| 475 | INIT_ALF_FLAG[3][NUM_ALF_FLAG_CTX] = |
---|
| 476 | { |
---|
| 477 | { 153, }, |
---|
| 478 | { 153, }, |
---|
| 479 | { 153, }, |
---|
| 480 | }; |
---|
| 481 | |
---|
| 482 | static const UChar |
---|
| 483 | INIT_ALF_UVLC[3][NUM_ALF_UVLC_CTX] = |
---|
| 484 | { |
---|
| 485 | { 140, 154, }, |
---|
| 486 | { 154, 154, }, |
---|
| 487 | { 154, 154, }, |
---|
| 488 | }; |
---|
| 489 | |
---|
| 490 | static const UChar |
---|
| 491 | INIT_ALF_SVLC[3][NUM_ALF_SVLC_CTX] = |
---|
| 492 | { |
---|
| 493 | { 187, 154, 159, }, |
---|
| 494 | { 141, 154, 189, }, |
---|
| 495 | { 141, 154, 159, }, |
---|
| 496 | }; |
---|
| 497 | |
---|
| 498 | static const UChar |
---|
| 499 | INIT_SAO_FLAG[3][NUM_SAO_FLAG_CTX] = |
---|
| 500 | { |
---|
| 501 | { 154, }, |
---|
| 502 | { 153, }, |
---|
| 503 | { 153, }, |
---|
| 504 | }; |
---|
| 505 | |
---|
| 506 | static const UChar |
---|
| 507 | INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] = |
---|
| 508 | { |
---|
| 509 | { 143, 140, }, |
---|
| 510 | { 185, 140, }, |
---|
| 511 | { 200, 140, }, |
---|
| 512 | }; |
---|
| 513 | |
---|
| 514 | static const UChar |
---|
| 515 | INIT_SAO_SVLC[3][NUM_SAO_SVLC_CTX] = |
---|
| 516 | { |
---|
| 517 | { 247, 154, 244, }, |
---|
| 518 | { 215, 154, 169, }, |
---|
| 519 | { 215, 154, 169, }, |
---|
| 520 | }; |
---|
| 521 | |
---|
| 522 | #if SAO_UNIT_INTERLEAVING |
---|
| 523 | static const UChar |
---|
| 524 | INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] = |
---|
| 525 | { |
---|
| 526 | { 153, 153, 153, }, |
---|
| 527 | { 153, 153, 153, }, |
---|
| 528 | { 153, 153, 153, }, |
---|
| 529 | }; |
---|
| 530 | |
---|
| 531 | static const UChar |
---|
| 532 | INIT_SAO_MERGE_UP_FLAG[3][NUM_SAO_MERGE_UP_FLAG_CTX] = |
---|
| 533 | { |
---|
| 534 | { 175, }, |
---|
| 535 | { 153, }, |
---|
| 536 | { 153, }, |
---|
| 537 | }; |
---|
| 538 | |
---|
| 539 | static const UChar |
---|
| 540 | INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] = |
---|
| 541 | { |
---|
| 542 | { 160, 140, }, |
---|
| 543 | { 185, 140, }, |
---|
| 544 | { 200, 140, }, |
---|
| 545 | }; |
---|
| 546 | #endif |
---|
| 547 | |
---|
| 548 | static const UChar |
---|
| 549 | INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] = |
---|
| 550 | { |
---|
| 551 | { CNU, 224, 167, 122, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 552 | { CNU, 124, 138, 94, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 553 | { CNU, 153, 138, 138, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 554 | }; |
---|
| 555 | #else |
---|
| 556 | static const UChar |
---|
| 557 | INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] = |
---|
| 558 | { |
---|
[2] | 559 | { |
---|
[56] | 560 | 87, 74, 107, |
---|
| 561 | |
---|
[2] | 562 | }, |
---|
| 563 | { |
---|
[56] | 564 | 84, 103, 105, |
---|
| 565 | |
---|
[2] | 566 | }, |
---|
| 567 | { |
---|
[56] | 568 | 84, 103, 105, |
---|
| 569 | |
---|
| 570 | }, |
---|
[2] | 571 | }; |
---|
| 572 | |
---|
| 573 | // initial probability for skip flag |
---|
[56] | 574 | static const UChar |
---|
| 575 | INIT_SKIP_FLAG[3][NUM_SKIP_FLAG_CTX] = |
---|
[2] | 576 | { |
---|
| 577 | { |
---|
[56] | 578 | CNU, CNU, CNU, |
---|
| 579 | |
---|
[2] | 580 | }, |
---|
| 581 | { |
---|
[56] | 582 | 165, 168, 154, |
---|
| 583 | |
---|
[2] | 584 | }, |
---|
| 585 | { |
---|
[56] | 586 | 165, 168, 154, |
---|
| 587 | |
---|
| 588 | }, |
---|
[2] | 589 | }; |
---|
| 590 | |
---|
| 591 | // initial probability for skip flag |
---|
[56] | 592 | static const UChar |
---|
| 593 | INIT_ALF_CTRL_FLAG[3][NUM_ALF_CTRL_FLAG_CTX] = |
---|
[2] | 594 | { |
---|
| 595 | { |
---|
[56] | 596 | 153, |
---|
| 597 | |
---|
[2] | 598 | }, |
---|
| 599 | { |
---|
[56] | 600 | 87, |
---|
| 601 | |
---|
[2] | 602 | }, |
---|
| 603 | { |
---|
[56] | 604 | 135, |
---|
| 605 | |
---|
| 606 | }, |
---|
[2] | 607 | }; |
---|
| 608 | |
---|
| 609 | // initial probability for merge flag |
---|
[56] | 610 | static const UChar |
---|
| 611 | INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = |
---|
[2] | 612 | { |
---|
| 613 | { |
---|
[56] | 614 | CNU, |
---|
| 615 | |
---|
[2] | 616 | }, |
---|
| 617 | { |
---|
[56] | 618 | 72, |
---|
| 619 | |
---|
[2] | 620 | }, |
---|
| 621 | { |
---|
[56] | 622 | 119, |
---|
| 623 | |
---|
| 624 | }, |
---|
[2] | 625 | }; |
---|
| 626 | |
---|
[56] | 627 | static const UChar |
---|
| 628 | INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] = |
---|
[2] | 629 | { |
---|
[56] | 630 | #if MRG_IDX_CTX_RED |
---|
[2] | 631 | { |
---|
[56] | 632 | CNU, |
---|
| 633 | |
---|
[2] | 634 | }, |
---|
| 635 | { |
---|
[56] | 636 | 100, |
---|
| 637 | |
---|
[2] | 638 | }, |
---|
| 639 | { |
---|
[56] | 640 | 116, |
---|
| 641 | }, |
---|
| 642 | #else |
---|
| 643 | { |
---|
| 644 | CNU, CNU, CNU, CNU, |
---|
| 645 | |
---|
| 646 | }, |
---|
| 647 | { |
---|
| 648 | 100, 86, 102, 133, |
---|
| 649 | |
---|
| 650 | }, |
---|
| 651 | { |
---|
| 652 | 116, 87, 119, 103, |
---|
| 653 | |
---|
| 654 | }, |
---|
| 655 | #endif |
---|
[2] | 656 | }; |
---|
| 657 | |
---|
[56] | 658 | // initial probability for PU size |
---|
| 659 | static const UChar |
---|
| 660 | INIT_PART_SIZE[3][NUM_PART_SIZE_CTX] = |
---|
[2] | 661 | { |
---|
| 662 | { |
---|
[56] | 663 | 167, CNU, CNU, CNU, |
---|
| 664 | |
---|
[2] | 665 | }, |
---|
| 666 | { |
---|
[56] | 667 | 119, 87, CNU, CNU, |
---|
| 668 | |
---|
[2] | 669 | }, |
---|
| 670 | { |
---|
[56] | 671 | 119, 87, CNU, CNU, |
---|
| 672 | |
---|
| 673 | }, |
---|
[2] | 674 | }; |
---|
[56] | 675 | #if AMP_CTX |
---|
| 676 | static const UChar |
---|
| 677 | INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] = |
---|
[2] | 678 | { |
---|
| 679 | { |
---|
[56] | 680 | CNU, |
---|
[2] | 681 | }, |
---|
| 682 | { |
---|
[56] | 683 | 119, |
---|
[2] | 684 | }, |
---|
| 685 | { |
---|
[56] | 686 | 119, |
---|
| 687 | }, |
---|
[2] | 688 | }; |
---|
[56] | 689 | #else |
---|
| 690 | // initial probability for AMP split position (X) |
---|
| 691 | static const UChar |
---|
| 692 | INIT_CU_X_POS[3][NUM_CU_X_POS_CTX] = |
---|
| 693 | { |
---|
| 694 | { |
---|
| 695 | CNU, CNU, |
---|
| 696 | |
---|
| 697 | }, |
---|
| 698 | { |
---|
| 699 | 119, 103, |
---|
| 700 | |
---|
| 701 | }, |
---|
| 702 | { |
---|
| 703 | 119, 103, |
---|
| 704 | |
---|
| 705 | }, |
---|
| 706 | }; |
---|
[2] | 707 | |
---|
[56] | 708 | // initial probability for AMP split position (Y) |
---|
| 709 | static const UChar |
---|
| 710 | INIT_CU_Y_POS[3][NUM_CU_Y_POS_CTX] = |
---|
[2] | 711 | { |
---|
| 712 | { |
---|
[56] | 713 | CNU, CNU, |
---|
| 714 | |
---|
[2] | 715 | }, |
---|
| 716 | { |
---|
[56] | 717 | 119, 119, |
---|
| 718 | |
---|
[2] | 719 | }, |
---|
| 720 | { |
---|
[56] | 721 | 119, 103, |
---|
| 722 | |
---|
| 723 | }, |
---|
[2] | 724 | }; |
---|
[56] | 725 | #endif |
---|
[2] | 726 | // initial probability for prediction mode |
---|
[56] | 727 | static const UChar |
---|
| 728 | INIT_PRED_MODE[3][NUM_PRED_MODE_CTX] = |
---|
[2] | 729 | { |
---|
| 730 | { |
---|
[56] | 731 | CNU, |
---|
| 732 | |
---|
[2] | 733 | }, |
---|
| 734 | { |
---|
[56] | 735 | 114, |
---|
| 736 | |
---|
[2] | 737 | }, |
---|
| 738 | { |
---|
[56] | 739 | 98, |
---|
| 740 | |
---|
| 741 | }, |
---|
[2] | 742 | }; |
---|
| 743 | |
---|
| 744 | // initial probability for intra direction of luma |
---|
[56] | 745 | static const UChar |
---|
| 746 | INIT_INTRA_PRED_MODE[3][NUM_ADI_CTX] = |
---|
[2] | 747 | { |
---|
| 748 | { |
---|
[56] | 749 | 167, |
---|
| 750 | |
---|
[2] | 751 | }, |
---|
| 752 | { |
---|
[56] | 753 | 119, |
---|
| 754 | |
---|
[2] | 755 | }, |
---|
| 756 | { |
---|
[56] | 757 | 150, |
---|
| 758 | |
---|
| 759 | }, |
---|
[2] | 760 | }; |
---|
[56] | 761 | |
---|
| 762 | // initial probability for intra direction of chroma |
---|
| 763 | static const UChar |
---|
| 764 | INIT_CHROMA_PRED_MODE[3][NUM_CHROMA_PRED_CTX] = |
---|
[2] | 765 | { |
---|
| 766 | { |
---|
[56] | 767 | 53, 103, |
---|
| 768 | |
---|
[2] | 769 | }, |
---|
| 770 | { |
---|
[56] | 771 | 85, 87, |
---|
| 772 | |
---|
[2] | 773 | }, |
---|
| 774 | { |
---|
[56] | 775 | 101, 87, |
---|
| 776 | |
---|
| 777 | }, |
---|
[2] | 778 | }; |
---|
| 779 | |
---|
[56] | 780 | // initial probability for temporal direction |
---|
| 781 | static const UChar |
---|
| 782 | INIT_INTER_DIR[3][NUM_INTER_DIR_CTX] = |
---|
[2] | 783 | { |
---|
| 784 | { |
---|
[56] | 785 | CNU, CNU, CNU, CNU, |
---|
| 786 | |
---|
[2] | 787 | }, |
---|
| 788 | { |
---|
[56] | 789 | CNU, CNU, CNU, CNU, |
---|
| 790 | |
---|
[2] | 791 | }, |
---|
| 792 | { |
---|
[56] | 793 | 41, 39, 38, 36, |
---|
| 794 | |
---|
| 795 | }, |
---|
[2] | 796 | }; |
---|
| 797 | |
---|
[56] | 798 | // initial probability for motion vector difference |
---|
| 799 | static const UChar |
---|
| 800 | INIT_MVD[3][NUM_MV_RES_CTX] = |
---|
[2] | 801 | { |
---|
| 802 | { |
---|
[56] | 803 | CNU, CNU, |
---|
| 804 | |
---|
[2] | 805 | }, |
---|
| 806 | { |
---|
[56] | 807 | 120, 166, |
---|
| 808 | |
---|
[2] | 809 | }, |
---|
| 810 | { |
---|
[56] | 811 | 135, 166, |
---|
| 812 | |
---|
| 813 | }, |
---|
| 814 | }; |
---|
| 815 | |
---|
| 816 | // initial probability for reference frame index |
---|
| 817 | static const UChar |
---|
| 818 | INIT_REF_PIC[3][NUM_REF_NO_CTX] = |
---|
| 819 | { |
---|
[2] | 820 | { |
---|
[56] | 821 | CNU, CNU, CNU, CNU, |
---|
| 822 | |
---|
[2] | 823 | }, |
---|
| 824 | { |
---|
[56] | 825 | 102, 118, 103, CNU, |
---|
| 826 | |
---|
[2] | 827 | }, |
---|
| 828 | { |
---|
[56] | 829 | 118, 118, 134, CNU, |
---|
| 830 | |
---|
| 831 | }, |
---|
[2] | 832 | }; |
---|
| 833 | |
---|
[56] | 834 | // initial probability for dQP |
---|
| 835 | static const UChar |
---|
| 836 | INIT_DQP[3][NUM_DELTA_QP_CTX] = |
---|
[2] | 837 | { |
---|
| 838 | { |
---|
[56] | 839 | CNU, CNU, CNU, |
---|
| 840 | |
---|
[2] | 841 | }, |
---|
| 842 | { |
---|
[56] | 843 | CNU, CNU, CNU, |
---|
| 844 | |
---|
[2] | 845 | }, |
---|
| 846 | { |
---|
[56] | 847 | CNU, CNU, CNU, |
---|
| 848 | |
---|
| 849 | }, |
---|
[2] | 850 | }; |
---|
| 851 | |
---|
[56] | 852 | static const UChar |
---|
| 853 | INIT_QT_CBF[3][2*NUM_QT_CBF_CTX] = |
---|
[2] | 854 | { |
---|
| 855 | { |
---|
[56] | 856 | 73, 74, CNU, CNU, CNU, |
---|
| 857 | 55, 86, 133, CNU, CNU, |
---|
| 858 | |
---|
[2] | 859 | }, |
---|
| 860 | { |
---|
[56] | 861 | 102, 89, CNU, CNU, CNU, |
---|
| 862 | 114, 84, 117, CNU, CNU, |
---|
| 863 | |
---|
[2] | 864 | }, |
---|
| 865 | { |
---|
[56] | 866 | 102, 89, CNU, CNU, CNU, |
---|
| 867 | 114, 68, 117, CNU, CNU, |
---|
| 868 | |
---|
| 869 | }, |
---|
[2] | 870 | }; |
---|
| 871 | |
---|
[56] | 872 | static const UChar |
---|
| 873 | INIT_QT_ROOT_CBF[3][NUM_QT_ROOT_CBF_CTX] = |
---|
[2] | 874 | { |
---|
| 875 | { |
---|
[56] | 876 | CNU, |
---|
| 877 | |
---|
[2] | 878 | }, |
---|
| 879 | { |
---|
[56] | 880 | 39, |
---|
| 881 | |
---|
[2] | 882 | }, |
---|
| 883 | { |
---|
[56] | 884 | 39, |
---|
| 885 | |
---|
| 886 | }, |
---|
[2] | 887 | }; |
---|
| 888 | |
---|
[56] | 889 | #if LAST_CTX_REDUCTION |
---|
| 890 | static const UChar |
---|
| 891 | INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = |
---|
[2] | 892 | { |
---|
[56] | 893 | { |
---|
| 894 | 72, 72, 71, 72, 104, 89, 88, 89, 59, 73, 89, 106, 60, 59, 43, |
---|
| 895 | 54, 70, 53, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 896 | }, |
---|
| 897 | { |
---|
| 898 | 57, 72, 55, 72, 57, 72, 88, 73, 73, 72, 103, 73, 89, 73, 57, |
---|
| 899 | 54, 70, 54, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 900 | }, |
---|
| 901 | { |
---|
| 902 | 88, 72, 71, 72, 57, 72, 88, 73, 73, 72, 103, 73, 89, 73, 57, |
---|
| 903 | 54, 70, 69, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 904 | }, |
---|
[2] | 905 | }; |
---|
[56] | 906 | #else |
---|
| 907 | static const UChar |
---|
| 908 | INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = |
---|
[2] | 909 | { |
---|
| 910 | { |
---|
[56] | 911 | 72, 72, 71, 72, 104, 89, 71, 88, 89, 59, 73, 86, 89, 106, 60, 59, 43, 55, |
---|
| 912 | 54, 70, 53, 53, 87, 71, 69, 54, 88, 73, 72, 53, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 913 | |
---|
[2] | 914 | }, |
---|
| 915 | { |
---|
[56] | 916 | 57, 72, 71, 72, 57, 72, 102, 88, 73, 73, 72, 102, 103, 73, 89, 73, 57, 87, |
---|
| 917 | 54, 70, 54, 101, 71, 55, 70, 116, 103, 72, 72, 119, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 918 | |
---|
[2] | 919 | }, |
---|
| 920 | { |
---|
[56] | 921 | 88, 72, 71, 72, 57, 72, 102, 88, 73, 73, 72, 118, 103, 73, 89, 73, 57, 87, |
---|
| 922 | 54, 70, 69, 85, 71, 55, 70, 85, 103, 72, 72, 119, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 923 | |
---|
| 924 | }, |
---|
[2] | 925 | }; |
---|
[56] | 926 | #endif |
---|
[2] | 927 | |
---|
[56] | 928 | static const UChar |
---|
| 929 | INIT_SIG_CG_FLAG[3][2 * NUM_SIG_CG_FLAG_CTX] = |
---|
[2] | 930 | { |
---|
| 931 | { |
---|
[56] | 932 | 83, 122, |
---|
| 933 | 98, 121, |
---|
| 934 | |
---|
[2] | 935 | }, |
---|
| 936 | { |
---|
[56] | 937 | 99, 120, |
---|
| 938 | 67, 119, |
---|
| 939 | |
---|
[2] | 940 | }, |
---|
| 941 | { |
---|
[56] | 942 | 99, 120, |
---|
| 943 | 67, 119, |
---|
| 944 | |
---|
| 945 | }, |
---|
[2] | 946 | }; |
---|
| 947 | |
---|
[56] | 948 | static const UChar |
---|
| 949 | INIT_SIG_FLAG[3][NUM_SIG_FLAG_CTX] = |
---|
[2] | 950 | { |
---|
| 951 | { |
---|
[56] | 952 | 74, 73, 88, 72, 72, 55, 71, 54, 71, 88, 103, 71, 53, 87, 134, 86, 84, 70, 68, 89, 90, 84, 88, 74, 130, 118, 88, |
---|
| 953 | 120, 87, 149, 70, 52, 118, 133, 116, 114, 129, 132, 162, 115, 51, 115, 66, 120, 74, 115, 87, 89, |
---|
[2] | 954 | }, |
---|
| 955 | { |
---|
[56] | 956 | 152, 119, 103, 118, 87, 70, 70, 53, 118, 134, 118, 101, 68, 85, 101, 116, 100, 68, 67, 136, 168, 147, 150, 120, 115, 118, 119, |
---|
| 957 | 136, 102, 70, 53, 67, 117, 102, 117, 115, 114, 84, 115, 99, 100, 83, 114, 152, 168, 131, 150, 120, |
---|
[2] | 958 | }, |
---|
| 959 | { |
---|
[56] | 960 | 152, 119, 103, 118, 87, 70, 70, 53, 71, 103, 118, 101, 68, 85, 101, 116, 116, 68, 67, 152, 168, 147, 150, 120, 115, 118, 119, |
---|
| 961 | 136, 102, 86, 84, 67, 117, 102, 117, 115, 99, 100, 115, 99, 100, 83, 114, 152, 152, 131, 150, 120, |
---|
| 962 | }, |
---|
[2] | 963 | }; |
---|
| 964 | |
---|
[56] | 965 | #if LEVEL_CTX_LUMA_RED |
---|
| 966 | static const UChar |
---|
| 967 | INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = |
---|
[2] | 968 | { |
---|
| 969 | { |
---|
[56] | 970 | 104, 68, 116, 86, 104, 132, 86, 87, 102, 66, 114, 68, 87, 84, 100, 101, |
---|
| 971 | 104, 130, 147, 149, 104, 196, 100, 165, |
---|
[2] | 972 | }, |
---|
| 973 | { |
---|
[56] | 974 | 119, 179, 179, 164, 119, 85, 117, 149, 133, 98, 114, 115, 118, 99, 115, 116, |
---|
| 975 | 135, 146, 147, 164, 119, 148, 116, 133, |
---|
[2] | 976 | }, |
---|
| 977 | { |
---|
[56] | 978 | 119, 179, 148, 164, 119, 85, 117, 149, 133, 98, 114, 115, 118, 99, 115, 100, |
---|
| 979 | 135, 177, 147, 164, 119, 132, 148, 149, |
---|
| 980 | }, |
---|
[2] | 981 | }; |
---|
| 982 | |
---|
[56] | 983 | #if RESTRICT_GR1GR2FLAG_NUMBER |
---|
| 984 | static const UChar |
---|
| 985 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
[2] | 986 | { |
---|
| 987 | { |
---|
[56] | 988 | 86, 102, 115, 117, 101, 101, |
---|
[2] | 989 | }, |
---|
| 990 | { |
---|
[56] | 991 | 84, 117, 83, 100, 84, 117, |
---|
[2] | 992 | }, |
---|
| 993 | { |
---|
[56] | 994 | 84, 117, 83, 84, 84, 117, |
---|
| 995 | }, |
---|
[2] | 996 | }; |
---|
[56] | 997 | #else |
---|
| 998 | static const UChar |
---|
| 999 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 1000 | { |
---|
| 1001 | { |
---|
| 1002 | 86, 103, 73, 102, 103, 73, 115, 117, 103, 117, 118, 103, |
---|
| 1003 | 101, 103, 104, 101, 167, 121, |
---|
| 1004 | }, |
---|
| 1005 | { |
---|
| 1006 | 84, 102, 88, 117, 118, 104, 83, 116, 118, 100, 117, 87, |
---|
| 1007 | 84, 118, 120, 117, 150, 120, |
---|
| 1008 | }, |
---|
| 1009 | { |
---|
| 1010 | 84, 102, 88, 117, 118, 104, 83, 116, 118, 84, 117, 87, |
---|
| 1011 | 84, 118, 120, 117, 150, 120, |
---|
| 1012 | }, |
---|
| 1013 | }; |
---|
[2] | 1014 | #endif |
---|
[56] | 1015 | #else |
---|
| 1016 | static const UChar |
---|
| 1017 | INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = |
---|
| 1018 | { |
---|
| 1019 | { |
---|
| 1020 | 104, 68, 116, 86, 104, 132, 86, 87, 105, 134, 87, 103, 102, 66, 114, 68, 87, 84, 100, 101, 72, 69, 101, 86, |
---|
| 1021 | 104, 130, 147, 149, 104, 196, 100, 165, |
---|
| 1022 | }, |
---|
| 1023 | { |
---|
| 1024 | 119, 179, 179, 164, 119, 85, 117, 149, 136, 103, 103, 103, 133, 98, 114, 115, 118, 99, 115, 116, 87, 100, 85, 117, |
---|
| 1025 | 135, 146, 147, 164, 119, 148, 116, 133, |
---|
| 1026 | }, |
---|
| 1027 | { |
---|
| 1028 | 119, 179, 148, 164, 119, 85, 117, 149, 136, 87, 103, 103, 133, 98, 114, 115, 118, 99, 115, 100, 87, 84, 85, 85, |
---|
| 1029 | 135, 177, 147, 164, 119, 132, 148, 149, |
---|
| 1030 | }, |
---|
| 1031 | }; |
---|
[2] | 1032 | |
---|
[56] | 1033 | #if RESTRICT_GR1GR2FLAG_NUMBER |
---|
| 1034 | static const UChar |
---|
| 1035 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
[2] | 1036 | { |
---|
| 1037 | { |
---|
[56] | 1038 | 86, 102, 103, 115, 117, 102, 101, 101, |
---|
[2] | 1039 | }, |
---|
| 1040 | { |
---|
[56] | 1041 | 84, 117, 103, 83, 100, 85, 84, 117, |
---|
[2] | 1042 | }, |
---|
| 1043 | { |
---|
[56] | 1044 | 84, 117, 87, 83, 84, 69, 84, 117, |
---|
| 1045 | }, |
---|
[2] | 1046 | }; |
---|
| 1047 | #else |
---|
[56] | 1048 | static const UChar |
---|
| 1049 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
[2] | 1050 | { |
---|
| 1051 | { |
---|
[56] | 1052 | 86, 103, 73, 102, 103, 73, 103, 88, 89, 115, 117, 103, 117, 118, 103, 102, 103, 72, |
---|
| 1053 | 101, 103, 104, 101, 167, 121, |
---|
[2] | 1054 | }, |
---|
| 1055 | { |
---|
[56] | 1056 | 84, 102, 88, 117, 118, 104, 103, 119, 136, 83, 116, 118, 100, 117, 87, 85, 86, 103, |
---|
| 1057 | 84, 118, 120, 117, 150, 120, |
---|
[2] | 1058 | }, |
---|
| 1059 | { |
---|
[56] | 1060 | 84, 102, 88, 117, 118, 104, 87, 119, 136, 83, 116, 118, 84, 117, 87, 69, 86, 87, |
---|
| 1061 | 84, 118, 120, 117, 150, 120, |
---|
| 1062 | }, |
---|
[2] | 1063 | }; |
---|
| 1064 | #endif |
---|
[56] | 1065 | #endif |
---|
| 1066 | // initial probability for motion vector predictor index |
---|
| 1067 | static const UChar |
---|
| 1068 | INIT_MVP_IDX[3][NUM_MVP_IDX_CTX] = |
---|
[2] | 1069 | { |
---|
| 1070 | { |
---|
[56] | 1071 | CNU, CNU, |
---|
| 1072 | |
---|
[2] | 1073 | }, |
---|
| 1074 | { |
---|
[56] | 1075 | 134, CNU, |
---|
| 1076 | |
---|
[2] | 1077 | }, |
---|
| 1078 | { |
---|
[56] | 1079 | 134, CNU, |
---|
| 1080 | |
---|
| 1081 | }, |
---|
[2] | 1082 | }; |
---|
| 1083 | |
---|
[56] | 1084 | // initial probability for ALF flag |
---|
| 1085 | static const UChar |
---|
| 1086 | INIT_ALF_FLAG[3][NUM_ALF_FLAG_CTX] = |
---|
[2] | 1087 | { |
---|
| 1088 | { |
---|
[56] | 1089 | 118, |
---|
| 1090 | |
---|
[2] | 1091 | }, |
---|
| 1092 | { |
---|
[56] | 1093 | 102, |
---|
| 1094 | |
---|
[2] | 1095 | }, |
---|
| 1096 | { |
---|
[56] | 1097 | 102, |
---|
| 1098 | |
---|
| 1099 | }, |
---|
[2] | 1100 | }; |
---|
| 1101 | |
---|
[56] | 1102 | // initial probability for ALF side information (unsigned) |
---|
| 1103 | static const UChar |
---|
| 1104 | INIT_ALF_UVLC[3][NUM_ALF_UVLC_CTX] = |
---|
[2] | 1105 | { |
---|
| 1106 | { |
---|
[56] | 1107 | 120, 119, |
---|
| 1108 | |
---|
[2] | 1109 | }, |
---|
| 1110 | { |
---|
[56] | 1111 | 119, 119, |
---|
| 1112 | |
---|
[2] | 1113 | }, |
---|
| 1114 | { |
---|
[56] | 1115 | 119, 119, |
---|
| 1116 | |
---|
| 1117 | }, |
---|
[2] | 1118 | }; |
---|
| 1119 | |
---|
[56] | 1120 | // initial probability for ALF side information (signed) |
---|
| 1121 | static const UChar |
---|
| 1122 | INIT_ALF_SVLC[3][NUM_ALF_SVLC_CTX] = |
---|
[2] | 1123 | { |
---|
| 1124 | { |
---|
[56] | 1125 | 139, 119, 124, |
---|
| 1126 | |
---|
[2] | 1127 | }, |
---|
| 1128 | { |
---|
[56] | 1129 | 90, 119, 140, |
---|
| 1130 | |
---|
[2] | 1131 | }, |
---|
| 1132 | { |
---|
[56] | 1133 | 90, 119, 124, |
---|
| 1134 | |
---|
| 1135 | }, |
---|
[2] | 1136 | }; |
---|
| 1137 | |
---|
[56] | 1138 | // initial probability for SAO flag |
---|
| 1139 | static const UChar |
---|
| 1140 | INIT_SAO_FLAG[3][NUM_SAO_FLAG_CTX] = |
---|
[2] | 1141 | { |
---|
| 1142 | { |
---|
[56] | 1143 | 119, |
---|
| 1144 | |
---|
[2] | 1145 | }, |
---|
| 1146 | { |
---|
[56] | 1147 | 102, |
---|
| 1148 | |
---|
[2] | 1149 | }, |
---|
| 1150 | { |
---|
[56] | 1151 | 102, |
---|
| 1152 | |
---|
| 1153 | }, |
---|
[2] | 1154 | }; |
---|
| 1155 | |
---|
[56] | 1156 | // initial probability for SAO side information (unsigned) |
---|
| 1157 | static const UChar |
---|
| 1158 | INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] = |
---|
[2] | 1159 | { |
---|
| 1160 | { |
---|
[56] | 1161 | 61, 104, |
---|
| 1162 | |
---|
[2] | 1163 | }, |
---|
| 1164 | { |
---|
[56] | 1165 | 168, 120, |
---|
| 1166 | |
---|
[2] | 1167 | }, |
---|
| 1168 | { |
---|
[56] | 1169 | 184, 120, |
---|
| 1170 | |
---|
| 1171 | }, |
---|
[2] | 1172 | }; |
---|
| 1173 | |
---|
[56] | 1174 | // initial probability for SAO side information (signed) |
---|
| 1175 | static const UChar |
---|
| 1176 | INIT_SAO_SVLC[3][NUM_SAO_SVLC_CTX] = |
---|
[2] | 1177 | { |
---|
| 1178 | { |
---|
[56] | 1179 | 171, 119, 199, |
---|
| 1180 | |
---|
[2] | 1181 | }, |
---|
| 1182 | { |
---|
[56] | 1183 | 169, 119, 151, |
---|
| 1184 | |
---|
[2] | 1185 | }, |
---|
| 1186 | { |
---|
[56] | 1187 | 169, 119, 151, |
---|
| 1188 | |
---|
| 1189 | }, |
---|
[2] | 1190 | }; |
---|
[56] | 1191 | |
---|
| 1192 | #if SAO_UNIT_INTERLEAVING |
---|
| 1193 | static const UChar |
---|
| 1194 | INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] = |
---|
[2] | 1195 | { |
---|
| 1196 | { |
---|
[56] | 1197 | 118, 118, 118, |
---|
[2] | 1198 | }, |
---|
| 1199 | { |
---|
[56] | 1200 | 102, 102, 102, |
---|
| 1201 | }, |
---|
| 1202 | { |
---|
| 1203 | 102, 102, 102, |
---|
| 1204 | }, |
---|
| 1205 | }; |
---|
| 1206 | |
---|
| 1207 | static const UChar |
---|
| 1208 | INIT_SAO_MERGE_UP_FLAG[3][NUM_SAO_MERGE_UP_FLAG_CTX] = |
---|
| 1209 | { |
---|
| 1210 | { |
---|
| 1211 | 109, |
---|
[2] | 1212 | }, |
---|
| 1213 | { |
---|
[56] | 1214 | 102, |
---|
| 1215 | }, |
---|
| 1216 | { |
---|
| 1217 | 102, |
---|
| 1218 | }, |
---|
[2] | 1219 | }; |
---|
[56] | 1220 | static const UChar |
---|
| 1221 | INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] = |
---|
[2] | 1222 | { |
---|
| 1223 | { |
---|
[56] | 1224 | 64, 104 |
---|
[2] | 1225 | }, |
---|
| 1226 | { |
---|
[56] | 1227 | 168, 120 |
---|
[2] | 1228 | }, |
---|
| 1229 | { |
---|
[56] | 1230 | 184, 120 |
---|
| 1231 | }, |
---|
[2] | 1232 | }; |
---|
| 1233 | static const Short |
---|
[56] | 1234 | INIT_SAO_RUN[3][NUM_SAO_RUN_CTX][2] = |
---|
[2] | 1235 | { |
---|
| 1236 | { |
---|
| 1237 | { 11, 57 }, { -1, 62 }, { 0, 64 } |
---|
| 1238 | }, |
---|
| 1239 | { |
---|
| 1240 | { 6, 66 }, { -1, 64 }, { 0, 64 } |
---|
| 1241 | }, |
---|
| 1242 | { |
---|
| 1243 | { 1, 73 }, { 2, 61 }, { 0, 64 } |
---|
| 1244 | } |
---|
| 1245 | }; |
---|
| 1246 | #endif |
---|
| 1247 | |
---|
[56] | 1248 | static const UChar |
---|
| 1249 | INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] = |
---|
| 1250 | { |
---|
| 1251 | { |
---|
| 1252 | CNU, 162, 148, 100, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 1253 | |
---|
| 1254 | }, |
---|
| 1255 | { |
---|
| 1256 | CNU, 71, 86, 55, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 1257 | |
---|
| 1258 | }, |
---|
| 1259 | { |
---|
| 1260 | CNU, 102, 86, 86, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 1261 | |
---|
| 1262 | }, |
---|
| 1263 | }; |
---|
| 1264 | #endif |
---|
| 1265 | |
---|
| 1266 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
[225] | 1267 | #if FIX_DMM_CTX_INIT_C0034 |
---|
| 1268 | static const UChar |
---|
| 1269 | #else |
---|
[2] | 1270 | static const Short |
---|
[225] | 1271 | #endif |
---|
[56] | 1272 | INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] = |
---|
[2] | 1273 | { |
---|
| 1274 | { |
---|
[56] | 1275 | CNU |
---|
[2] | 1276 | }, |
---|
| 1277 | { |
---|
[56] | 1278 | CNU |
---|
[2] | 1279 | }, |
---|
| 1280 | { |
---|
[56] | 1281 | CNU |
---|
[2] | 1282 | } |
---|
| 1283 | }; |
---|
| 1284 | |
---|
[225] | 1285 | #if FIX_DMM_CTX_INIT_C0034 |
---|
| 1286 | static const UChar |
---|
| 1287 | #else |
---|
[2] | 1288 | static const Short |
---|
[225] | 1289 | #endif |
---|
[56] | 1290 | INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] = |
---|
[2] | 1291 | { |
---|
[56] | 1292 | { |
---|
| 1293 | CNU |
---|
| 1294 | }, |
---|
| 1295 | { |
---|
| 1296 | CNU |
---|
| 1297 | }, |
---|
| 1298 | { |
---|
| 1299 | CNU |
---|
| 1300 | } |
---|
[2] | 1301 | }; |
---|
| 1302 | |
---|
[225] | 1303 | #if FIX_DMM_CTX_INIT_C0034 |
---|
| 1304 | static const UChar |
---|
| 1305 | #else |
---|
[2] | 1306 | static const Short |
---|
[225] | 1307 | #endif |
---|
[56] | 1308 | INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] = |
---|
[2] | 1309 | { |
---|
[251] | 1310 | #if LGE_DMM3_SIMP_C0044 |
---|
[2] | 1311 | { |
---|
[251] | 1312 | CNU, CNU, CNU, CNU |
---|
| 1313 | }, |
---|
| 1314 | { |
---|
| 1315 | CNU, CNU, CNU, CNU |
---|
| 1316 | }, |
---|
| 1317 | { |
---|
| 1318 | CNU, CNU, CNU, CNU |
---|
| 1319 | } |
---|
| 1320 | #else |
---|
| 1321 | { |
---|
[56] | 1322 | CNU, CNU, CNU |
---|
[2] | 1323 | }, |
---|
| 1324 | { |
---|
[56] | 1325 | CNU, CNU, CNU |
---|
[2] | 1326 | }, |
---|
| 1327 | { |
---|
[56] | 1328 | CNU, CNU, CNU |
---|
[2] | 1329 | } |
---|
[251] | 1330 | #endif |
---|
[2] | 1331 | }; |
---|
[100] | 1332 | |
---|
[189] | 1333 | #if LGE_EDGE_INTRA_A0070 |
---|
[100] | 1334 | static const Short |
---|
| 1335 | INIT_EDGE_INTRA[3][NUM_EDGE_INTRA_CTX] = |
---|
| 1336 | { |
---|
| 1337 | { |
---|
| 1338 | CNU |
---|
| 1339 | }, |
---|
| 1340 | { |
---|
| 1341 | CNU |
---|
| 1342 | }, |
---|
| 1343 | { |
---|
| 1344 | CNU |
---|
| 1345 | } |
---|
| 1346 | }; |
---|
| 1347 | |
---|
| 1348 | #if LGE_EDGE_INTRA_DELTA_DC |
---|
| 1349 | static const Short |
---|
| 1350 | INIT_EDGE_INTRA_DELTA_DC[3][NUM_EDGE_INTRA_DELTA_DC_CTX] = |
---|
| 1351 | { |
---|
| 1352 | { |
---|
| 1353 | CNU, CNU |
---|
| 1354 | }, |
---|
| 1355 | { |
---|
| 1356 | CNU, CNU |
---|
| 1357 | }, |
---|
| 1358 | { |
---|
| 1359 | CNU, CNU |
---|
| 1360 | } |
---|
| 1361 | }; |
---|
[2] | 1362 | #endif |
---|
[100] | 1363 | #endif |
---|
[56] | 1364 | |
---|
[100] | 1365 | #endif |
---|
| 1366 | |
---|
[189] | 1367 | #if RWTH_SDC_DLT_B0036 |
---|
| 1368 | static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] = |
---|
| 1369 | { |
---|
| 1370 | { |
---|
| 1371 | { 0, 64 }, { 0, 64 }, { 0, 64 } |
---|
| 1372 | }, |
---|
| 1373 | { |
---|
| 1374 | { 0, 64 }, { 0, 64 }, { 0, 64 } |
---|
| 1375 | }, |
---|
| 1376 | { |
---|
| 1377 | { 0, 64 }, { 0, 64 }, { 0, 64 } |
---|
| 1378 | } |
---|
| 1379 | }; |
---|
| 1380 | |
---|
| 1381 | static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] = |
---|
| 1382 | { |
---|
| 1383 | { |
---|
| 1384 | { -5, 35 }, |
---|
| 1385 | { -0, 56 }, |
---|
| 1386 | { -0, 56 } |
---|
| 1387 | |
---|
| 1388 | }, |
---|
| 1389 | { |
---|
| 1390 | { -5, 35 }, |
---|
| 1391 | { -0, 56 }, |
---|
| 1392 | { -0, 56 } |
---|
| 1393 | }, |
---|
| 1394 | { |
---|
| 1395 | { -5, 35 }, |
---|
| 1396 | { -0, 56 }, |
---|
| 1397 | { -0, 56 } |
---|
| 1398 | } |
---|
| 1399 | }; |
---|
| 1400 | |
---|
| 1401 | static const Short INIT_SDC_SIGN_FLAG[3][3*SDC_NUM_SIGN_FLAG_CTX][2] = |
---|
| 1402 | { |
---|
| 1403 | { |
---|
| 1404 | { -1, 56 }, |
---|
| 1405 | { -4, 55 }, |
---|
| 1406 | { -4, 55 } |
---|
| 1407 | }, |
---|
| 1408 | { |
---|
| 1409 | { -1, 56 }, |
---|
| 1410 | { -4, 55 }, |
---|
| 1411 | { -4, 55 } |
---|
| 1412 | }, |
---|
| 1413 | { |
---|
| 1414 | { -1, 56 }, |
---|
| 1415 | { -4, 55 }, |
---|
| 1416 | { -4, 55 } |
---|
| 1417 | } |
---|
| 1418 | }; |
---|
| 1419 | |
---|
| 1420 | static const Short INIT_SDC_RESIDUAL[3][3*SDC_NUM_RESIDUAL_CTX][2] = |
---|
| 1421 | { |
---|
| 1422 | { |
---|
| 1423 | { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, |
---|
| 1424 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, |
---|
| 1425 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } |
---|
| 1426 | }, |
---|
| 1427 | { |
---|
| 1428 | { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, |
---|
| 1429 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, |
---|
| 1430 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } |
---|
| 1431 | }, |
---|
| 1432 | { |
---|
| 1433 | { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, |
---|
| 1434 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, |
---|
| 1435 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } |
---|
| 1436 | } |
---|
| 1437 | }; |
---|
| 1438 | |
---|
| 1439 | static const Short INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX][2] = |
---|
| 1440 | { |
---|
| 1441 | { |
---|
| 1442 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 1443 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 1444 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } |
---|
| 1445 | }, |
---|
| 1446 | { |
---|
| 1447 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 1448 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 1449 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } |
---|
| 1450 | }, |
---|
| 1451 | { |
---|
| 1452 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 1453 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 1454 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } |
---|
| 1455 | } |
---|
| 1456 | }; |
---|
| 1457 | #endif |
---|
| 1458 | |
---|
[56] | 1459 | //! \} |
---|
| 1460 | |
---|
[2] | 1461 | #endif |
---|
| 1462 | |
---|