source: 3DVCSoftware/trunk/source/Lib/TLibCommon/ContextTables.h @ 443

Last change on this file since 443 was 443, checked in by tech, 11 years ago
  • Reintegrated branch 6.2-dev0 rev. 442.
  • Changed version number.
  • Added coding results.
  • Property svn:eol-style set to native
File size: 20.0 KB
Line 
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#if PKU_QC_DEPTH_INTRA_UNI_D0195
136#define DEPTH_MODE_NUM_FLAG_CTX          8
137#define DMM_DELTA_NUM_FLAG_CTX           1
138#else
139#define SDC_NUM_FLAG_CTX                 3
140#endif
141#define SDC_NUM_RESIDUAL_FLAG_CTX        1
142#if !RWTH_SDC_CTX_SIMPL_D0032
143#define SDC_NUM_SIGN_FLAG_CTX            1
144#endif
145#if LGE_CONCATENATE_D0141
146#define SDC_NUM_RESIDUAL_CTX             1
147#else
148#if RWTH_SDC_CTX_SIMPL_D0032
149#define SDC_NUM_RESIDUAL_CTX             8
150#else
151#define SDC_NUM_RESIDUAL_CTX             10
152#endif
153#endif
154
155#define SDC_NUM_PRED_MODE_CTX            5
156#endif
157
158// ====================================================================================================================
159// Tables
160// ====================================================================================================================
161
162// initial probability for split flag
163static const UChar
164INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] = 
165{
166  { 139,  141,  157, }, 
167  { 107,  139,  126, }, 
168  { 107,  139,  126, }, 
169};
170
171static const UChar
172INIT_SKIP_FLAG[3][NUM_SKIP_FLAG_CTX] = 
173{
174  { CNU,  CNU,  CNU, }, 
175  { 197,  185,  201, }, 
176  { 197,  185,  201, }, 
177};
178
179#if LGE_ILLUCOMP_B0045
180static const UChar
181INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 
182{
183  { CNU,  CNU,  CNU, }, 
184  { 197,  185,  201, }, 
185  { 197,  185,  201, }, 
186};
187#endif
188
189static const UChar
190INIT_ALF_CTRL_FLAG[3][NUM_ALF_CTRL_FLAG_CTX] = 
191{
192  { 200, }, 
193  { 139, }, 
194  { 169, }, 
195};
196
197static const UChar
198INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] = 
199{
200  { CNU, }, 
201  { 110, }, 
202  { 154, }, 
203};
204
205static const UChar
206INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] = 
207{
208  { CNU, }, 
209  { 122, }, 
210  { 137, }, 
211};
212
213#if H3D_IVRP
214static const UChar
215INIT_RES_PRED_FLAG[3][NUM_RES_PRED_FLAG_CTX] =
216{
217    { CNU, CNU, CNU, CNU },
218    { 154, 154, 154, 154 },
219    { 154, 154, 154, 154 },
220};
221#endif
222
223static const UChar
224INIT_PART_SIZE[3][NUM_PART_SIZE_CTX] = 
225{
226  { 184,  CNU,  CNU,  CNU, }, 
227  { 154,  139,  CNU,  CNU, }, 
228  { 154,  139,  CNU,  CNU, }, 
229};
230
231static const UChar
232INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] = 
233{
234  { CNU, }, 
235  { 154, }, 
236  { 154, }, 
237};
238
239static const UChar
240INIT_PRED_MODE[3][NUM_PRED_MODE_CTX] = 
241{
242  { CNU, }, 
243  { 149, }, 
244  { 134, }, 
245};
246
247static const UChar
248INIT_INTRA_PRED_MODE[3][NUM_ADI_CTX] = 
249{
250  { 184, }, 
251  { 154, }, 
252  { 183, }, 
253};
254
255static const UChar
256INIT_CHROMA_PRED_MODE[3][NUM_CHROMA_PRED_CTX] = 
257{
258  {  63,  139, }, 
259  { 152,  139, }, 
260  { 152,  139, }, 
261};
262
263static const UChar
264INIT_INTER_DIR[3][NUM_INTER_DIR_CTX] = 
265{
266  { CNU,  CNU,  CNU,  CNU, }, 
267#if CABAC_INIT_FLAG
268  {  95,   79,   63,   31, }, 
269#else
270  { CNU,  CNU,  CNU,  CNU, }, 
271#endif
272  {  95,   79,   63,   31, }, 
273};
274
275static const UChar
276INIT_MVD[3][NUM_MV_RES_CTX] = 
277{
278  { CNU,  CNU, }, 
279  { 140,  198, }, 
280  { 169,  198, }, 
281};
282
283static const UChar
284INIT_REF_PIC[3][NUM_REF_NO_CTX] = 
285{
286  { CNU,  CNU,  CNU,  CNU, }, 
287  { 153,  153,  139,  CNU, }, 
288  { 153,  153,  168,  CNU, }, 
289};
290
291static const UChar
292INIT_DQP[3][NUM_DELTA_QP_CTX] = 
293{
294  { 154,  154,  154, }, 
295  { 154,  154,  154, }, 
296  { 154,  154,  154, }, 
297};
298
299static const UChar
300INIT_QT_CBF[3][2*NUM_QT_CBF_CTX] = 
301{
302  { 111,  141,  CNU,  CNU,  CNU,   94,  138,  182,  CNU,  CNU, }, 
303  { 153,  111,  CNU,  CNU,  CNU,  149,  107,  167,  CNU,  CNU, }, 
304  { 153,  111,  CNU,  CNU,  CNU,  149,   92,  167,  CNU,  CNU, }, 
305};
306
307static const UChar
308INIT_QT_ROOT_CBF[3][NUM_QT_ROOT_CBF_CTX] = 
309{
310  { CNU, }, 
311  {  79, }, 
312  {  79, }, 
313};
314
315static const UChar
316INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = 
317{
318  { 110,  110,  124,  110,  140,  111,  125,  111,  127,  111,  111,  156,  127,  127,  111, 
319    108,  123,   63,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU, 
320  }, 
321  { 125,  110,   94,  110,  125,  110,  125,  111,  111,  110,  139,  111,  111,  111,  125, 
322    108,  123,  108,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,
323  }, 
324  { 125,  110,  124,  110,  125,  110,  125,  111,  111,  110,  139,  111,  111,  111,  125, 
325    108,  123,   93,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU, 
326  }, 
327};
328
329static const UChar
330INIT_SIG_CG_FLAG[3][2 * NUM_SIG_CG_FLAG_CTX] = 
331{
332  {  91,  171, 
333    134,  141, 
334  }, 
335  { 121,  140, 
336    61,  154, 
337  }, 
338  { 121,  140, 
339    61,  154, 
340  }, 
341};
342
343static const UChar
344INIT_SIG_FLAG[3][NUM_SIG_FLAG_CTX] = 
345{
346  { 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, }, 
347  { 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, }, 
348  { 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, }, 
349};
350
351static const UChar
352INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] = 
353{
354  { 140,   92,  137,  138,  140,  152,  138,  139,  153,   74,  149,   92,  139,  107,  122,  152,  140,  179,  166,  182,  140,  227,  122,  197, }, 
355  { 154,  196,  196,  167,  154,  152,  167,  182,  182,  134,  149,  136,  153,  121,  136,  137,  169,  194,  166,  167,  154,  167,  137,  182, }, 
356  { 154,  196,  167,  167,  154,  152,  167,  182,  182,  134,  149,  136,  153,  121,  136,  122,  169,  208,  166,  167,  154,  152,  167,  182, }, 
357};
358
359static const UChar
360INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = 
361{
362  { 138,  153,  136,  167,  152,  152, }, 
363  { 107,  167,   91,  122,  107,  167, }, 
364  { 107,  167,   91,  107,  107,  167, }, 
365};
366
367static const UChar
368INIT_MVP_IDX[3][NUM_MVP_IDX_CTX] = 
369{
370  { CNU,  CNU, }, 
371  { 168,  CNU, }, 
372  { 168,  CNU, }, 
373};
374
375static const UChar
376INIT_ALF_FLAG[3][NUM_ALF_FLAG_CTX] = 
377{
378  { 153, }, 
379  { 153, }, 
380  { 153, }, 
381};
382
383static const UChar
384INIT_ALF_UVLC[3][NUM_ALF_UVLC_CTX] = 
385{
386  { 140,  154, }, 
387  { 154,  154, }, 
388  { 154,  154, }, 
389};
390
391static const UChar
392INIT_ALF_SVLC[3][NUM_ALF_SVLC_CTX] = 
393{
394  { 187,  154,  159, }, 
395  { 141,  154,  189, }, 
396  { 141,  154,  159, }, 
397};
398#if LGE_SAO_MIGRATION_D0091
399static const UChar
400INIT_SAO_MERGE_FLAG[3][NUM_SAO_MERGE_FLAG_CTX] =
401{
402  { 153,  },
403  { 153,  },
404  { 153,  },
405};
406
407static const UChar
408INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] = 
409{
410  { 200, },
411  { 185, },
412  { 160, },
413};
414#else
415static const UChar
416INIT_SAO_FLAG[3][NUM_SAO_FLAG_CTX] = 
417{
418  { 154, }, 
419  { 153, }, 
420  { 153, }, 
421};
422
423static const UChar
424INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] = 
425{
426  { 143,  140, }, 
427  { 185,  140, }, 
428  { 200,  140, }, 
429};
430
431static const UChar
432INIT_SAO_SVLC[3][NUM_SAO_SVLC_CTX] = 
433{
434  { 247,  154,  244, }, 
435  { 215,  154,  169, }, 
436  { 215,  154,  169, }, 
437};
438
439static const UChar
440INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] = 
441{
442  { 153,  153,  153, }, 
443  { 153,  153,  153, }, 
444  { 153,  153,  153, }, 
445};
446
447static const UChar
448INIT_SAO_MERGE_UP_FLAG[3][NUM_SAO_MERGE_UP_FLAG_CTX] = 
449{
450  { 175, }, 
451  { 153, }, 
452  { 153, }, 
453};
454
455static const UChar
456INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] = 
457{
458  { 160,  140, }, 
459  { 185,  140, }, 
460  { 200,  140, }, 
461};
462#endif
463
464static const UChar
465INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] = 
466{
467{ CNU,  224,  167,  122,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU, }, 
468{ CNU,  124,  138,   94,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU, }, 
469{ CNU,  153,  138,  138,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU, }, 
470};
471
472#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
473static const UChar
474INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] =
475{
476  {
477    CNU
478  },
479  {
480    CNU
481  },
482  {
483    CNU
484  }
485};
486
487static const UChar
488INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] =
489{
490  {
491    CNU
492  },
493  {
494    CNU
495  },
496  {
497    CNU
498  }
499};
500
501static const UChar
502INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] = 
503{
504#if LGE_DMM3_SIMP_C0044
505  {
506    CNU, CNU, CNU, CNU
507  },
508  {
509    CNU, CNU, CNU, CNU
510  },
511  {
512    CNU, CNU, CNU, CNU
513  }
514#else
515  {
516    CNU, CNU, CNU
517  },
518  {
519    CNU, CNU, CNU
520  },
521  {
522    CNU, CNU, CNU
523  }
524#endif
525};
526#if QC_ARP_D0177
527#define NUM_ARPW_CTX                  4       ///< number of context models for generalized residual prediction weighting factor
528static const UChar
529INIT_ARPW[3][NUM_ARPW_CTX] = 
530{
531  { 154 , 154 , 154 , 154 }, 
532  { 154 , 154 , 154 , 154 }, 
533  { 154 , 154 , 154 , 154 }, 
534};
535#endif
536
537#if LGE_EDGE_INTRA_A0070
538static const Short
539INIT_EDGE_INTRA[3][NUM_EDGE_INTRA_CTX] =
540{
541  {
542    CNU
543  },
544  {
545    CNU
546  },
547  {
548    CNU
549  }
550};
551
552#if LGE_EDGE_INTRA_DELTA_DC
553static const Short
554INIT_EDGE_INTRA_DELTA_DC[3][NUM_EDGE_INTRA_DELTA_DC_CTX] =
555{
556  {
557    CNU, CNU
558  },
559  {
560    CNU, CNU
561  },
562  {
563    CNU, CNU
564  }
565};
566#endif
567#endif
568
569#endif
570
571#if RWTH_SDC_DLT_B0036
572#if PKU_QC_DEPTH_INTRA_UNI_D0195
573static const UChar INIT_DEPTHMODE_FLAG[3][DEPTH_MODE_NUM_FLAG_CTX]=
574{
575  {0,  0,  64,   0, CNU,   0, CNU, 0},
576  {0, 64,   0, CNU,   0, CNU,   0, 0},
577  {64, 0, CNU,   0, CNU,   0,   0, 0}
578};
579static const UChar INIT_DMMDELTA_FLAG[3][DMM_DELTA_NUM_FLAG_CTX]=
580{
581  {0},
582  {0},
583  {64}
584};
585#else
586static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] =
587{
588  {
589    {    0,   64 }, {    0,   64 }, {    0,   64 }
590  },
591  {
592    {    0,   64 }, {    0,   64 }, {    0,   64 }
593  },
594  {
595    {    0,   64 }, {    0,   64 }, {    0,   64 }
596  }
597};
598#endif
599
600#if RWTH_SDC_CTX_SIMPL_D0032
601static const UChar INIT_SDC_RESIDUAL_FLAG[3][SDC_NUM_RESIDUAL_FLAG_CTX] =
602{
603  {
604    CNU
605   
606  },
607  {
608    CNU
609  },
610  {
611    CNU
612  }
613};
614   
615#if LGE_CONCATENATE_D0141
616static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] =
617{
618    {
619         155
620    },
621    {
622         155
623    },
624    {
625        155
626    }
627};
628#else
629static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] =
630{
631  {
632    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
633  },
634  {
635    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
636  },
637  {
638    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
639  }
640};
641#endif
642
643static const UChar INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX] =
644{
645  {
646    CNU,    CNU
647    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
648  },
649  {
650    CNU,    CNU
651    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
652  },
653  {
654    CNU,    CNU
655    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
656  }
657};
658#else
659static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] =
660{
661  {
662    { -5, 35 },
663    { -0, 56 },
664    { -0, 56 }
665   
666  },
667  {
668    { -5, 35 },
669    { -0, 56 },
670    { -0, 56 }
671  },
672  {
673    { -5, 35 },
674    { -0, 56 },
675    { -0, 56 }
676  }
677};
678
679static const Short INIT_SDC_SIGN_FLAG[3][3*SDC_NUM_SIGN_FLAG_CTX][2] =
680{
681  {
682    { -1, 56 },
683    { -4, 55 },
684    { -4, 55 }
685  },
686  {
687    { -1, 56 },
688    { -4, 55 },
689    { -4, 55 }
690  },
691  {
692    { -1, 56 },
693    { -4, 55 },
694    { -4, 55 }
695  }
696};
697
698static const Short INIT_SDC_RESIDUAL[3][3*SDC_NUM_RESIDUAL_CTX][2] =
699{
700  {
701    { -1, 64 }, {  2, 64 }, {  6, 67 }, {  8, 61 }, {  7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 },
702    {  2, 66 }, { -0, 63 }, {  1, 64 }, {  6, 65 }, {  7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 },
703    {  2, 66 }, { -0, 63 }, {  1, 64 }, {  6, 65 }, {  7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }
704  },
705  {
706    { -1, 64 }, {  2, 64 }, {  6, 67 }, {  8, 61 }, {  7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 },
707    {  2, 66 }, { -0, 63 }, {  1, 64 }, {  6, 65 }, {  7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 },
708    {  2, 66 }, { -0, 63 }, {  1, 64 }, {  6, 65 }, {  7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }
709  },
710  {
711    { -1, 64 }, {  2, 64 }, {  6, 67 }, {  8, 61 }, {  7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 },
712    {  2, 66 }, { -0, 63 }, {  1, 64 }, {  6, 65 }, {  7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 },
713    {  2, 66 }, { -0, 63 }, {  1, 64 }, {  6, 65 }, {  7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }
714  }
715};
716
717static const Short INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX][2] =
718{
719  {
720    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 },
721    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 },
722    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 }
723  },
724  {
725    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 },
726    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 },
727    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 }
728  },
729  {
730    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 },
731    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 },
732    {  9, 85 }, { -4, 60 }, {  4, 70 }, {  4, 70 }, {  4, 70 }
733  }
734};
735#endif
736#endif
737
738//! \}
739
740#endif
741
Note: See TracBrowser for help on using the repository browser.