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