[2] | 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 |
---|
| 4 | * granted under this license. |
---|
| 5 | * |
---|
| 6 | * Copyright (c) 2010-2012, ITU/ISO/IEC |
---|
| 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. |
---|
| 17 | * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may |
---|
| 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 | */ |
---|
| 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 | |
---|
| 42 | //! \ingroup TLibCommon |
---|
| 43 | //! \{ |
---|
| 44 | |
---|
| 45 | // ==================================================================================================================== |
---|
| 46 | // Constants |
---|
| 47 | // ==================================================================================================================== |
---|
| 48 | |
---|
| 49 | #define MAX_NUM_CTX_MOD 512 ///< maximum number of supported contexts |
---|
| 50 | |
---|
| 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 | |
---|
| 54 | #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended |
---|
| 55 | #define NUM_MERGE_IDX_EXT_CTX 1 ///< number of context models for merge index of merge extended |
---|
| 56 | |
---|
| 57 | #define NUM_ALF_CTRL_FLAG_CTX 1 ///< number of context models for ALF control flag |
---|
| 58 | #define NUM_PART_SIZE_CTX 4 ///< number of context models for partition size |
---|
| 59 | #define NUM_CU_AMP_CTX 1 ///< number of context models for partition size (AMP) |
---|
| 60 | #define NUM_PRED_MODE_CTX 1 ///< number of context models for prediction mode |
---|
| 61 | |
---|
| 62 | #define NUM_ADI_CTX 1 ///< number of context models for intra prediction |
---|
| 63 | |
---|
| 64 | #define NUM_CHROMA_PRED_CTX 2 ///< number of context models for intra prediction (chroma) |
---|
| 65 | #define NUM_INTER_DIR_CTX 5 ///< number of context models for inter prediction direction |
---|
| 66 | #define NUM_MV_RES_CTX 2 ///< number of context models for motion vector difference |
---|
| 67 | |
---|
| 68 | #if REF_IDX_BYPASS |
---|
| 69 | #define NUM_REF_NO_CTX 2 ///< number of context models for reference index |
---|
| 70 | #else |
---|
| 71 | #define NUM_REF_NO_CTX 4 ///< number of context models for reference index |
---|
| 72 | #endif |
---|
| 73 | #if TRANS_SPLIT_FLAG_CTX_REDUCTION |
---|
| 74 | #define NUM_TRANS_SUBDIV_FLAG_CTX 3 ///< number of context models for transform subdivision flags |
---|
| 75 | #else |
---|
| 76 | #define NUM_TRANS_SUBDIV_FLAG_CTX 10 ///< number of context models for transform subdivision flags |
---|
| 77 | #endif |
---|
| 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 |
---|
| 81 | |
---|
| 82 | #define NUM_SIG_CG_FLAG_CTX 2 ///< number of context models for MULTI_LEVEL_SIGNIFICANCE |
---|
| 83 | |
---|
| 84 | #if REMOVAL_8x2_2x8_CG |
---|
| 85 | #define NUM_SIG_FLAG_CTX 42 ///< number of context models for sig flag |
---|
| 86 | #define NUM_SIG_FLAG_CTX_LUMA 27 ///< number of context models for luma sig flag |
---|
| 87 | #define NUM_SIG_FLAG_CTX_CHROMA 15 ///< number of context models for chroma sig flag |
---|
| 88 | #else |
---|
| 89 | #define NUM_SIG_FLAG_CTX 45 ///< number of context models for sig flag |
---|
| 90 | #define NUM_SIG_FLAG_CTX_LUMA 24 ///< number of context models for luma sig flag |
---|
| 91 | #define NUM_SIG_FLAG_CTX_CHROMA 21 ///< number of context models for chroma sig flag |
---|
| 92 | #endif |
---|
| 93 | |
---|
| 94 | #define NUM_CTX_LAST_FLAG_XY 15 ///< number of context models for last coefficient position |
---|
| 95 | |
---|
| 96 | #define NUM_ONE_FLAG_CTX 24 ///< number of context models for greater than 1 flag |
---|
| 97 | #define NUM_ONE_FLAG_CTX_LUMA 16 ///< number of context models for greater than 1 flag of luma |
---|
| 98 | #define NUM_ONE_FLAG_CTX_CHROMA 8 ///< number of context models for greater than 1 flag of chroma |
---|
| 99 | #define NUM_ABS_FLAG_CTX 6 ///< number of context models for greater than 2 flag |
---|
| 100 | #define NUM_ABS_FLAG_CTX_LUMA 4 ///< number of context models for greater than 2 flag of luma |
---|
| 101 | #define NUM_ABS_FLAG_CTX_CHROMA 2 ///< number of context models for greater than 2 flag of chroma |
---|
| 102 | |
---|
| 103 | #define NUM_MVP_IDX_CTX 2 ///< number of context models for MVP index |
---|
| 104 | |
---|
| 105 | #define NUM_ALF_FLAG_CTX 1 ///< number of context models for ALF flag |
---|
| 106 | #define NUM_ALF_UVLC_CTX 2 ///< number of context models for ALF UVLC (filter length) |
---|
| 107 | #define NUM_ALF_SVLC_CTX 3 ///< number of context models for ALF SVLC (filter coeff.) |
---|
| 108 | #if !SAO_ABS_BY_PASS |
---|
| 109 | #define NUM_SAO_UVLC_CTX 2 ///< number of context models for SAO UVLC |
---|
| 110 | #endif |
---|
| 111 | #if SAO_MERGE_ONE_CTX |
---|
| 112 | #define NUM_SAO_MERGE_FLAG_CTX 1 ///< number of context models for SAO merge flags |
---|
| 113 | #else |
---|
| 114 | #if SAO_SINGLE_MERGE |
---|
| 115 | #define NUM_SAO_MERGE_LEFT_FLAG_CTX 1 ///< number of context models for SAO Merge-Left flag |
---|
| 116 | #else |
---|
| 117 | #define NUM_SAO_MERGE_LEFT_FLAG_CTX 3 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 118 | #endif |
---|
| 119 | #define NUM_SAO_MERGE_UP_FLAG_CTX 1 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 120 | #endif |
---|
| 121 | #if SAO_TYPE_CODING |
---|
| 122 | #define NUM_SAO_TYPE_IDX_CTX 1 ///< number of context models for SAO type index |
---|
| 123 | #else |
---|
| 124 | #define NUM_SAO_TYPE_IDX_CTX 2 ///< number of context models for AO SVLC (filter coeff.) |
---|
| 125 | #endif |
---|
| 126 | |
---|
| 127 | #if INTRA_BL |
---|
| 128 | #define NUM_INTRA_BL_PRED_CTX 3 |
---|
| 129 | #endif |
---|
| 130 | |
---|
| 131 | #define NUM_TRANSFORMSKIP_FLAG_CTX 1 ///< number of context models for transform skipping |
---|
| 132 | #define NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX 1 |
---|
| 133 | #define CNU 154 ///< dummy initialization value for unused context models 'Context model Not Used' |
---|
| 134 | |
---|
| 135 | // ==================================================================================================================== |
---|
| 136 | // Tables |
---|
| 137 | // ==================================================================================================================== |
---|
| 138 | |
---|
| 139 | // initial probability for cu_transquant_bypass flag |
---|
| 140 | static const UChar |
---|
| 141 | INIT_CU_TRANSQUANT_BYPASS_FLAG[3][NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX] = |
---|
| 142 | { |
---|
| 143 | { 154 }, |
---|
| 144 | { 154 }, |
---|
| 145 | { 154 }, |
---|
| 146 | }; |
---|
| 147 | |
---|
| 148 | // initial probability for split flag |
---|
| 149 | static const UChar |
---|
| 150 | INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] = |
---|
| 151 | { |
---|
| 152 | { 107, 139, 126, }, |
---|
| 153 | { 107, 139, 126, }, |
---|
| 154 | { 139, 141, 157, }, |
---|
| 155 | }; |
---|
| 156 | |
---|
| 157 | static const UChar |
---|
| 158 | INIT_SKIP_FLAG[3][NUM_SKIP_FLAG_CTX] = |
---|
| 159 | { |
---|
| 160 | { 197, 185, 201, }, |
---|
| 161 | { 197, 185, 201, }, |
---|
| 162 | { CNU, CNU, CNU, }, |
---|
| 163 | }; |
---|
| 164 | |
---|
| 165 | static const UChar |
---|
| 166 | INIT_ALF_CTRL_FLAG[3][NUM_ALF_CTRL_FLAG_CTX] = |
---|
| 167 | { |
---|
| 168 | { 102, }, |
---|
| 169 | { 102, }, |
---|
| 170 | { 118, }, |
---|
| 171 | }; |
---|
| 172 | |
---|
| 173 | static const UChar |
---|
| 174 | INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = |
---|
| 175 | { |
---|
| 176 | { 154, }, |
---|
| 177 | { 110, }, |
---|
| 178 | { CNU, }, |
---|
| 179 | }; |
---|
| 180 | |
---|
| 181 | static const UChar |
---|
| 182 | INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] = |
---|
| 183 | { |
---|
| 184 | { 137, }, |
---|
| 185 | { 122, }, |
---|
| 186 | { CNU, }, |
---|
| 187 | }; |
---|
| 188 | |
---|
| 189 | static const UChar |
---|
| 190 | INIT_PART_SIZE[3][NUM_PART_SIZE_CTX] = |
---|
| 191 | { |
---|
| 192 | { 154, 139, CNU, CNU, }, |
---|
| 193 | { 154, 139, CNU, CNU, }, |
---|
| 194 | { 184, CNU, CNU, CNU, }, |
---|
| 195 | }; |
---|
| 196 | |
---|
| 197 | static const UChar |
---|
| 198 | INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] = |
---|
| 199 | { |
---|
| 200 | { 154, }, |
---|
| 201 | { 154, }, |
---|
| 202 | { CNU, }, |
---|
| 203 | }; |
---|
| 204 | |
---|
| 205 | static const UChar |
---|
| 206 | INIT_PRED_MODE[3][NUM_PRED_MODE_CTX] = |
---|
| 207 | { |
---|
| 208 | { 134, }, |
---|
| 209 | { 149, }, |
---|
| 210 | { CNU, }, |
---|
| 211 | }; |
---|
| 212 | |
---|
| 213 | static const UChar |
---|
| 214 | INIT_INTRA_PRED_MODE[3][NUM_ADI_CTX] = |
---|
| 215 | { |
---|
| 216 | { 183, }, |
---|
| 217 | { 154, }, |
---|
| 218 | { 184, }, |
---|
| 219 | }; |
---|
| 220 | |
---|
| 221 | static const UChar |
---|
| 222 | INIT_CHROMA_PRED_MODE[3][NUM_CHROMA_PRED_CTX] = |
---|
| 223 | { |
---|
| 224 | { 152, 139, }, |
---|
| 225 | { 152, 139, }, |
---|
| 226 | { 63, 139, }, |
---|
| 227 | }; |
---|
| 228 | |
---|
| 229 | static const UChar |
---|
| 230 | INIT_INTER_DIR[3][NUM_INTER_DIR_CTX] = |
---|
| 231 | { |
---|
| 232 | { 95, 79, 63, 31, 31, }, |
---|
| 233 | { 95, 79, 63, 31, 31, }, |
---|
| 234 | { CNU, CNU, CNU, CNU, CNU, }, |
---|
| 235 | }; |
---|
| 236 | |
---|
| 237 | static const UChar |
---|
| 238 | INIT_MVD[3][NUM_MV_RES_CTX] = |
---|
| 239 | { |
---|
| 240 | { 169, 198, }, |
---|
| 241 | { 140, 198, }, |
---|
| 242 | { CNU, CNU, }, |
---|
| 243 | }; |
---|
| 244 | |
---|
| 245 | #if REF_IDX_BYPASS |
---|
| 246 | static const UChar |
---|
| 247 | INIT_REF_PIC[3][NUM_REF_NO_CTX] = |
---|
| 248 | { |
---|
| 249 | { 153, 153 }, |
---|
| 250 | { 153, 153 }, |
---|
| 251 | { CNU, CNU }, |
---|
| 252 | }; |
---|
| 253 | #else |
---|
| 254 | static const UChar |
---|
| 255 | INIT_REF_PIC[3][NUM_REF_NO_CTX] = |
---|
| 256 | { |
---|
| 257 | { 153, 153, 168, CNU, }, |
---|
| 258 | { 153, 153, 139, CNU, }, |
---|
| 259 | { CNU, CNU, CNU, CNU, }, |
---|
| 260 | }; |
---|
| 261 | #endif |
---|
| 262 | |
---|
| 263 | static const UChar |
---|
| 264 | INIT_DQP[3][NUM_DELTA_QP_CTX] = |
---|
| 265 | { |
---|
| 266 | { 154, 154, 154, }, |
---|
| 267 | { 154, 154, 154, }, |
---|
| 268 | { 154, 154, 154, }, |
---|
| 269 | }; |
---|
| 270 | |
---|
| 271 | static const UChar |
---|
| 272 | INIT_QT_CBF[3][2*NUM_QT_CBF_CTX] = |
---|
| 273 | { |
---|
| 274 | { 153, 111, CNU, CNU, CNU, 149, 92, 167, CNU, CNU, }, |
---|
| 275 | { 153, 111, CNU, CNU, CNU, 149, 107, 167, CNU, CNU, }, |
---|
| 276 | { 111, 141, CNU, CNU, CNU, 94, 138, 182, CNU, CNU, }, |
---|
| 277 | }; |
---|
| 278 | |
---|
| 279 | static const UChar |
---|
| 280 | INIT_QT_ROOT_CBF[3][NUM_QT_ROOT_CBF_CTX] = |
---|
| 281 | { |
---|
| 282 | { 79, }, |
---|
| 283 | { 79, }, |
---|
| 284 | { CNU, }, |
---|
| 285 | }; |
---|
| 286 | |
---|
| 287 | static const UChar |
---|
| 288 | INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = |
---|
| 289 | { |
---|
| 290 | { 125, 110, 124, 110, 95, 94, 125, 111, 111, 79, 125, 126, 111, 111, 79, |
---|
| 291 | 108, 123, 93, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 292 | }, |
---|
| 293 | { 125, 110, 94, 110, 95, 79, 125, 111, 110, 78, 110, 111, 111, 95, 94, |
---|
| 294 | 108, 123, 108, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 295 | }, |
---|
| 296 | { 110, 110, 124, 125, 140, 153, 125, 127, 140, 109, 111, 143, 127, 111, 79, |
---|
| 297 | 108, 123, 63, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, |
---|
| 298 | }, |
---|
| 299 | }; |
---|
| 300 | |
---|
| 301 | static const UChar |
---|
| 302 | INIT_SIG_CG_FLAG[3][2 * NUM_SIG_CG_FLAG_CTX] = |
---|
| 303 | { |
---|
| 304 | { 121, 140, |
---|
| 305 | 61, 154, |
---|
| 306 | }, |
---|
| 307 | { 121, 140, |
---|
| 308 | 61, 154, |
---|
| 309 | }, |
---|
| 310 | { 91, 171, |
---|
| 311 | 134, 141, |
---|
| 312 | }, |
---|
| 313 | }; |
---|
| 314 | |
---|
| 315 | static const UChar |
---|
| 316 | INIT_SIG_FLAG[3][NUM_SIG_FLAG_CTX] = |
---|
| 317 | { |
---|
| 318 | #if REMOVAL_8x2_2x8_CG |
---|
| 319 | { 170, 154, 139, 153, 139, 123, 123, 63, 124, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 170, 153, 138, 138, 122, 121, 122, 121, 167, 151, 183, 140, 151, 183, 140, }, |
---|
| 320 | { 155, 154, 139, 153, 139, 123, 123, 63, 153, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 166, 183, 140, 136, 153, 154, 170, 153, 123, 123, 107, 121, 107, 121, 167, 151, 183, 140, 151, 183, 140, }, |
---|
| 321 | { 111, 111, 125, 110, 110, 94, 124, 108, 124, 107, 125, 141, 179, 153, 125, 107, 125, 141, 179, 153, 125, 107, 125, 141, 179, 153, 125, 140, 139, 182, 182, 152, 136, 152, 136, 153, 136, 139, 111, 136, 139, 111, }, |
---|
| 322 | #else |
---|
| 323 | { 170, 154, 139, 153, 139, 123, 123, 63, 124, 153, 153, 152, 152, 152, 137, 152, 137, 137, 166, 183, 140, 136, 153, 154, 170, 153, 138, 138, 122, 121, 122, 121, 167, 153, 167, 136, 121, 122, 136, 121, 122, 91, 151, 183, 140, }, |
---|
| 324 | { 155, 154, 139, 153, 139, 123, 123, 63, 153, 153, 153, 152, 152, 152, 137, 152, 137, 122, 166, 183, 140, 136, 153, 154, 170, 153, 123, 123, 107, 121, 107, 121, 167, 153, 167, 136, 149, 107, 136, 121, 122, 91, 151, 183, 140, }, |
---|
| 325 | { 111, 111, 125, 110, 110, 94, 124, 108, 124, 139, 139, 139, 168, 124, 138, 124, 138, 107, 107, 125, 141, 179, 153, 125, 140, 139, 182, 182, 152, 136, 152, 136, 153, 182, 137, 149, 192, 152, 224, 136, 31, 136, 136, 139, 111, }, |
---|
| 326 | #endif |
---|
| 327 | }; |
---|
| 328 | |
---|
| 329 | static const UChar |
---|
| 330 | INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = |
---|
| 331 | { |
---|
| 332 | { 154, 196, 167, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, 136, 122, 169, 208, 166, 167, 154, 152, 167, 182, }, |
---|
| 333 | { 154, 196, 196, 167, 154, 152, 167, 182, 182, 134, 149, 136, 153, 121, 136, 137, 169, 194, 166, 167, 154, 167, 137, 182, }, |
---|
| 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 | }; |
---|
| 336 | |
---|
| 337 | static const UChar |
---|
| 338 | INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = |
---|
| 339 | { |
---|
| 340 | { 107, 167, 91, 107, 107, 167, }, |
---|
| 341 | { 107, 167, 91, 122, 107, 167, }, |
---|
| 342 | { 138, 153, 136, 167, 152, 152, }, |
---|
| 343 | }; |
---|
| 344 | |
---|
| 345 | static const UChar |
---|
| 346 | INIT_MVP_IDX[3][NUM_MVP_IDX_CTX] = |
---|
| 347 | { |
---|
| 348 | { 168, CNU, }, |
---|
| 349 | { 168, CNU, }, |
---|
| 350 | { CNU, CNU, }, |
---|
| 351 | }; |
---|
| 352 | |
---|
| 353 | static const UChar |
---|
| 354 | INIT_ALF_FLAG[3][NUM_ALF_FLAG_CTX] = |
---|
| 355 | { |
---|
| 356 | { 153, }, |
---|
| 357 | { 153, }, |
---|
| 358 | { 153, }, |
---|
| 359 | }; |
---|
| 360 | |
---|
| 361 | static const UChar |
---|
| 362 | INIT_ALF_UVLC[3][NUM_ALF_UVLC_CTX] = |
---|
| 363 | { |
---|
| 364 | { 154, 154, }, |
---|
| 365 | { 154, 154, }, |
---|
| 366 | { 140, 154, }, |
---|
| 367 | }; |
---|
| 368 | |
---|
| 369 | static const UChar |
---|
| 370 | INIT_ALF_SVLC[3][NUM_ALF_SVLC_CTX] = |
---|
| 371 | { |
---|
| 372 | { 141, 154, 159, }, |
---|
| 373 | { 141, 154, 189, }, |
---|
| 374 | { 187, 154, 159, }, |
---|
| 375 | }; |
---|
| 376 | #if !SAO_ABS_BY_PASS |
---|
| 377 | static const UChar |
---|
| 378 | INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] = |
---|
| 379 | { |
---|
| 380 | { 200, 140, }, |
---|
| 381 | { 185, 140, }, |
---|
| 382 | { 143, 140, }, |
---|
| 383 | }; |
---|
| 384 | #endif |
---|
| 385 | #if SAO_MERGE_ONE_CTX |
---|
| 386 | static const UChar |
---|
| 387 | INIT_SAO_MERGE_FLAG[3][NUM_SAO_MERGE_FLAG_CTX] = |
---|
| 388 | { |
---|
| 389 | { 153, }, |
---|
| 390 | { 153, }, |
---|
| 391 | { 153, }, |
---|
| 392 | }; |
---|
| 393 | #else |
---|
| 394 | static const UChar |
---|
| 395 | INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] = |
---|
| 396 | { |
---|
| 397 | #if SAO_SINGLE_MERGE |
---|
| 398 | { 153, }, |
---|
| 399 | { 153, }, |
---|
| 400 | { 153, }, |
---|
| 401 | #else |
---|
| 402 | { 153, 153, 153, }, |
---|
| 403 | { 153, 153, 153, }, |
---|
| 404 | { 153, 153, 153, }, |
---|
| 405 | #endif |
---|
| 406 | }; |
---|
| 407 | |
---|
| 408 | static const UChar |
---|
| 409 | INIT_SAO_MERGE_UP_FLAG[3][NUM_SAO_MERGE_UP_FLAG_CTX] = |
---|
| 410 | { |
---|
| 411 | { 153, }, |
---|
| 412 | { 153, }, |
---|
| 413 | { 175, }, |
---|
| 414 | }; |
---|
| 415 | #endif |
---|
| 416 | |
---|
| 417 | static const UChar |
---|
| 418 | INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] = |
---|
| 419 | { |
---|
| 420 | #if SAO_TYPE_CODING |
---|
| 421 | { 200, }, |
---|
| 422 | { 185, }, |
---|
| 423 | { 160, }, |
---|
| 424 | #else |
---|
| 425 | { 200, 140, }, |
---|
| 426 | { 185, 140, }, |
---|
| 427 | { 160, 140, }, |
---|
| 428 | #endif |
---|
| 429 | }; |
---|
| 430 | |
---|
| 431 | #if TRANS_SPLIT_FLAG_CTX_REDUCTION |
---|
| 432 | static const UChar |
---|
| 433 | INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] = |
---|
| 434 | { |
---|
| 435 | { 153, 138, 138, }, |
---|
| 436 | { 124, 138, 94, }, |
---|
| 437 | { 224, 167, 122, }, |
---|
| 438 | }; |
---|
| 439 | #else |
---|
| 440 | static const UChar |
---|
| 441 | INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] = |
---|
| 442 | { |
---|
| 443 | { CNU, 153, 138, 138, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 444 | { CNU, 124, 138, 94, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 445 | { CNU, 224, 167, 122, CNU, CNU, CNU, CNU, CNU, CNU, }, |
---|
| 446 | }; |
---|
| 447 | #endif |
---|
| 448 | |
---|
| 449 | |
---|
| 450 | #if INTRA_BL |
---|
| 451 | static const UChar |
---|
| 452 | INIT_INTRA_BL_PRED_FLAG[3][NUM_INTRA_BL_PRED_CTX] = |
---|
| 453 | { |
---|
| 454 | { 185, 185, 201, }, |
---|
| 455 | { 197, 197, 185, }, |
---|
| 456 | { 197, 197, 185, }, |
---|
| 457 | }; |
---|
| 458 | #endif |
---|
| 459 | static const UChar |
---|
| 460 | INIT_TRANSFORMSKIP_FLAG[3][2*NUM_TRANSFORMSKIP_FLAG_CTX] = |
---|
| 461 | { |
---|
| 462 | { 139, 139}, |
---|
| 463 | { 139, 139}, |
---|
| 464 | { 139, 139}, |
---|
| 465 | }; |
---|
| 466 | //! \} |
---|
| 467 | |
---|
| 468 | |
---|
| 469 | #endif |
---|