[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 | #define NUM_MERGE_IDX_EXT_CTX 1 ///< number of context models for merge index of merge extended |
---|
[2] | 60 | |
---|
[296] | 61 | #if H3D_IVRP |
---|
[56] | 62 | #define NUM_RES_PRED_FLAG_CTX 4 ///< number of context for residual prediction flag |
---|
| 63 | #endif |
---|
| 64 | |
---|
| 65 | #define NUM_ALF_CTRL_FLAG_CTX 1 ///< number of context models for ALF control flag |
---|
| 66 | #define NUM_PART_SIZE_CTX 4 ///< number of context models for partition size |
---|
| 67 | #define NUM_CU_AMP_CTX 1 ///< number of context models for partition size (AMP) |
---|
| 68 | #define NUM_PRED_MODE_CTX 1 ///< number of context models for prediction mode |
---|
[2] | 69 | |
---|
[56] | 70 | #define NUM_ADI_CTX 1 ///< number of context models for intra prediction |
---|
| 71 | |
---|
| 72 | #define NUM_CHROMA_PRED_CTX 2 ///< number of context models for intra prediction (chroma) |
---|
[2] | 73 | #define NUM_INTER_DIR_CTX 4 ///< number of context models for inter prediction direction |
---|
[56] | 74 | #define NUM_MV_RES_CTX 2 ///< number of context models for motion vector difference |
---|
[2] | 75 | |
---|
[56] | 76 | #define NUM_REF_NO_CTX 4 ///< number of context models for reference index |
---|
[2] | 77 | #define NUM_TRANS_SUBDIV_FLAG_CTX 10 ///< number of context models for transform subdivision flags |
---|
[56] | 78 | #define NUM_QT_CBF_CTX 5 ///< number of context models for QT CBF |
---|
| 79 | #define NUM_QT_ROOT_CBF_CTX 1 ///< number of context models for QT ROOT CBF |
---|
| 80 | #define NUM_DELTA_QP_CTX 3 ///< number of context models for dQP |
---|
[2] | 81 | |
---|
[56] | 82 | #define NUM_SIG_CG_FLAG_CTX 2 ///< number of context models for MULTI_LEVEL_SIGNIFICANCE |
---|
| 83 | |
---|
| 84 | #define NUM_SIG_FLAG_CTX 48 ///< number of context models for sig flag |
---|
| 85 | |
---|
| 86 | #define NUM_SIG_FLAG_CTX_LUMA 27 ///< number of context models for luma sig flag |
---|
| 87 | #define NUM_SIG_FLAG_CTX_CHROMA 21 ///< number of context models for chroma sig flag |
---|
| 88 | #define NUM_CTX_LAST_FLAG_XY 15 ///< number of context models for last coefficient position |
---|
[2] | 89 | |
---|
[56] | 90 | #define NUM_ONE_FLAG_CTX 24 ///< number of context models for greater than 1 flag |
---|
| 91 | #define NUM_ONE_FLAG_CTX_LUMA 16 ///< number of context models for greater than 1 flag of luma |
---|
| 92 | #define NUM_ONE_FLAG_CTX_CHROMA 8 ///< number of context models for greater than 1 flag of chroma |
---|
| 93 | #define NUM_ABS_FLAG_CTX 6 ///< number of context models for greater than 2 flag |
---|
| 94 | #define NUM_ABS_FLAG_CTX_LUMA 4 ///< number of context models for greater than 2 flag of luma |
---|
| 95 | #define NUM_ABS_FLAG_CTX_CHROMA 2 ///< number of context models for greater than 2 flag of chroma |
---|
| 96 | |
---|
[2] | 97 | #define NUM_MVP_IDX_CTX 2 ///< number of context models for MVP index |
---|
| 98 | |
---|
| 99 | #define NUM_ALF_FLAG_CTX 1 ///< number of context models for ALF flag |
---|
| 100 | #define NUM_ALF_UVLC_CTX 2 ///< number of context models for ALF UVLC (filter length) |
---|
| 101 | #define NUM_ALF_SVLC_CTX 3 ///< number of context models for ALF SVLC (filter coeff.) |
---|
| 102 | |
---|
[56] | 103 | #define NUM_SAO_FLAG_CTX 1 ///< number of context models for SAO flag |
---|
| 104 | #define NUM_SAO_UVLC_CTX 2 ///< number of context models for SAO UVLC |
---|
| 105 | #define NUM_SAO_SVLC_CTX 3 ///< number of context models for SAO SVLC |
---|
| 106 | #define NUM_SAO_RUN_CTX 3 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 107 | #define NUM_SAO_MERGE_LEFT_FLAG_CTX 3 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 108 | #define NUM_SAO_MERGE_UP_FLAG_CTX 1 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 109 | #define NUM_SAO_TYPE_IDX_CTX 2 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 110 | #define CNU 154 ///< dummy initialization value for unused context models 'Context model Not Used' |
---|
[2] | 111 | |
---|
[5] | 112 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
[56] | 113 | #define NUM_DMM_FLAG_CTX 1 ///< number of context models for DMM flag |
---|
| 114 | #define NUM_DMM_MODE_CTX 1 ///< number of context models for DMM mode |
---|
[296] | 115 | #if LGE_DMM3_SIMP_C0044 |
---|
| 116 | #define NUM_DMM_DATA_CTX 4 ///< number of context models for DMM data |
---|
| 117 | #else |
---|
[56] | 118 | #define NUM_DMM_DATA_CTX 3 ///< number of context models for DMM data |
---|
[2] | 119 | #endif |
---|
[296] | 120 | #endif |
---|
[2] | 121 | |
---|
[189] | 122 | #if LGE_EDGE_INTRA_A0070 |
---|
[100] | 123 | #define NUM_EDGE_INTRA_CTX 1 |
---|
| 124 | #if LGE_EDGE_INTRA_DELTA_DC |
---|
| 125 | #define NUM_EDGE_INTRA_DELTA_DC_CTX 2 // one for Delta_DC flag, another for Delta_DC value |
---|
| 126 | #endif |
---|
| 127 | #endif |
---|
| 128 | |
---|
[189] | 129 | #if RWTH_SDC_DLT_B0036 |
---|
| 130 | #define SDC_NUM_FLAG_CTX 3 |
---|
| 131 | #define SDC_NUM_RESIDUAL_FLAG_CTX 1 |
---|
| 132 | #define SDC_NUM_SIGN_FLAG_CTX 1 |
---|
| 133 | #define SDC_NUM_RESIDUAL_CTX 10 |
---|
| 134 | |
---|
| 135 | #define SDC_NUM_PRED_MODE_CTX 5 |
---|
| 136 | #endif |
---|
| 137 | |
---|
[2] | 138 | // ==================================================================================================================== |
---|
| 139 | // Tables |
---|
| 140 | // ==================================================================================================================== |
---|
| 141 | |
---|
[56] | 142 | // initial probability for split flag |
---|
| 143 | static const UChar |
---|
| 144 | INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] = |
---|
[2] | 145 | { |
---|
[56] | 146 | { 139, 141, 157, }, |
---|
| 147 | { 107, 139, 126, }, |
---|
| 148 | { 107, 139, 126, }, |
---|
[2] | 149 | }; |
---|
| 150 | |
---|
[56] | 151 | static const UChar |
---|
| 152 | INIT_SKIP_FLAG[3][NUM_SKIP_FLAG_CTX] = |
---|
[2] | 153 | { |
---|
[56] | 154 | { CNU, CNU, CNU, }, |
---|
| 155 | { 197, 185, 201, }, |
---|
| 156 | { 197, 185, 201, }, |
---|
[2] | 157 | }; |
---|
| 158 | |
---|
[189] | 159 | #if LGE_ILLUCOMP_B0045 |
---|
[56] | 160 | static const UChar |
---|
[189] | 161 | INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = |
---|
| 162 | { |
---|
| 163 | { CNU, CNU, CNU, }, |
---|
| 164 | { 197, 185, 201, }, |
---|
| 165 | { 197, 185, 201, }, |
---|
| 166 | }; |
---|
| 167 | #endif |
---|
| 168 | |
---|
| 169 | static const UChar |
---|
[56] | 170 | INIT_ALF_CTRL_FLAG[3][NUM_ALF_CTRL_FLAG_CTX] = |
---|
[2] | 171 | { |
---|
[56] | 172 | { 200, }, |
---|
| 173 | { 139, }, |
---|
| 174 | { 169, }, |
---|
[2] | 175 | }; |
---|
| 176 | |
---|
[56] | 177 | static const UChar |
---|
| 178 | INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = |
---|
| 179 | { |
---|
| 180 | { CNU, }, |
---|
| 181 | { 110, }, |
---|
| 182 | { 154, }, |
---|
| 183 | }; |
---|
[2] | 184 | |
---|
[56] | 185 | static const UChar |
---|
| 186 | INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] = |
---|
[2] | 187 | { |
---|
[56] | 188 | { CNU, }, |
---|
| 189 | { 122, }, |
---|
| 190 | { 137, }, |
---|
| 191 | }; |
---|
| 192 | |
---|
[296] | 193 | #if H3D_IVRP |
---|
[56] | 194 | static const UChar |
---|
| 195 | INIT_RES_PRED_FLAG[3][NUM_RES_PRED_FLAG_CTX] = |
---|
| 196 | { |
---|
| 197 | { CNU, CNU, CNU, CNU }, |
---|
| 198 | { 154, 154, 154, 154 }, |
---|
| 199 | { 154, 154, 154, 154 }, |
---|
| 200 | }; |
---|
| 201 | #endif |
---|
| 202 | |
---|
| 203 | static const UChar |
---|
| 204 | INIT_PART_SIZE[3][NUM_PART_SIZE_CTX] = |
---|
| 205 | { |
---|
| 206 | { 184, CNU, CNU, CNU, }, |
---|
| 207 | { 154, 139, CNU, CNU, }, |
---|
| 208 | { 154, 139, CNU, CNU, }, |
---|
| 209 | }; |
---|
| 210 | |
---|
| 211 | static const UChar |
---|
| 212 | INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] = |
---|
| 213 | { |
---|
| 214 | { CNU, }, |
---|
| 215 | { 154, }, |
---|
| 216 | { 154, }, |
---|
| 217 | }; |
---|
| 218 | |
---|
| 219 | static const UChar |
---|
| 220 | INIT_PRED_MODE[3][NUM_PRED_MODE_CTX] = |
---|
| 221 | { |
---|
| 222 | { CNU, }, |
---|
| 223 | { 149, }, |
---|
| 224 | { 134, }, |
---|
| 225 | }; |
---|
| 226 | |
---|
| 227 | static const UChar |
---|
| 228 | INIT_INTRA_PRED_MODE[3][NUM_ADI_CTX] = |
---|
| 229 | { |
---|
| 230 | { 184, }, |
---|
| 231 | { 154, }, |
---|
| 232 | { 183, }, |
---|
| 233 | }; |
---|
| 234 | |
---|
| 235 | static const UChar |
---|
| 236 | INIT_CHROMA_PRED_MODE[3][NUM_CHROMA_PRED_CTX] = |
---|
| 237 | { |
---|
| 238 | { 63, 139, }, |
---|
| 239 | { 152, 139, }, |
---|
| 240 | { 152, 139, }, |
---|
| 241 | }; |
---|
| 242 | |
---|
| 243 | static const UChar |
---|
| 244 | INIT_INTER_DIR[3][NUM_INTER_DIR_CTX] = |
---|
| 245 | { |
---|
| 246 | { CNU, CNU, CNU, CNU, }, |
---|
| 247 | #if CABAC_INIT_FLAG |
---|
| 248 | { 95, 79, 63, 31, }, |
---|
| 249 | #else |
---|
| 250 | { CNU, CNU, CNU, CNU, }, |
---|
| 251 | #endif |
---|
| 252 | { 95, 79, 63, 31, }, |
---|
| 253 | }; |
---|
| 254 | |
---|
| 255 | static const UChar |
---|
| 256 | INIT_MVD[3][NUM_MV_RES_CTX] = |
---|
| 257 | { |
---|
| 258 | { CNU, CNU, }, |
---|
| 259 | { 140, 198, }, |
---|
| 260 | { 169, 198, }, |
---|
| 261 | }; |
---|
| 262 | |
---|
| 263 | static const UChar |
---|
| 264 | INIT_REF_PIC[3][NUM_REF_NO_CTX] = |
---|
| 265 | { |
---|
| 266 | { CNU, CNU, CNU, CNU, }, |
---|
| 267 | { 153, 153, 139, CNU, }, |
---|
| 268 | { 153, 153, 168, CNU, }, |
---|
| 269 | }; |
---|
| 270 | |
---|
| 271 | static const UChar |
---|
| 272 | INIT_DQP[3][NUM_DELTA_QP_CTX] = |
---|
| 273 | { |
---|
| 274 | { 154, 154, 154, }, |
---|
| 275 | { 154, 154, 154, }, |
---|
| 276 | { 154, 154, 154, }, |
---|
| 277 | }; |
---|
| 278 | |
---|
| 279 | static const UChar |
---|
| 280 | INIT_QT_CBF[3][2*NUM_QT_CBF_CTX] = |
---|
| 281 | { |
---|
| 282 | { 111, 141, CNU, CNU, CNU, 94, 138, 182, CNU, CNU, }, |
---|
| 283 | { 153, 111, CNU, CNU, CNU, 149, 107, 167, CNU, CNU, }, |
---|
| 284 | { 153, 111, CNU, CNU, CNU, 149, 92, 167, CNU, CNU, }, |
---|
| 285 | }; |
---|
| 286 | |
---|
| 287 | static const UChar |
---|
| 288 | INIT_QT_ROOT_CBF[3][NUM_QT_ROOT_CBF_CTX] = |
---|
| 289 | { |
---|
| 290 | { CNU, }, |
---|
| 291 | { 79, }, |
---|
| 292 | { 79, }, |
---|
| 293 | }; |
---|
| 294 | |
---|
| 295 | static const UChar |
---|
| 296 | INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = |
---|
| 297 | { |
---|
| 298 | { 110, 110, 124, 110, 140, 111, 125, 111, 127, 111, 111, 156, 127, 127, 111, |
---|
| 299 | 108, 123, 63, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 300 | }, |
---|
| 301 | { 125, 110, 94, 110, 125, 110, 125, 111, 111, 110, 139, 111, 111, 111, 125, |
---|
| 302 | 108, 123, 108, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 303 | }, |
---|
| 304 | { 125, 110, 124, 110, 125, 110, 125, 111, 111, 110, 139, 111, 111, 111, 125, |
---|
| 305 | 108, 123, 93, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 306 | }, |
---|
| 307 | }; |
---|
| 308 | |
---|
| 309 | static const UChar |
---|
| 310 | INIT_SIG_CG_FLAG[3][2 * NUM_SIG_CG_FLAG_CTX] = |
---|
| 311 | { |
---|
| 312 | { 91, 171, |
---|
| 313 | 134, 141, |
---|
| 314 | }, |
---|
| 315 | { 121, 140, |
---|
| 316 | 61, 154, |
---|
| 317 | }, |
---|
| 318 | { 121, 140, |
---|
| 319 | 61, 154, |
---|
| 320 | }, |
---|
| 321 | }; |
---|
| 322 | |
---|
| 323 | static const UChar |
---|
| 324 | INIT_SIG_FLAG[3][NUM_SIG_FLAG_CTX] = |
---|
| 325 | { |
---|
| 326 | { 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, }, |
---|
| 327 | { 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, }, |
---|
| 328 | { 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, }, |
---|
| 329 | }; |
---|
| 330 | |
---|
| 331 | static const UChar |
---|
| 332 | INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = |
---|
| 333 | { |
---|
| 334 | { 140, 92, 137, 138, 140, 152, 138, 139, 153, 74, 149, 92, 139, 107, 122, 152, 140, 179, 166, 182, 140, 227, 122, 197, }, |
---|
| 335 | { 154, 196, 196, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, 136, 137, 169, 194, 166, 167, 154, 167, 137, 182, }, |
---|
| 336 | { 154, 196, 167, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, 136, 122, 169, 208, 166, 167, 154, 152, 167, 182, }, |
---|
| 337 | }; |
---|
| 338 | |
---|
| 339 | static const UChar |
---|
| 340 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 341 | { |
---|
| 342 | { 138, 153, 136, 167, 152, 152, }, |
---|
| 343 | { 107, 167, 91, 122, 107, 167, }, |
---|
| 344 | { 107, 167, 91, 107, 107, 167, }, |
---|
| 345 | }; |
---|
| 346 | |
---|
| 347 | static const UChar |
---|
| 348 | INIT_MVP_IDX[3][NUM_MVP_IDX_CTX] = |
---|
| 349 | { |
---|
| 350 | { CNU, CNU, }, |
---|
| 351 | { 168, CNU, }, |
---|
| 352 | { 168, CNU, }, |
---|
| 353 | }; |
---|
| 354 | |
---|
| 355 | static const UChar |
---|
| 356 | INIT_ALF_FLAG[3][NUM_ALF_FLAG_CTX] = |
---|
| 357 | { |
---|
| 358 | { 153, }, |
---|
| 359 | { 153, }, |
---|
| 360 | { 153, }, |
---|
| 361 | }; |
---|
| 362 | |
---|
| 363 | static const UChar |
---|
| 364 | INIT_ALF_UVLC[3][NUM_ALF_UVLC_CTX] = |
---|
| 365 | { |
---|
| 366 | { 140, 154, }, |
---|
| 367 | { 154, 154, }, |
---|
| 368 | { 154, 154, }, |
---|
| 369 | }; |
---|
| 370 | |
---|
| 371 | static const UChar |
---|
| 372 | INIT_ALF_SVLC[3][NUM_ALF_SVLC_CTX] = |
---|
| 373 | { |
---|
| 374 | { 187, 154, 159, }, |
---|
| 375 | { 141, 154, 189, }, |
---|
| 376 | { 141, 154, 159, }, |
---|
| 377 | }; |
---|
| 378 | |
---|
| 379 | static const UChar |
---|
| 380 | INIT_SAO_FLAG[3][NUM_SAO_FLAG_CTX] = |
---|
| 381 | { |
---|
| 382 | { 154, }, |
---|
| 383 | { 153, }, |
---|
| 384 | { 153, }, |
---|
| 385 | }; |
---|
| 386 | |
---|
| 387 | static const UChar |
---|
| 388 | INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] = |
---|
| 389 | { |
---|
| 390 | { 143, 140, }, |
---|
| 391 | { 185, 140, }, |
---|
| 392 | { 200, 140, }, |
---|
| 393 | }; |
---|
| 394 | |
---|
| 395 | static const UChar |
---|
| 396 | INIT_SAO_SVLC[3][NUM_SAO_SVLC_CTX] = |
---|
| 397 | { |
---|
| 398 | { 247, 154, 244, }, |
---|
| 399 | { 215, 154, 169, }, |
---|
| 400 | { 215, 154, 169, }, |
---|
| 401 | }; |
---|
| 402 | |
---|
| 403 | static const UChar |
---|
| 404 | INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] = |
---|
| 405 | { |
---|
| 406 | { 153, 153, 153, }, |
---|
| 407 | { 153, 153, 153, }, |
---|
| 408 | { 153, 153, 153, }, |
---|
| 409 | }; |
---|
| 410 | |
---|
| 411 | static const UChar |
---|
| 412 | INIT_SAO_MERGE_UP_FLAG[3][NUM_SAO_MERGE_UP_FLAG_CTX] = |
---|
| 413 | { |
---|
| 414 | { 175, }, |
---|
| 415 | { 153, }, |
---|
| 416 | { 153, }, |
---|
| 417 | }; |
---|
| 418 | |
---|
| 419 | static const UChar |
---|
| 420 | INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] = |
---|
| 421 | { |
---|
| 422 | { 160, 140, }, |
---|
| 423 | { 185, 140, }, |
---|
| 424 | { 200, 140, }, |
---|
| 425 | }; |
---|
| 426 | |
---|
| 427 | static const UChar |
---|
| 428 | INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] = |
---|
| 429 | { |
---|
| 430 | { CNU, 224, 167, 122, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 431 | { CNU, 124, 138, 94, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 432 | { CNU, 153, 138, 138, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 433 | }; |
---|
[2] | 434 | |
---|
[296] | 435 | #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX |
---|
[56] | 436 | static const UChar |
---|
[296] | 437 | INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] = |
---|
[2] | 438 | { |
---|
| 439 | { |
---|
[296] | 440 | CNU |
---|
[2] | 441 | }, |
---|
| 442 | { |
---|
[296] | 443 | CNU |
---|
[2] | 444 | }, |
---|
| 445 | { |
---|
[296] | 446 | CNU |
---|
| 447 | } |
---|
[2] | 448 | }; |
---|
| 449 | |
---|
[56] | 450 | static const UChar |
---|
[296] | 451 | INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] = |
---|
[56] | 452 | { |
---|
| 453 | { |
---|
| 454 | CNU |
---|
[2] | 455 | }, |
---|
| 456 | { |
---|
[56] | 457 | CNU |
---|
[2] | 458 | }, |
---|
| 459 | { |
---|
[56] | 460 | CNU |
---|
[2] | 461 | } |
---|
| 462 | }; |
---|
| 463 | |
---|
[296] | 464 | static const UChar |
---|
| 465 | INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] = |
---|
[2] | 466 | { |
---|
[296] | 467 | #if LGE_DMM3_SIMP_C0044 |
---|
[56] | 468 | { |
---|
[296] | 469 | CNU, CNU, CNU, CNU |
---|
[56] | 470 | }, |
---|
| 471 | { |
---|
[296] | 472 | CNU, CNU, CNU, CNU |
---|
[56] | 473 | }, |
---|
| 474 | { |
---|
[296] | 475 | CNU, CNU, CNU, CNU |
---|
[56] | 476 | } |
---|
[296] | 477 | #else |
---|
[2] | 478 | { |
---|
[56] | 479 | CNU, CNU, CNU |
---|
[2] | 480 | }, |
---|
| 481 | { |
---|
[56] | 482 | CNU, CNU, CNU |
---|
[2] | 483 | }, |
---|
| 484 | { |
---|
[56] | 485 | CNU, CNU, CNU |
---|
[2] | 486 | } |
---|
[296] | 487 | #endif |
---|
[2] | 488 | }; |
---|
[373] | 489 | #if QC_ARP_D0177 |
---|
| 490 | #define NUM_ARPW_CTX 4 ///< number of context models for generalized residual prediction weighting factor |
---|
| 491 | static const UChar |
---|
| 492 | INIT_ARPW[3][NUM_ARPW_CTX] = |
---|
| 493 | { |
---|
| 494 | { 154 , 154 , 154 , 154 }, |
---|
| 495 | { 154 , 154 , 154 , 154 }, |
---|
| 496 | { 154 , 154 , 154 , 154 }, |
---|
| 497 | }; |
---|
| 498 | #endif |
---|
[100] | 499 | |
---|
[189] | 500 | #if LGE_EDGE_INTRA_A0070 |
---|
[100] | 501 | static const Short |
---|
| 502 | INIT_EDGE_INTRA[3][NUM_EDGE_INTRA_CTX] = |
---|
| 503 | { |
---|
| 504 | { |
---|
| 505 | CNU |
---|
| 506 | }, |
---|
| 507 | { |
---|
| 508 | CNU |
---|
| 509 | }, |
---|
| 510 | { |
---|
| 511 | CNU |
---|
| 512 | } |
---|
| 513 | }; |
---|
| 514 | |
---|
| 515 | #if LGE_EDGE_INTRA_DELTA_DC |
---|
| 516 | static const Short |
---|
| 517 | INIT_EDGE_INTRA_DELTA_DC[3][NUM_EDGE_INTRA_DELTA_DC_CTX] = |
---|
| 518 | { |
---|
| 519 | { |
---|
| 520 | CNU, CNU |
---|
| 521 | }, |
---|
| 522 | { |
---|
| 523 | CNU, CNU |
---|
| 524 | }, |
---|
| 525 | { |
---|
| 526 | CNU, CNU |
---|
| 527 | } |
---|
| 528 | }; |
---|
[2] | 529 | #endif |
---|
[100] | 530 | #endif |
---|
[56] | 531 | |
---|
[100] | 532 | #endif |
---|
| 533 | |
---|
[189] | 534 | #if RWTH_SDC_DLT_B0036 |
---|
| 535 | static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] = |
---|
| 536 | { |
---|
| 537 | { |
---|
| 538 | { 0, 64 }, { 0, 64 }, { 0, 64 } |
---|
| 539 | }, |
---|
| 540 | { |
---|
| 541 | { 0, 64 }, { 0, 64 }, { 0, 64 } |
---|
| 542 | }, |
---|
| 543 | { |
---|
| 544 | { 0, 64 }, { 0, 64 }, { 0, 64 } |
---|
| 545 | } |
---|
| 546 | }; |
---|
| 547 | |
---|
| 548 | static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] = |
---|
| 549 | { |
---|
| 550 | { |
---|
| 551 | { -5, 35 }, |
---|
| 552 | { -0, 56 }, |
---|
| 553 | { -0, 56 } |
---|
| 554 | |
---|
| 555 | }, |
---|
| 556 | { |
---|
| 557 | { -5, 35 }, |
---|
| 558 | { -0, 56 }, |
---|
| 559 | { -0, 56 } |
---|
| 560 | }, |
---|
| 561 | { |
---|
| 562 | { -5, 35 }, |
---|
| 563 | { -0, 56 }, |
---|
| 564 | { -0, 56 } |
---|
| 565 | } |
---|
| 566 | }; |
---|
| 567 | |
---|
| 568 | static const Short INIT_SDC_SIGN_FLAG[3][3*SDC_NUM_SIGN_FLAG_CTX][2] = |
---|
| 569 | { |
---|
| 570 | { |
---|
| 571 | { -1, 56 }, |
---|
| 572 | { -4, 55 }, |
---|
| 573 | { -4, 55 } |
---|
| 574 | }, |
---|
| 575 | { |
---|
| 576 | { -1, 56 }, |
---|
| 577 | { -4, 55 }, |
---|
| 578 | { -4, 55 } |
---|
| 579 | }, |
---|
| 580 | { |
---|
| 581 | { -1, 56 }, |
---|
| 582 | { -4, 55 }, |
---|
| 583 | { -4, 55 } |
---|
| 584 | } |
---|
| 585 | }; |
---|
| 586 | |
---|
| 587 | static const Short INIT_SDC_RESIDUAL[3][3*SDC_NUM_RESIDUAL_CTX][2] = |
---|
| 588 | { |
---|
| 589 | { |
---|
| 590 | { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, |
---|
| 591 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, |
---|
| 592 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } |
---|
| 593 | }, |
---|
| 594 | { |
---|
| 595 | { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, |
---|
| 596 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, |
---|
| 597 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } |
---|
| 598 | }, |
---|
| 599 | { |
---|
| 600 | { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, |
---|
| 601 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, |
---|
| 602 | { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } |
---|
| 603 | } |
---|
| 604 | }; |
---|
| 605 | |
---|
| 606 | static const Short INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX][2] = |
---|
| 607 | { |
---|
| 608 | { |
---|
| 609 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 610 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 611 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } |
---|
| 612 | }, |
---|
| 613 | { |
---|
| 614 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 615 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 616 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } |
---|
| 617 | }, |
---|
| 618 | { |
---|
| 619 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 620 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, |
---|
| 621 | { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } |
---|
| 622 | } |
---|
| 623 | }; |
---|
| 624 | #endif |
---|
| 625 | |
---|
[56] | 626 | //! \} |
---|
| 627 | |
---|
[2] | 628 | #endif |
---|
| 629 | |
---|