Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibCommon/ContextTables.h


Ignore:
Timestamp:
20 Feb 2013, 22:07:43 (12 years ago)
Author:
tech
Message:

Reintegrated branch 5.1-dev0 rev. 295.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/ContextTables.h

    r189 r296  
    5757
    5858#define NUM_MERGE_FLAG_EXT_CTX        1       ///< number of context models for merge flag of merge extended
    59 #if MRG_IDX_CTX_RED
    6059#define NUM_MERGE_IDX_EXT_CTX         1       ///< number of context models for merge index of merge extended
    61 #else
    62 #define NUM_MERGE_IDX_EXT_CTX         4       ///< number of context models for merge index of merge extended
    63 #endif
    64 
    65 #if HHI_INTER_VIEW_RESIDUAL_PRED
     60
     61#if H3D_IVRP
    6662#define NUM_RES_PRED_FLAG_CTX         4       ///< number of context for residual prediction flag
    6763#endif
     
    6965#define NUM_ALF_CTRL_FLAG_CTX         1       ///< number of context models for ALF control flag
    7066#define NUM_PART_SIZE_CTX             4       ///< number of context models for partition size
    71 #if AMP_CTX
    7267#define NUM_CU_AMP_CTX                1       ///< number of context models for partition size (AMP)
    73 #else
    74 #define NUM_CU_X_POS_CTX              2       ///< number of context models for partition size (AMP)
    75 #define NUM_CU_Y_POS_CTX              2       ///< number of context models for partition size (AMP)
    76 #endif
    7768#define NUM_PRED_MODE_CTX             1       ///< number of context models for prediction mode
    7869
     
    9586#define NUM_SIG_FLAG_CTX_LUMA         27      ///< number of context models for luma sig flag
    9687#define NUM_SIG_FLAG_CTX_CHROMA       21      ///< number of context models for chroma sig flag
    97 #if LAST_CTX_REDUCTION
    9888#define NUM_CTX_LAST_FLAG_XY          15      ///< number of context models for last coefficient position
    99 #else
    100 #define NUM_CTX_LAST_FLAG_XY          18      ///< number of context models for last coefficient position
    101 #endif
    102 
    103 #if LEVEL_CTX_LUMA_RED
     89
    10490#define NUM_ONE_FLAG_CTX              24      ///< number of context models for greater than 1 flag
    10591#define NUM_ONE_FLAG_CTX_LUMA         16      ///< number of context models for greater than 1 flag of luma
    10692#define NUM_ONE_FLAG_CTX_CHROMA        8      ///< number of context models for greater than 1 flag of chroma
    107 #if RESTRICT_GR1GR2FLAG_NUMBER
    10893#define NUM_ABS_FLAG_CTX               6      ///< number of context models for greater than 2 flag
    10994#define NUM_ABS_FLAG_CTX_LUMA          4      ///< number of context models for greater than 2 flag of luma
    11095#define NUM_ABS_FLAG_CTX_CHROMA        2      ///< number of context models for greater than 2 flag of chroma
    111 #else
    112 #define NUM_ABS_FLAG_CTX              18      ///< number of context models for greater than 2 flag
    113 #define NUM_ABS_FLAG_CTX_LUMA         12      ///< number of context models for greater than 2 flag of luma
    114 #define NUM_ABS_FLAG_CTX_CHROMA        6      ///< number of context models for greater than 2 flag of chroma
    115 #endif
    116 #else
    117 #define NUM_ONE_FLAG_CTX              32      ///< number of context models for greater than 1 flag
    118 #define NUM_ONE_FLAG_CTX_LUMA         24      ///< number of context models for greater than 1 flag of luma
    119 #define NUM_ONE_FLAG_CTX_CHROMA        8      ///< number of context models for greater than 1 flag of chroma
    120 #if RESTRICT_GR1GR2FLAG_NUMBER
    121 #define NUM_ABS_FLAG_CTX               8      ///< number of context models for greater than 2 flag
    122 #define NUM_ABS_FLAG_CTX_LUMA          6      ///< number of context models for greater than 2 flag of luma
    123 #define NUM_ABS_FLAG_CTX_CHROMA        2      ///< number of context models for greater than 2 flag of chroma
    124 #else
    125 #define NUM_ABS_FLAG_CTX              24      ///< number of context models for greater than 2 flag
    126 #define NUM_ABS_FLAG_CTX_LUMA         18      ///< number of context models for greater than 2 flag of luma
    127 #define NUM_ABS_FLAG_CTX_CHROMA        6      ///< number of context models for greater than 2 flag of chroma
    128 #endif
    129 #endif
    13096
    13197#define NUM_MVP_IDX_CTX               2       ///< number of context models for MVP index
     
    138104#define NUM_SAO_UVLC_CTX              2       ///< number of context models for SAO UVLC
    139105#define NUM_SAO_SVLC_CTX              3       ///< number of context models for SAO SVLC
    140 #if SAO_UNIT_INTERLEAVING
    141106#define NUM_SAO_RUN_CTX               3       ///< number of context models for AO SVLC (filter coeff.)
    142107#define NUM_SAO_MERGE_LEFT_FLAG_CTX   3       ///< number of context models for AO SVLC (filter coeff.)
    143108#define NUM_SAO_MERGE_UP_FLAG_CTX     1       ///< number of context models for AO SVLC (filter coeff.)
    144109#define NUM_SAO_TYPE_IDX_CTX          2       ///< number of context models for AO SVLC (filter coeff.)
    145 #endif
    146 #if CABAC_LINEAR_INIT
    147110#define CNU                          154      ///< dummy initialization value for unused context models 'Context model Not Used'
    148 #else
    149 #define CNU                          119      ///< dummy initialization value for unused context models 'Context model Not Used'
    150 #endif
    151111
    152112#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    153113#define NUM_DMM_FLAG_CTX              1       ///< number of context models for DMM flag
    154114#define NUM_DMM_MODE_CTX              1       ///< number of context models for DMM mode
     115#if LGE_DMM3_SIMP_C0044
     116#define NUM_DMM_DATA_CTX              4       ///< number of context models for DMM data
     117#else
    155118#define NUM_DMM_DATA_CTX              3       ///< number of context models for DMM data
     119#endif
    156120#endif
    157121
     
    177141
    178142// initial probability for split flag
    179 #if CABAC_LINEAR_INIT
    180143static const UChar
    181144INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] = 
     
    223186INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] = 
    224187{
    225 #if MRG_IDX_CTX_RED
    226188  { CNU, },
    227189  { 122, },
    228190  { 137, },
    229 #else
    230   { CNU,  CNU,  CNU,  CNU, },
    231   { 122,  138,  153,  182, },
    232   { 137,  139,  154,  139, },
    233 #endif
    234 };
    235 
    236 #if HHI_INTER_VIEW_RESIDUAL_PRED
     191};
     192
     193#if H3D_IVRP
    237194static const UChar
    238195INIT_RES_PRED_FLAG[3][NUM_RES_PRED_FLAG_CTX] =
     
    252209};
    253210
    254 #if AMP_CTX
    255211static const UChar
    256212INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] = 
     
    260216  { 154, },
    261217};
    262 #else
    263 static const UChar
    264 INIT_CU_X_POS[3][NUM_CU_X_POS_CTX] = 
    265 {
    266   { CNU,  CNU, },
    267   { 154,  139, },
    268   { 154,  139, },
    269 };
    270 
    271 static const UChar
    272 INIT_CU_Y_POS[3][NUM_CU_Y_POS_CTX] = 
    273 {
    274   { CNU,  CNU, },
    275   { 154,  154, },
    276   { 154,  139, },
    277 };
    278 #endif
    279218
    280219static const UChar
     
    354293};
    355294
    356 #if LAST_CTX_REDUCTION
    357295static const UChar
    358296INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = 
     
    368306  },
    369307};
    370 #else
    371 static const UChar
    372 INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] = 
    373 {
    374   { 110,  110,  124,  110,  140,  111,  124,  125,  111,  127,  111,  138,  111,  156,  127,  127,  111,   94,
    375     108,  123,   63,   63,  139,  124,   93,  108,  125,  111,  110,   63,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,
    376   },
    377   { 125,  110,  124,  110,  125,  110,  153,  125,  111,  111,  110,  153,  139,  111,  111,  111,  125,  139,
    378     108,  123,  108,  152,  124,   94,  123,  137,  139,  110,  110,  154,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,
    379   },
    380   { 125,  110,  124,  110,  125,  110,  153,  125,  111,  111,  110,  153,  139,  111,  111,  111,  125,  139, 
    381     108,  123,   93,  152,  124,   94,  123,  152,  139,  110,  110,  154,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU,
    382   },
    383 };
    384 #endif
    385308
    386309static const UChar
     
    406329};
    407330
    408 #if LEVEL_CTX_LUMA_RED
    409331static const UChar
    410332INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] =
     
    415337};
    416338
    417 #if RESTRICT_GR1GR2FLAG_NUMBER
    418339static const UChar
    419340INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = 
     
    423344  { 107,  167,   91,  107,  107,  167, },
    424345};
    425 #else
    426 static const UChar
    427 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = 
    428 {
    429   { 138,  139,  111,  153,  139,  111,  136,  167,  139,  167,  153,  139,  152,  139,  140,  152,  184,  141, },
    430   { 107,  153,  125,  167,  153,  140,   91,  137,  153,  122,  167,  139,  107,  153,  140,  167,  183,  140, },
    431   { 107,  153,  125,  167,  153,  140,   91,  137,  153,  107,  167,  139,  107,  153,  140,  167,  183,  140, },
    432 };
    433 #endif
    434 #else
    435 static const UChar
    436 INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] =
    437 {
    438   { 140,   92,  137,  138,  140,  152,  138,  139,  126,  168,  139,  139,  153,   74,  149,   92,  139,  107,  122,  152,  110,   93,  152,  138,  140,  179,  166,  182,  140,  227,  122,  197, },
    439   { 154,  196,  196,  167,  154,  152,  167,  182,  155,  139,  139,  139,  182,  134,  149,  136,  153,  121,  136,  137,  139,  122,  152,  167,  169,  194,  166,  167,  154,  167,  137,  182, },
    440   { 154,  196,  167,  167,  154,  152,  167,  182,  155,  139,  139,  139,  182,  134,  149,  136,  153,  121,  136,  122,  139,  107,  152,  152,  169,  208,  166,  167,  154,  152,  167,  182, },
    441 };
    442 
    443 #if RESTRICT_GR1GR2FLAG_NUMBER
    444 static const UChar
    445 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = 
    446 {
    447   { 138,  153,  139,  136,  167,  153,  152,  152, },
    448   { 107,  167,  139,   91,  122,  152,  107,  167, },
    449   { 107,  167,  139,   91,  107,   93,  107,  167, },
    450 };
    451 #else
    452 static const UChar
    453 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] = 
    454 {
    455   { 138,  139,  111,  153,  139,  111,  139,  125,  111,  136,  167,  139,  167,  153,  139,  153,  139,  110,  152,  139,  140,  152,  184,  141, },
    456   { 107,  153,  125,  167,  153,  140,  139,  154,  155,   91,  137,  153,  122,  167,  139,  152,  138,  139,  107,  153,  140,  167,  183,  140, },
    457   { 107,  153,  125,  167,  153,  140,  139,  154,  155,   91,  137,  153,  107,  167,  139,   93,  138,  139,  107,  153,  140,  167,  183,  140, },
    458 };
    459 #endif
    460 #endif
    461346
    462347static const UChar
     
    516401};
    517402
    518 #if SAO_UNIT_INTERLEAVING
    519403static const UChar
    520404INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] =
     
    540424  { 200,  140, },
    541425};
    542 #endif
    543426
    544427static const UChar
     
    549432{ CNU,  153,  138,  138,  CNU,  CNU,  CNU,  CNU,  CNU,  CNU, },
    550433};
     434
     435#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     436#if FIX_DMM_CTX_INIT_C0034
     437static const UChar
    551438#else
     439static const Short
     440#endif
     441INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] =
     442{
     443  {
     444    CNU
     445  },
     446  {
     447    CNU
     448  },
     449  {
     450    CNU
     451  }
     452};
     453
     454#if FIX_DMM_CTX_INIT_C0034
    552455static const UChar
    553 INIT_SPLIT_FLAG[3][NUM_SPLIT_FLAG_CTX] =
    554 {
    555   {
    556      87,  74, 107,
    557    
    558   },
    559   {
    560      84, 103, 105,
    561    
    562   },
    563   {
    564      84, 103, 105,
    565    
    566   },
    567 };
    568 
    569 // initial probability for skip flag
     456#else
     457static const Short
     458#endif
     459INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] =
     460{
     461  {
     462    CNU
     463  },
     464  {
     465    CNU
     466  },
     467  {
     468    CNU
     469  }
     470};
     471
     472#if FIX_DMM_CTX_INIT_C0034
    570473static const UChar
    571 INIT_SKIP_FLAG[3][NUM_SKIP_FLAG_CTX] =
    572 {
    573   {
    574     CNU, CNU, CNU,
    575    
    576   },
    577   {
    578     165, 168, 154,
    579    
    580   },
    581   {
    582     165, 168, 154,
    583    
    584   },
    585 };
    586 
    587 // initial probability for skip flag
    588 static const UChar
    589 INIT_ALF_CTRL_FLAG[3][NUM_ALF_CTRL_FLAG_CTX] =
    590 {
    591   {
    592     153,
    593    
    594   },
    595   {
    596      87,
    597    
    598   },
    599   {
    600     135,
    601    
    602   },
    603 };
    604 
    605 // initial probability for merge flag
    606 static const UChar
    607 INIT_MERGE_FLAG_EXT[3][NUM_MERGE_FLAG_EXT_CTX] =
    608 {
    609   {
    610     CNU,
    611    
    612   },
    613   {
    614     72,
    615    
    616   },
    617   {
    618     119,
    619    
    620   },
    621 };
    622 
    623 static const UChar
    624 INIT_MERGE_IDX_EXT[3][NUM_MERGE_IDX_EXT_CTX] =
    625 {
    626 #if MRG_IDX_CTX_RED
    627   {
    628     CNU,
    629    
    630   },
    631   {
    632     100,
    633    
    634   },
    635   {
    636     116,
    637   },
    638474#else
    639   {
    640     CNU, CNU, CNU, CNU,
    641    
    642   },
    643   {
    644     100,  86, 102, 133,
    645    
    646   },
    647   {
    648     116,  87, 119, 103,
    649    
    650   },
    651 #endif
    652 };
    653 
    654 // initial probability for PU size
    655 static const UChar
    656 INIT_PART_SIZE[3][NUM_PART_SIZE_CTX] =
    657 {
    658   {
    659     167, CNU, CNU, CNU,
    660    
    661   },
    662   {
    663     119,  87, CNU, CNU,
    664    
    665   },
    666   {
    667     119,  87, CNU, CNU,
    668    
    669   },
    670 };
    671 #if AMP_CTX
    672 static const UChar
    673 INIT_CU_AMP_POS[3][NUM_CU_AMP_CTX] =
    674 {
    675   {
    676     CNU,
    677   },
    678   {
    679     119,
    680   },
    681   {
    682     119,
    683   },
    684 };
     475static const Short
     476#endif
     477INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] =
     478{
     479#if LGE_DMM3_SIMP_C0044
     480  {
     481    CNU, CNU, CNU, CNU
     482  },
     483  {
     484    CNU, CNU, CNU, CNU
     485  },
     486  {
     487    CNU, CNU, CNU, CNU
     488  }
    685489#else
    686 // initial probability for AMP split position (X)
    687 static const UChar
    688 INIT_CU_X_POS[3][NUM_CU_X_POS_CTX] =
    689 {
    690   {
    691     CNU, CNU,
    692    
    693   },
    694   {
    695     119, 103,
    696    
    697   },
    698   {
    699     119, 103,
    700    
    701   },
    702 };
    703 
    704 // initial probability for AMP split position (Y)
    705 static const UChar
    706 INIT_CU_Y_POS[3][NUM_CU_Y_POS_CTX] =
    707 {
    708   {
    709     CNU, CNU,
    710    
    711   },
    712   {
    713     119, 119,
    714    
    715   },
    716   {
    717     119, 103,
    718    
    719   },
    720 };
    721 #endif
    722 // initial probability for prediction mode
    723 static const UChar
    724 INIT_PRED_MODE[3][NUM_PRED_MODE_CTX] =
    725 {
    726   {
    727     CNU,
    728    
    729   },
    730   {
    731     114,
    732    
    733   },
    734   {
    735     98,
    736    
    737   },
    738 };
    739 
    740 // initial probability for intra direction of luma
    741 static const UChar
    742 INIT_INTRA_PRED_MODE[3][NUM_ADI_CTX] =
    743 {
    744   {
    745     167,
    746    
    747   },
    748   {
    749     119,
    750    
    751   },
    752   {
    753     150,
    754    
    755   },
    756 };
    757 
    758 // initial probability for intra direction of chroma
    759 static const UChar
    760 INIT_CHROMA_PRED_MODE[3][NUM_CHROMA_PRED_CTX] =
    761 {
    762   {
    763     53, 103,
    764    
    765   },
    766   {
    767     85,  87,
    768    
    769   },
    770   {
    771     101,  87,
    772    
    773   },
    774 };
    775 
    776 // initial probability for temporal direction
    777 static const UChar
    778 INIT_INTER_DIR[3][NUM_INTER_DIR_CTX] =
    779 {
    780   {
    781     CNU, CNU, CNU, CNU,
    782    
    783   },
    784   {
    785     CNU, CNU, CNU, CNU,
    786    
    787   },
    788   {
    789     41,  39,  38,  36,
    790    
    791   },
    792 };
    793 
    794 // initial probability for motion vector difference
    795 static const UChar
    796 INIT_MVD[3][NUM_MV_RES_CTX] =
    797 {
    798   {
    799     CNU, CNU,
    800    
    801   },
    802   {
    803     120, 166,
    804    
    805   },
    806   {
    807     135, 166,
    808    
    809   },
    810 };
    811 
    812 // initial probability for reference frame index
    813 static const UChar
    814 INIT_REF_PIC[3][NUM_REF_NO_CTX] =
    815 {
    816   {
    817     CNU, CNU, CNU, CNU,
    818    
    819   },
    820   {
    821     102, 118, 103, CNU,
    822    
    823   },
    824   {
    825     118, 118, 134, CNU,
    826    
    827   },
    828 };
    829 
    830 // initial probability for dQP
    831 static const UChar
    832 INIT_DQP[3][NUM_DELTA_QP_CTX] =
    833 {
    834   {
    835     CNU, CNU, CNU,
    836    
    837   },
    838   {
    839     CNU, CNU, CNU,
    840    
    841   },
    842   {
    843     CNU, CNU, CNU,
    844    
    845   },
    846 };
    847 
    848 static const UChar
    849 INIT_QT_CBF[3][2*NUM_QT_CBF_CTX] =
    850 {
    851   {
    852      73,  74, CNU, CNU, CNU,
    853      55,  86, 133, CNU, CNU,
    854    
    855   },
    856   {
    857     102,  89, CNU, CNU, CNU,
    858     114,  84, 117, CNU, CNU,
    859    
    860   },
    861   {
    862     102,  89, CNU, CNU, CNU,
    863     114,  68, 117, CNU, CNU,
    864    
    865   },
    866 };
    867 
    868 static const UChar
    869 INIT_QT_ROOT_CBF[3][NUM_QT_ROOT_CBF_CTX] =
    870 {
    871   {
    872     CNU,
    873    
    874   },
    875   {
    876     39,
    877    
    878   },
    879   {
    880     39,
    881    
    882   },
    883 };
    884 
    885 #if LAST_CTX_REDUCTION
    886 static const UChar
    887 INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] =
    888 {
    889   {
    890     72,  72,  71,  72, 104,  89,  88,  89,  59,  73,  89, 106,  60,  59,  43,   
    891     54,  70,  53,  CNU, CNU, CNU,  CNU, CNU, CNU,  CNU, CNU, CNU, CNU, CNU, CNU,
    892   },
    893   {
    894     57,  72,  55,  72,  57,  72,   88,  73,  73,  72,  103,  73,  89,  73,  57, 
    895     54,  70,  54,  CNU, CNU, CNU,  CNU, CNU, CNU,  CNU, CNU, CNU, CNU, CNU, CNU,
    896   },
    897   {
    898     88,  72,  71,  72,  57,  72,  88,  73,  73,  72,   103,  73,  89,  73,  57,   
    899     54,  70,  69,   CNU, CNU, CNU,  CNU, CNU, CNU,  CNU, CNU, CNU, CNU, CNU, CNU,
    900   },
    901 };
    902 #else
    903 static const UChar
    904 INIT_LAST[3][2*NUM_CTX_LAST_FLAG_XY] =
    905 {
    906   {
    907     72,  72,  71,  72, 104,  89,  71,  88,  89,  59,  73,  86,  89, 106,  60,  59,  43,  55,
    908     54,  70,  53,  53,  87,  71,  69,  54,  88,  73,  72,  53, CNU, CNU, CNU, CNU, CNU, CNU,
    909    
    910   },
    911   {
    912     57,  72,  71,  72,  57,  72, 102,  88,  73,  73,  72, 102, 103,  73,  89,  73,  57,  87,
    913     54,  70,  54, 101,  71,  55,  70, 116, 103,  72,  72, 119, CNU, CNU, CNU, CNU, CNU, CNU,
    914    
    915   },
    916   {
    917     88,  72,  71,  72,  57,  72, 102,  88,  73,  73,  72, 118, 103,  73,  89,  73,  57,  87,
    918     54,  70,  69,  85,  71,  55,  70,  85, 103,  72,  72, 119, CNU, CNU, CNU, CNU, CNU, CNU,
    919    
    920   },
    921 };
    922 #endif
    923 
    924 static const UChar
    925 INIT_SIG_CG_FLAG[3][2 * NUM_SIG_CG_FLAG_CTX] =
    926 {
    927   {
    928     83, 122,
    929     98, 121,
    930    
    931   },
    932   {
    933     99, 120,
    934     67, 119,
    935    
    936   },
    937   {
    938     99, 120,
    939     67, 119,
    940    
    941   },
    942 };
    943 
    944 static const UChar
    945 INIT_SIG_FLAG[3][NUM_SIG_FLAG_CTX] =
    946 {
    947   {
    948     74,  73,  88,  72,  72,  55,  71,  54,  71,  88, 103,  71,  53,  87, 134,  86,  84,  70,  68,  89,  90,  84,  88,  74, 130, 118,  88,
    949     120,  87, 149,  70,  52, 118, 133, 116, 114, 129, 132, 162, 115,  51, 115,  66, 120,  74, 115,  87,  89,
    950   },
    951   {
    952     152, 119, 103, 118,  87,  70,  70,  53, 118, 134, 118, 101,  68,  85, 101, 116, 100,  68,  67, 136, 168, 147, 150, 120, 115, 118, 119,
    953     136, 102,  70,  53,  67, 117, 102, 117, 115, 114,  84, 115,  99, 100,  83, 114, 152, 168, 131, 150, 120,
    954   },
    955   {
    956     152, 119, 103, 118,  87,  70,  70,  53,  71, 103, 118, 101,  68,  85, 101, 116, 116,  68,  67, 152, 168, 147, 150, 120, 115, 118, 119,
    957     136, 102,  86,  84,  67, 117, 102, 117, 115,  99, 100, 115,  99, 100,  83, 114, 152, 152, 131, 150, 120,
    958   },
    959 };
    960 
    961 #if LEVEL_CTX_LUMA_RED
    962 static const UChar
    963 INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] =
    964 {
    965   {
    966     104,  68, 116,  86, 104, 132,  86,  87, 102,  66, 114,  68,  87,  84, 100, 101,
    967       104, 130, 147, 149, 104, 196, 100, 165,
    968   },
    969   {
    970     119, 179, 179, 164, 119,  85, 117, 149, 133,  98, 114, 115, 118,  99, 115, 116,
    971       135, 146, 147, 164, 119, 148, 116, 133,
    972   },
    973   {
    974     119, 179, 148, 164, 119,  85, 117, 149, 133,  98, 114, 115, 118,  99, 115, 100,
    975       135, 177, 147, 164, 119, 132, 148, 149,
    976   },
    977 };
    978 
    979 #if RESTRICT_GR1GR2FLAG_NUMBER
    980 static const UChar
    981 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] =
    982 {
    983   {
    984     86, 102, 115, 117, 101, 101,
    985   },
    986   {
    987     84, 117, 83, 100, 84, 117,
    988   },
    989   {
    990     84, 117, 83,  84, 84, 117,
    991   },
    992 };
    993 #else
    994 static const UChar
    995 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] =
    996 {
    997   {
    998     86, 103,  73, 102, 103,  73, 115, 117, 103, 117, 118, 103,
    999       101, 103, 104, 101, 167, 121,
    1000   },
    1001   {
    1002     84, 102,  88, 117, 118, 104, 83, 116, 118, 100, 117,  87,
    1003       84, 118, 120, 117, 150, 120,
    1004     },
    1005     {
    1006       84, 102,  88, 117, 118, 104, 83, 116, 118,  84, 117,  87,
    1007         84, 118, 120, 117, 150, 120,
    1008     },
    1009 };
    1010 #endif
    1011 #else
    1012 static const UChar
    1013 INIT_ONE_FLAG[3][NUM_ONE_FLAG_CTX] =
    1014 {
    1015   {
    1016     104,  68, 116,  86, 104, 132,  86,  87, 105, 134,  87, 103, 102,  66, 114,  68,  87,  84, 100, 101,  72,  69, 101,  86,
    1017     104, 130, 147, 149, 104, 196, 100, 165,
    1018   },
    1019   {
    1020     119, 179, 179, 164, 119,  85, 117, 149, 136, 103, 103, 103, 133,  98, 114, 115, 118,  99, 115, 116,  87, 100,  85, 117,
    1021     135, 146, 147, 164, 119, 148, 116, 133,
    1022   },
    1023   {
    1024     119, 179, 148, 164, 119,  85, 117, 149, 136,  87, 103, 103, 133,  98, 114, 115, 118,  99, 115, 100,  87,  84,  85,  85,
    1025     135, 177, 147, 164, 119, 132, 148, 149,
    1026   },
    1027 };
    1028 
    1029 #if RESTRICT_GR1GR2FLAG_NUMBER
    1030 static const UChar
    1031 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] =
    1032 {
    1033   {
    1034     86, 102, 103, 115, 117, 102, 101, 101,
    1035   },
    1036   {
    1037     84, 117, 103, 83, 100, 85, 84, 117,
    1038   },
    1039   {
    1040     84, 117, 87, 83, 84, 69, 84, 117,
    1041   },
    1042 };
    1043 #else
    1044 static const UChar
    1045 INIT_ABS_FLAG[3][NUM_ABS_FLAG_CTX] =
    1046 {
    1047   {
    1048     86, 103,  73, 102, 103,  73, 103,  88,  89, 115, 117, 103, 117, 118, 103, 102, 103,  72,
    1049     101, 103, 104, 101, 167, 121,
    1050   },
    1051   {
    1052     84, 102,  88, 117, 118, 104, 103, 119, 136,  83, 116, 118, 100, 117,  87,  85,  86, 103,
    1053     84, 118, 120, 117, 150, 120,
    1054   },
    1055   {
    1056     84, 102,  88, 117, 118, 104,  87, 119, 136,  83, 116, 118,  84, 117,  87,  69,  86,  87,
    1057     84, 118, 120, 117, 150, 120,
    1058   },
    1059 };
    1060 #endif
    1061 #endif
    1062 // initial probability for motion vector predictor index
    1063 static const UChar
    1064 INIT_MVP_IDX[3][NUM_MVP_IDX_CTX] =
    1065 {
    1066   {
    1067     CNU, CNU,
    1068    
    1069   },
    1070   {
    1071     134, CNU,
    1072    
    1073   },
    1074   {
    1075     134, CNU,
    1076    
    1077   },
    1078 };
    1079 
    1080 // initial probability for ALF flag
    1081 static const UChar
    1082 INIT_ALF_FLAG[3][NUM_ALF_FLAG_CTX] =
    1083 {
    1084   {
    1085     118,
    1086    
    1087   },
    1088   {
    1089     102,
    1090    
    1091   },
    1092   {
    1093     102,
    1094    
    1095   },
    1096 };
    1097 
    1098 // initial probability for ALF side information (unsigned)
    1099 static const UChar
    1100 INIT_ALF_UVLC[3][NUM_ALF_UVLC_CTX] =
    1101 {
    1102   {
    1103     120, 119,
    1104    
    1105   },
    1106   {
    1107     119, 119,
    1108    
    1109   },
    1110   {
    1111     119, 119,
    1112    
    1113   },
    1114 };
    1115 
    1116 // initial probability for ALF side information (signed)
    1117 static const UChar
    1118 INIT_ALF_SVLC[3][NUM_ALF_SVLC_CTX] =
    1119 {
    1120   {
    1121     139, 119, 124,
    1122    
    1123   },
    1124   {
    1125      90, 119, 140,
    1126    
    1127   },
    1128   {
    1129      90, 119, 124,
    1130    
    1131   },
    1132 };
    1133 
    1134 // initial probability for SAO flag
    1135 static const UChar
    1136 INIT_SAO_FLAG[3][NUM_SAO_FLAG_CTX] =
    1137 {
    1138   {
    1139     119,
    1140    
    1141   },
    1142   {
    1143     102,
    1144    
    1145   },
    1146   {
    1147     102,
    1148    
    1149   },
    1150 };
    1151 
    1152 // initial probability for SAO side information (unsigned)
    1153 static const UChar
    1154 INIT_SAO_UVLC[3][NUM_SAO_UVLC_CTX] =
    1155 {
    1156   {
    1157      61, 104,
    1158    
    1159   },
    1160   {
    1161     168, 120,
    1162    
    1163   },
    1164   {
    1165     184, 120,
    1166    
    1167   },
    1168 };
    1169 
    1170 // initial probability for SAO side information (signed)
    1171 static const UChar
    1172 INIT_SAO_SVLC[3][NUM_SAO_SVLC_CTX] =
    1173 {
    1174   {
    1175     171, 119, 199,
    1176    
    1177   },
    1178   {
    1179     169, 119, 151,
    1180    
    1181   },
    1182   {
    1183     169, 119, 151,
    1184    
    1185   },
    1186 };
    1187 
    1188 #if SAO_UNIT_INTERLEAVING
    1189 static const UChar
    1190 INIT_SAO_MERGE_LEFT_FLAG[3][NUM_SAO_MERGE_LEFT_FLAG_CTX] =
    1191 {
    1192   {
    1193     118, 118, 118,
    1194   },
    1195   {
    1196     102, 102, 102,
    1197     },
    1198     {
    1199       102, 102, 102,
    1200     },
    1201 };
    1202 
    1203 static const UChar
    1204 INIT_SAO_MERGE_UP_FLAG[3][NUM_SAO_MERGE_UP_FLAG_CTX] =
    1205 {
    1206   {
    1207     109,
    1208   },
    1209   {
    1210     102,
    1211   },
    1212   {
    1213     102,
    1214   },
    1215 };
    1216 static const UChar
    1217 INIT_SAO_TYPE_IDX[3][NUM_SAO_TYPE_IDX_CTX] =
    1218 {
    1219   {
    1220     64, 104
    1221   },
    1222   {
    1223   168, 120
    1224   },
    1225   {
    1226     184, 120
    1227   },
    1228 };
    1229 static const Short
    1230 INIT_SAO_RUN[3][NUM_SAO_RUN_CTX][2] =
    1231 {
    1232   {
    1233     {   11,   57 }, {   -1,   62 }, {    0,   64 }
    1234   },
    1235   {
    1236     {    6,   66 }, {   -1,   64 }, {    0,   64 }
    1237   },
    1238   {
    1239     {    1,   73 }, {    2,   61 }, {    0,   64 }
    1240   }
    1241 };
    1242 #endif
    1243 
    1244 static const UChar
    1245 INIT_TRANS_SUBDIV_FLAG[3][NUM_TRANS_SUBDIV_FLAG_CTX] =
    1246 {
    1247   {
    1248     CNU, 162, 148, 100, CNU, CNU, CNU, CNU, CNU, CNU,
    1249    
    1250   },
    1251   {
    1252     CNU,  71,  86,  55, CNU, CNU, CNU, CNU, CNU, CNU,
    1253    
    1254   },
    1255   {
    1256     CNU, 102,  86,  86, CNU, CNU, CNU, CNU, CNU, CNU,
    1257    
    1258   },
    1259 };
    1260 #endif
    1261 
    1262 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    1263 static const Short
    1264 INIT_DMM_FLAG[3][NUM_DMM_FLAG_CTX] =
    1265 {
    1266   {
    1267     CNU
    1268   },
    1269   {
    1270     CNU
    1271   },
    1272   {
    1273     CNU
    1274   }
    1275 };
    1276 
    1277 static const Short
    1278 INIT_DMM_MODE[3][NUM_DMM_MODE_CTX] =
    1279 {
    1280   {
    1281     CNU
    1282   },
    1283   {
    1284     CNU
    1285   },
    1286   {
    1287     CNU
    1288   }
    1289 };
    1290 
    1291 static const Short
    1292 INIT_DMM_DATA[3][NUM_DMM_DATA_CTX] =
    1293 {
    1294490  {
    1295491    CNU, CNU, CNU
     
    1301497    CNU, CNU, CNU
    1302498  }
     499#endif
    1303500};
    1304501
Note: See TracChangeset for help on using the changeset viewer.