Changeset 294 in 3DVCSoftware for branches/HTM-5.1-dev0/source/Lib/TLibDecoder


Ignore:
Timestamp:
19 Feb 2013, 20:33:52 (12 years ago)
Author:
tech
Message:

Removed HM-6.1 related guard macros.

Location:
branches/HTM-5.1-dev0/source/Lib/TLibDecoder
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/NALread.cpp

    r210 r294  
    124124  assert(forbidden_zero_bit == 0);
    125125
    126 #if NAL_REF_FLAG
    127126  nalu.m_nalRefFlag  = (bs.read(1) != 0 );
    128127  nalu.m_nalUnitType = (NalUnitType) bs.read(6);
    129 #else
    130   nalu.m_nalRefIDC   = (NalRefIdc) bs.read(2);
    131   nalu.m_nalUnitType = (NalUnitType) bs.read(5);
    132 #endif
    133128
    134129#if QC_MVHEVC_B0046
     
    137132  nalu.m_temporalId = bs.read(3) - 1;
    138133#else
    139 #if H0388
    140134  nalu.m_temporalId = bs.read(3);
    141135 //  unsigned reserved_one_5bits = bs.read(5);
     
    147141  nalu.m_isDepth  = bs.read(1);
    148142#endif
    149 #if H0566_TLA
    150143  if ( nalu.m_temporalId )
    151144  {
     
    157150  }
    158151#endif
    159 #else
    160   switch (nalu.m_nalUnitType)
    161   {
    162   case NAL_UNIT_CODED_SLICE:
    163   case NAL_UNIT_CODED_SLICE_IDR:
    164 #if H0566_TLA
    165 #if !QC_REM_IDV_B0046
    166   case NAL_UNIT_CODED_SLICE_IDV:
    167 #endif
    168   case NAL_UNIT_CODED_SLICE_CRA:
    169   case NAL_UNIT_CODED_SLICE_TLA:
    170 #else
    171   case NAL_UNIT_CODED_SLICE_CDR:
    172 #endif
    173     {
    174       nalu.m_temporalId = bs.read(3);
    175 #if VIDYO_VPS_INTEGRATION
    176       nalu.m_layerId    = bs.read(5) - 1;
    177 #else
    178       nalu.m_OutputFlag = bs.read(1);
    179   //    unsigned reserved_one_4bits = bs.read(4);
    180   //    assert(reserved_one_4bits == 1);
    181       nalu.m_viewId   = bs.read(3)-1;
    182       nalu.m_isDepth  = bs.read(1);
    183 #endif
    184 
    185 #if H0566_TLA
    186       if (nalu.m_temporalId == 0)
    187       {
    188 #if QC_REM_IDV_B0046
    189         assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR);
    190 #else
    191         assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV );
    192 #endif
    193       }
    194       else
    195       {
    196         assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA);
    197       }
    198 #endif
    199     }
    200     break;
    201   default:
    202     nalu.m_temporalId = 0;
    203     nalu.m_OutputFlag = true;
    204     break;
    205   }
    206 #endif
    207 #endif
    208152}
    209153//! \}
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecBinCoder.h

    r56 r294  
    5454  virtual Void  start             ()                                          = 0;
    5555  virtual Void  finish            ()                                          = 0;
    56 #if OL_FLUSH
    5756  virtual Void  flush            ()                                           = 0;
    58 #endif
    5957
    6058  virtual Void  decodeBin         ( UInt& ruiBin, ContextModel& rcCtxModel )  = 0;
     
    6462 
    6563  virtual Void  resetBac          ()                                          = 0;
    66 #if BURST_IPCM
    6764  virtual Void  decodeNumSubseqIPCM( Int& numSubseqIPCM )                  = 0;
    68 #endif
    6965  virtual Void  decodePCMAlignBits()                                          = 0;
    7066  virtual Void  xReadPCMCode      ( UInt uiLength, UInt& ruiCode)              = 0;
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp

    r56 r294  
    6565TDecBinCABAC::start()
    6666{
    67 #if !OL_FLUSH || OL_FLUSH_ALIGN
     67#if OL_FLUSH_ALIGN
    6868  assert( m_pcTComBitstream->getNumBitsUntilByteAligned() == 0 );
    6969#endif
     
    7272  m_bitsNeeded = -8;
    7373  m_uiValue    = m_pcTComBitstream->readByte() << 8;
    74 #if OL_FLUSH && !OL_FLUSH_ALIGN
     74#if !OL_FLUSH_ALIGN
    7575  m_uiLastByte = m_pcTComBitstream->readByte();
    7676  m_uiValue   |= m_uiLastByte;
     
    8585}
    8686
    87 #if OL_FLUSH
    8887Void
    8988TDecBinCABAC::flush()
     
    108107#endif // OL_FLUSH_ALIGN
    109108}
    110 #endif // OL_FLUSH
    111109
    112110/**
     
    122120  m_uiValue   = pcTDecBinCABAC->m_uiValue;
    123121  m_bitsNeeded= pcTDecBinCABAC->m_bitsNeeded;
    124 #if OL_FLUSH && !OL_FLUSH_ALIGN
     122#if !OL_FLUSH_ALIGN
    125123  m_uiLastByte= pcTDecBinCABAC->m_uiLastByte;
    126124#endif
     
    152150    {
    153151      m_bitsNeeded = -8;
    154 #if OL_FLUSH && !OL_FLUSH_ALIGN
     152#if !OL_FLUSH_ALIGN
    155153      m_uiLastByte = m_pcTComBitstream->readByte();
    156154      m_uiValue += m_uiLastByte;   
     
    173171    if ( m_bitsNeeded >= 0 )
    174172    {
    175 #if OL_FLUSH && !OL_FLUSH_ALIGN
     173#if !OL_FLUSH_ALIGN
    176174      m_uiLastByte = m_pcTComBitstream->readByte();
    177175      m_uiValue += m_uiLastByte << m_bitsNeeded;
     
    192190  {
    193191    m_bitsNeeded = -8;
    194 #if OL_FLUSH && !OL_FLUSH_ALIGN
     192#if !OL_FLUSH_ALIGN
    195193    m_uiLastByte = m_pcTComBitstream->readByte();
    196194    m_uiValue += m_uiLastByte;
     
    215213  while ( numBins > 8 )
    216214  {
    217 #if OL_FLUSH && !OL_FLUSH_ALIGN
     215#if !OL_FLUSH_ALIGN
    218216    m_uiLastByte = m_pcTComBitstream->readByte();
    219217    m_uiValue = ( m_uiValue << 8 ) + ( m_uiLastByte << ( 8 + m_bitsNeeded ) );
     
    241239  if ( m_bitsNeeded >= 0 )
    242240  {
    243 #if OL_FLUSH && !OL_FLUSH_ALIGN
     241#if !OL_FLUSH_ALIGN
    244242    m_uiLastByte = m_pcTComBitstream->readByte();
    245243    m_uiValue += m_uiLastByte << m_bitsNeeded;
     
    285283      {
    286284        m_bitsNeeded = -8;
    287 #if OL_FLUSH && !OL_FLUSH_ALIGN
     285#if !OL_FLUSH_ALIGN
    288286        m_uiLastByte = m_pcTComBitstream->readByte();
    289287        m_uiValue += m_uiLastByte;   
     
    306304}
    307305
    308 #if BURST_IPCM
    309306/** Decode subsequent_pcm_num.
    310307 * \param numSubseqIPCM
     
    323320    {
    324321      m_bitsNeeded = -8;
    325 #if OL_FLUSH && !OL_FLUSH_ALIGN
     322#if !OL_FLUSH_ALIGN
    326323      m_uiLastByte = m_pcTComBitstream->readByte();
    327324      m_uiValue += m_uiLastByte;
     
    342339  numSubseqIPCM --;
    343340}
    344 #endif
    345341
    346342/** Decode PCM alignment zero bits.
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecBinCoderCABAC.h

    r56 r294  
    5656  Void  start             ();
    5757  Void  finish            ();
    58 #if OL_FLUSH
    5958  Void  flush             ();
    60 #endif
    6159 
    6260  Void  decodeBin         ( UInt& ruiBin, ContextModel& rcCtxModel );
     
    6664 
    6765  Void  resetBac          ();
    68 #if BURST_IPCM
    6966  Void  decodeNumSubseqIPCM( Int& numSubseqIPCM ) ;
    70 #endif
    7167  Void  decodePCMAlignBits();
    7268  Void  xReadPCMCode      ( UInt uiLength, UInt& ruiCode );
     
    8278  UInt                m_uiRange;
    8379  UInt                m_uiValue;
    84 #if OL_FLUSH && !OL_FLUSH_ALIGN
     80#if !OL_FLUSH_ALIGN
    8581  UInt                m_uiLastByte;
    8682#endif
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r292 r294  
    169169  assert(m_pcBitstream->getNumBitsLeft() == 8); /* rsbp_trailing_bits */
    170170}
    171 #if RPS_IN_SPS
    172171void TDecCavlc::parseShortTermRefPicSet( TComSPS* sps, TComReferencePictureSet* rps, Int idx )
    173 #else
    174 void TDecCavlc::parseShortTermRefPicSet( TComPPS* pcPPS, TComReferencePictureSet* rps, Int idx )
    175 #endif
    176172{
    177173  UInt code;
     
    184180    Int rIdx =  idx - 1 - code;
    185181    assert (rIdx <= idx && rIdx >= 0);
    186 #if RPS_IN_SPS
    187182    TComReferencePictureSet*   rpsRef = sps->getRPSList()->getReferencePictureSet(rIdx);
    188 #else
    189     TComReferencePictureSet*   rpsRef = pcPPS->getRPSList()->getReferencePictureSet(rIdx);
    190 #endif
    191183    Int k = 0, k0 = 0, k1 = 0;
    192184    READ_CODE(1, bit, "delta_rps_sign"); // delta_RPS_sign
     
    265257  READ_FLAG(uiCode, "aps_scaling_list_data_present_flag"); aps->setScalingListEnabled( (uiCode==1)?true:false );
    266258  READ_FLAG(uiCode, "aps_deblocking_filter_flag");         aps->setLoopFilterOffsetInAPS( (uiCode==1)?true:false );
    267 #if !SAO_UNIT_INTERLEAVING
    268   READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag");    aps->setSaoEnabled( (uiCode==1)?true:false );
    269 #endif
    270 #if !LCU_SYNTAX_ALF
    271   READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag");      aps->setAlfEnabled( (uiCode==1)?true:false );
    272 #endif
    273259  if(aps->getScalingListEnabled())
    274260  {
    275261    parseScalingList( aps->getScalingList() );
    276262  }
    277 #if DBL_CONTROL
    278263  if(aps->getLoopFilterOffsetInAPS())
    279264  {
    280265    xParseDblParam( aps );   
    281266  }
    282 #endif
    283 #if SAO_UNIT_INTERLEAVING
    284267  READ_FLAG(uiCode, "aps_sao_interleaving_flag");      aps->setSaoInterleavingFlag( (uiCode==1)?true:false );
    285268  if(!aps->getSaoInterleavingFlag())
    286269  {
    287270    READ_FLAG(uiCode, "aps_sample_adaptive_offset_flag");      aps->setSaoEnabled( (uiCode==1)?true:false );
    288 #endif
    289271  if(aps->getSaoEnabled())
    290272  {
     
    292274    xParseSaoParam( aps->getSaoParam() );
    293275  }
    294 #if SAO_UNIT_INTERLEAVING
    295   }
    296 #endif
    297 #if LCU_SYNTAX_ALF
     276  }
    298277  READ_FLAG(uiCode, "aps_adaptive_loop_filter_flag");      aps->setAlfEnabled( (uiCode==1)?true:false );
    299 #endif
    300278  if(aps->getAlfEnabled())
    301279  {
    302 #if !LCU_SYNTAX_ALF
    303     aps->getAlfParam()->alf_flag = 1;
    304 #endif
    305280    xParseAlfParam( aps->getAlfParam());
    306281  }
     
    316291}
    317292
    318 #if DBL_CONTROL
    319293Void  TDecCavlc::xParseDblParam       ( TComAPS* aps )
    320294{
     
    333307  }
    334308}
    335 #endif
    336309/** parse SAO parameters
    337310 * \param pSaoParam
     
    341314  UInt uiSymbol;
    342315
    343 #if SAO_UNIT_INTERLEAVING
    344316  int i,j, compIdx;
    345317  int numCuInWidth;
     
    393365    }
    394366  }
    395 #else
    396   if (pSaoParam->bSaoFlag[0])
    397   {
    398     xParseSaoSplitParam (pSaoParam, 0, 0);
    399     xParseSaoOffsetParam(pSaoParam, 0, 0);
    400     READ_FLAG (uiSymbol, "sao_flag_cb");
    401     pSaoParam->bSaoFlag[1] = uiSymbol? true:false;
    402     if (pSaoParam->bSaoFlag[1])
    403     {
    404       xParseSaoSplitParam (pSaoParam, 0, 1);
    405       xParseSaoOffsetParam(pSaoParam, 0, 1);
    406     }
    407 
    408     READ_FLAG (uiSymbol, "sao_flag_cr");
    409     pSaoParam->bSaoFlag[2] = uiSymbol? true:false;
    410     if (pSaoParam->bSaoFlag[2])
    411     {
    412       xParseSaoSplitParam (pSaoParam, 0, 2);
    413       xParseSaoOffsetParam(pSaoParam, 0, 2);
    414     }
    415   }
    416 #endif
    417 }
    418 #if SAO_UNIT_INTERLEAVING
     367}
    419368/** copy SAO parameter
    420369 * \param dst 
     
    584533}
    585534
    586 #else
    587 /** Decode quadtree split flag
    588  * \param  pSaoParam, iPartIdx
    589  */
    590 Void TDecCavlc::xParseSaoSplitParam(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr)
    591 {
    592   UInt uiSymbol;
    593   SAOQTPart*  pSaoPart = NULL;
    594   pSaoPart= &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]);
    595 
    596   if(pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel)
    597   {
    598     READ_FLAG (uiSymbol, "sao_split_flag");
    599     pSaoPart->bSplit = uiSymbol? true:false;
    600     if(pSaoPart->bSplit)
    601     {
    602       for (Int i=0;i<NUM_DOWN_PART;i++)
    603       {
    604         xParseSaoSplitParam(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr);
    605       }
    606     }
    607   }
    608   else
    609   {
    610     pSaoPart->bSplit = false;
    611   }
    612 }
    613 
    614 /** Decode SAO for one partition
    615  * \param  pSaoParam, iPartIdx
    616  */
    617 Void TDecCavlc::xParseSaoOffsetParam(SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr)
    618 {
    619   UInt uiSymbol;
    620   Int iSymbol; 
    621   SAOQTPart*  pSaoPart = NULL;
    622   pSaoPart = &(pSaoParam->psSaoPart[iYCbCr][iPartIdx]);
    623 
    624   static Int iTypeLength[MAX_NUM_SAO_TYPE] = {
    625     SAO_EO_LEN,
    626     SAO_EO_LEN,
    627     SAO_EO_LEN,
    628     SAO_EO_LEN,
    629     SAO_BO_LEN,
    630     SAO_BO_LEN
    631   }; 
    632   if(!pSaoPart->bSplit)
    633   {
    634     READ_UVLC (uiSymbol, "sao_type_idx");
    635     if (uiSymbol)
    636     {
    637       pSaoPart->iBestType = uiSymbol-1;
    638       pSaoPart->bEnableFlag = true;
    639     }
    640     else
    641     {
    642       pSaoPart->iBestType = -1;
    643       pSaoPart->bEnableFlag = false;
    644     }
    645 
    646     if (pSaoPart->bEnableFlag)
    647     {
    648       pSaoPart->iLength = iTypeLength[pSaoPart->iBestType];
    649       for(Int i=0; i< pSaoPart->iLength; i++)
    650       {
    651         READ_SVLC (iSymbol, "sao_offset");
    652         pSaoPart->iOffset[i] = iSymbol;
    653       }
    654     }
    655     return;
    656   }
    657 
    658   //split
    659   if (pSaoPart->PartLevel < pSaoParam->iMaxSplitLevel)
    660   {
    661     for(Int i=0;i<NUM_DOWN_PART;i++)
    662     {
    663       xParseSaoOffsetParam(pSaoParam, pSaoPart->DownPartsIdx[i], iYCbCr);
    664     }
    665   }
    666 }
    667 #endif
    668 
    669 #if LCU_SYNTAX_ALF
     535
    670536Void TDecCavlc::xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS, Int firstLCUAddr, Bool acrossSlice, Int numLCUInWidth, Int numLCUInHeight)
    671537{
     
    931797}
    932798
    933 #endif
    934799
    935800Void TDecCavlc::xParseAlfParam(ALFParam* pAlfParam)
     
    937802  UInt uiSymbol;
    938803  Int iSymbol;
    939 #if ALF_SINGLE_FILTER_SHAPE
    940804  Int sqrFiltLengthTab[NUM_ALF_FILTER_SHAPE] = {ALF_FILTER_LEN};
    941 #else
    942   Int sqrFiltLengthTab[2] = { 9, 9};
    943 #endif
    944 
    945 #if LCU_SYNTAX_ALF
     805
    946806  switch(pAlfParam->componentID)
    947807  {
     
    961821  case ALF_Y:
    962822    {
    963 #endif
    964823  pAlfParam->filters_per_group = 0;
    965824  memset (pAlfParam->filterPattern, 0 , sizeof(Int)*NO_VAR_BINS);
    966 #if !LCU_SYNTAX_ALF
    967   READ_FLAG (uiSymbol, "alf_region_adaptation_flag");
    968   pAlfParam->alf_pcr_region_flag = uiSymbol; 
    969 #endif
    970 #if ALF_SINGLE_FILTER_SHAPE 
    971825  pAlfParam->filter_shape = 0;
    972 #else
    973   READ_UVLC (uiSymbol, "alf_length_luma_minus_5_div2");
    974   pAlfParam->filter_shape = uiSymbol;
    975 #endif
    976826  pAlfParam->num_coeff = sqrFiltLengthTab[pAlfParam->filter_shape];
    977827
     
    989839  {
    990840    pAlfParam->filters_per_group = 1;
    991 #if LCU_SYNTAX_ALF
    992 #if ALF_16_BA_GROUPS
    993841    Int numMergeFlags = 16;
    994 #else
    995     Int numMergeFlags = 15;
    996 #endif
    997 #else
    998 #if ALF_16_BA_GROUPS
    999     Int numMergeFlags = 16;
    1000 #else
    1001     Int numMergeFlags = pAlfParam->alf_pcr_region_flag ? 16 : 15;
    1002 #endif
    1003 #endif
    1004842    for (Int i=1; i<numMergeFlags; i++)
    1005843    {
     
    1021859  }
    1022860
    1023 #if ALF_SINGLE_FILTER_SHAPE
    1024861  Int minScanVal = MIN_SCAN_POS_CROSS;
    1025 #else
    1026   Int minScanVal = (pAlfParam->filter_shape == ALF_STAR5x5) ? 0: MIN_SCAN_POS_CROSS;
    1027 #endif
    1028862
    1029863  // Determine maxScanVal
     
    1036870
    1037871  // Golomb parameters
    1038 #if LCU_SYNTAX_ALF
    1039872  if( pAlfParam->filters_per_group > 1 )
    1040873  {
    1041 #endif
    1042874  READ_UVLC (uiSymbol, "alf_min_kstart_minus1");
    1043875  pAlfParam->minKStart = 1 + uiSymbol;
     
    1051883    kMin = pAlfParam->kMinTab[scanPos];
    1052884  }
    1053 #if LCU_SYNTAX_ALF
    1054   }
    1055 #endif
     885  }
    1056886
    1057887  Int scanPos;
     
    1061891    {
    1062892      scanPos = pDepthInt[i] - 1;
    1063 #if LCU_SYNTAX_ALF
    1064893      Int k = (pAlfParam->filters_per_group == 1) ? kTableTabShapes[ALF_CROSS9x7_SQUARE3x3][i] : pAlfParam->kMinTab[scanPos];
    1065894      pAlfParam->coeffmulti[idx][i] = xGolombDecode(k);
    1066 #else
    1067       pAlfParam->coeffmulti[idx][i] = xGolombDecode(pAlfParam->kMinTab[scanPos]);
    1068 #endif
    1069     }
    1070   }
    1071 #if LCU_SYNTAX_ALF
     895    }
     896  }
    1072897    }
    1073898    break;
     
    1079904    }
    1080905  }
    1081 #else
    1082   // filter parameters for chroma
    1083   READ_UVLC (uiSymbol, "alf_chroma_idc");
    1084   pAlfParam->chroma_idc = uiSymbol;
    1085 
    1086   if(pAlfParam->chroma_idc)
    1087   {
    1088 
    1089 #if ALF_SINGLE_FILTER_SHAPE
    1090     pAlfParam->filter_shape_chroma  = 0;
    1091 #else
    1092     READ_UVLC (uiSymbol, "alf_length_chroma_minus_5_div2");
    1093 
    1094     pAlfParam->filter_shape_chroma = uiSymbol;
    1095 #endif
    1096     pAlfParam->num_coeff_chroma = sqrFiltLengthTab[pAlfParam->filter_shape_chroma];
    1097     // filter coefficients for chroma
    1098     for(Int pos=0; pos<pAlfParam->num_coeff_chroma; pos++)
    1099     {
    1100       READ_SVLC (iSymbol, "alf_coeff_chroma");
    1101       pAlfParam->coeff_chroma[pos] = iSymbol;
    1102     }
    1103   }
    1104 #endif
    1105906}
    1106907
     
    1137938}
    1138939
    1139 #if TILES_OR_ENTROPY_SYNC_IDC
    1140940Void TDecCavlc::parsePPS(TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet)
    1141 #else
    1142 Void TDecCavlc::parsePPS(TComPPS* pcPPS)
    1143 #endif
    1144941{
    1145942#if ENC_DEC_TRACE 
     
    1150947  Int   iCode;
    1151948
    1152 #if !RPS_IN_SPS
    1153   TComRPSList* rpsList = pcPPS->getRPSList();
    1154 #endif
    1155949  READ_UVLC( uiCode, "pic_parameter_set_id");                      pcPPS->setPPSId (uiCode);
    1156950  READ_UVLC( uiCode, "seq_parameter_set_id");                      pcPPS->setSPSId (uiCode);
    1157951
    1158 #if MULTIBITS_DATA_HIDING
    1159952  READ_FLAG ( uiCode, "sign_data_hiding_flag" ); pcPPS->setSignHideFlag( uiCode );
    1160953  if( pcPPS->getSignHideFlag() )
     
    1162955    READ_CODE( 4, uiCode, "sign_hiding_threshold"); pcPPS->setTSIG(uiCode);
    1163956  }
    1164 #endif
    1165957
    1166958#if CABAC_INIT_FLAG
    1167959  READ_FLAG( uiCode,   "cabac_init_present_flag" );            pcPPS->setCabacInitPresentFlag( uiCode ? true : false );
    1168 #endif
    1169 #if !RPS_IN_SPS
    1170   // RPS is put before entropy_coding_mode_flag
    1171   // since entropy_coding_mode_flag will probably be removed from the WD
    1172   TComReferencePictureSet*      pcRPS;
    1173 
    1174   READ_UVLC( uiCode, "num_short_term_ref_pic_sets" );
    1175   rpsList->create(uiCode);
    1176 
    1177   for(Int i=0; i< rpsList->getNumberOfReferencePictureSets(); i++)
    1178   {
    1179     pcRPS = rpsList->getReferencePictureSet(i);
    1180     parseShortTermRefPicSet(pcPPS,pcRPS,i);
    1181   }
    1182   READ_FLAG( uiCode, "long_term_ref_pics_present_flag" );          pcPPS->setLongTermRefsPresent(uiCode);
    1183960#endif
    1184961  // entropy_coding_mode_flag
     
    1187964  if (pcPPS->getEntropyCodingMode())
    1188965  {
    1189 #if !WPP_SIMPLIFICATION
    1190     READ_UVLC( uiCode, "entropy_coding_synchro" );                 pcPPS->setEntropyCodingSynchro( uiCode );
    1191     READ_FLAG( uiCode, "cabac_istate_reset" );                     pcPPS->setCabacIstateReset( uiCode ? true : false );
    1192 #endif
    1193 #if !TILES_OR_ENTROPY_SYNC_IDC
    1194 #if !WPP_SIMPLIFICATION
    1195     if ( pcPPS->getEntropyCodingSynchro() )
    1196 #endif
    1197     {
    1198       READ_UVLC( uiCode, "num_substreams_minus1" );                pcPPS->setNumSubstreams(uiCode+1);
    1199     }
    1200 #endif
    1201   }
    1202 #if !H0566_TLA
    1203   READ_UVLC( uiCode, "num_temporal_layer_switching_point_flags" ); pcPPS->setNumTLayerSwitchingFlags( uiCode );
    1204   for ( UInt i = 0; i < pcPPS->getNumTLayerSwitchingFlags(); i++ )
    1205   {
    1206     READ_FLAG( uiCode, "temporal_layer_switching_point_flag" );    pcPPS->setTLayerSwitchingFlag( i, uiCode > 0 ? true : false );
    1207   }
    1208 #endif
     966  }
    1209967 
    1210968  // num_ref_idx_l0_default_active_minus1
     
    1241999//printf("TDecCavlc::parsePPS():\tm_bUseWeightPred=%d\tm_uiBiPredIdc=%d\n", pcPPS->getUseWP(), pcPPS->getWPBiPredIdc());
    12421000
    1243 #if H0388
    12441001  READ_FLAG( uiCode, "output_flag_present_flag" );
    12451002  pcPPS->setOutputFlagPresentFlag( uiCode==1 );
    1246 #endif
    1247 
    1248 #if TILES_OR_ENTROPY_SYNC_IDC
     1003
    12491004  if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==1)
    12501005  {
    1251 #endif
    12521006    READ_FLAG ( uiCode, "tile_info_present_flag" );
    12531007    pcPPS->setColumnRowInfoPresent(uiCode);
     
    12901044      Int iNumColTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumColumnsMinus1());
    12911045      Int iNumRowTilesMinus1 = (pcPPS->getColumnRowInfoPresent() == 1)?(pcPPS->getNumColumnsMinus1()):(pcPPS->getSPS()->getNumRowsMinus1());
    1292 #if !REMOVE_TILE_DEPENDENCE
    1293       pcPPS->setTileBoundaryIndependenceIdr( 1 ); //default
    1294 #endif
    12951046      pcPPS->setLFCrossTileBoundaryFlag(true); //default
    12961047
    12971048      if(iNumColTilesMinus1 !=0 || iNumRowTilesMinus1 !=0)
    12981049      {
    1299 #if !REMOVE_TILE_DEPENDENCE
    1300         READ_FLAG ( uiCode, "tile_boundary_independence_flag" ); 
    1301         pcPPS->setTileBoundaryIndependenceIdr( uiCode );
    1302 
    1303         if(pcPPS->getTileBoundaryIndependenceIdr() == 1)
    1304         {
    1305 #endif
    13061050          READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 
    13071051          pcPPS->setLFCrossTileBoundaryFlag( (uiCode == 1)?true:false );
    1308 #if !REMOVE_TILE_DEPENDENCE
    1309         }
    1310 #endif
    1311       }
    1312     }
    1313 #if TILES_OR_ENTROPY_SYNC_IDC
     1052      }
     1053    }
    13141054  }
    13151055  else if(parameterSet->getPrefetchedSPS(pcPPS->getSPSId())->getTilesOrEntropyCodingSyncIdc()==2)
     
    13171057    READ_UVLC( uiCode, "num_substreams_minus1" );                pcPPS->setNumSubstreams(uiCode+1);
    13181058  }
    1319 #endif
    1320 
    1321 #if DBL_CONTROL
     1059
    13221060  READ_FLAG( uiCode, "deblocking_filter_control_present_flag" );
    13231061  pcPPS->setDeblockingFilterControlPresent( uiCode ? true : false);
    1324 #endif
    1325 #if PARALLEL_MERGE
    13261062  READ_UVLC( uiCode, "log2_parallel_merge_level_minus2");
    13271063  assert(uiCode == LOG2_PARALLEL_MERGE_LEVEL_MINUS2);
    13281064  pcPPS->setLog2ParallelMergeLevelMinus2 (uiCode);
    1329 #endif
    13301065
    13311066  READ_FLAG( uiCode, "pps_extension_flag");
     
    14961231  READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    14971232  READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
    1498 #if PIC_CROPPING
    14991233  READ_FLAG(     uiCode, "pic_cropping_flag");                   pcSPS->setPicCroppingFlag ( uiCode ? true : false );
    15001234  if (uiCode != 0)
     
    15051239    READ_UVLC(   uiCode, "pic_crop_bottom_offset" );             pcSPS->setPicCropBottomOffset( uiCode );
    15061240  }
    1507 #endif
    15081241
    15091242#if FULL_NBIT
     
    15251258#endif
    15261259
    1527 #if H0736_AVC_STYLE_QP_RANGE
    15281260  pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    1529 #endif
    15301261
    15311262  g_uiBASE_MAX  = ((1<<(g_uiBitDepth))-1);
     
    15371268#endif
    15381269  READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    1539 #if H0736_AVC_STYLE_QP_RANGE
    15401270  pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    1541 #endif
    15421271
    15431272  READ_FLAG( uiCode, "pcm_enabled_flag" ); pcSPS->setUsePCM( uiCode ? true : false );
     
    15541283
    15551284  READ_UVLC( uiCode,    "log2_max_pic_order_cnt_lsb_minus4" );   pcSPS->setBitsForPOC( 4 + uiCode );
    1556 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    15571285  for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)
    15581286  {
     
    15641292    pcSPS->setMaxLatencyIncrease( uiCode, i );
    15651293  }
    1566 #else
    1567   READ_UVLC( uiCode,    "max_num_ref_pics" );                    pcSPS->setMaxNumberOfReferencePictures(uiCode);
    1568   READ_UVLC( uiCode,    "num_reorder_frames" );                  pcSPS->setNumReorderFrames(uiCode);
    1569   READ_UVLC ( uiCode, "max_dec_frame_buffering");
    1570   pcSPS->setMaxDecFrameBuffering( uiCode );
    1571   READ_UVLC ( uiCode, "max_latency_increase");
    1572   pcSPS->setMaxLatencyIncrease( uiCode );
    1573 #endif
    1574 
    1575 #if H0412_REF_PIC_LIST_RESTRICTION
     1294
    15761295  READ_FLAG( uiCode, "restricted_ref_pic_lists_flag" );
    15771296  pcSPS->setRestrictedRefPicListsFlag( uiCode );
     
    15851304    pcSPS->setListsModificationPresentFlag(true);
    15861305  }
    1587 #endif
    15881306  READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" );
    15891307  UInt log2MinCUSize = uiCode + 3;
     
    16281346  READ_FLAG( uiCode, "sample_adaptive_offset_enabled_flag" );       pcSPS->setUseSAO ( uiCode ? true : false ); 
    16291347  READ_FLAG( uiCode, "adaptive_loop_filter_enabled_flag" );         pcSPS->setUseALF ( uiCode ? true : false );
    1630 #if LCU_SYNTAX_ALF
    16311348  if(pcSPS->getUseALF())
    16321349  {
    16331350    READ_FLAG( uiCode, "alf_coef_in_slice_flag" );      pcSPS->setUseALFCoefInSlice ( uiCode ? true : false );
    16341351  }
    1635 #endif
    16361352  if( pcSPS->getUsePCM() )
    16371353  {
     
    16421358
    16431359
    1644 #if RPS_IN_SPS
    16451360  TComRPSList* rpsList = pcSPS->getRPSList();
    16461361  TComReferencePictureSet* rps;
     
    16551370  }
    16561371  READ_FLAG( uiCode, "long_term_ref_pics_present_flag" );          pcSPS->setLongTermRefsPresent(uiCode);
    1657 #endif
    1658 #if !PIC_CROPPING
    1659   //!!!KS: Syntax not in WD !!!
    1660 
    1661   xReadUvlc ( uiCode ); pcSPS->setPadX        ( uiCode    );
    1662   xReadUvlc ( uiCode ); pcSPS->setPadY        ( uiCode    );
    1663 #endif
    16641372 
    16651373  // AMVP mode for each depth (AM_NONE or AM_EXPL)
     
    16701378  }
    16711379
    1672 #if TILES_WPP_ENTRY_POINT_SIGNALLING
    16731380  READ_CODE(2, uiCode, "tiles_or_entropy_coding_sync_idc");         pcSPS->setTilesOrEntropyCodingSyncIdc(uiCode);
    1674 #endif
    1675 
    1676 #if TILES_OR_ENTROPY_SYNC_IDC
     1381
    16771382  if(pcSPS->getTilesOrEntropyCodingSyncIdc() == 1)
    16781383  {
    1679 #endif
    16801384    READ_UVLC ( uiCode, "num_tile_columns_minus1" );
    16811385    pcSPS->setNumColumnsMinus1( uiCode ); 
     
    17041408      free(rowHeight); 
    17051409    }
    1706 #if !REMOVE_TILE_DEPENDENCE
    1707     pcSPS->setTileBoundaryIndependenceIdr( 1 ); //default
    1708 #endif
    17091410    pcSPS->setLFCrossTileBoundaryFlag(true); //default
    17101411
    17111412    if( pcSPS->getNumColumnsMinus1() !=0 || pcSPS->getNumRowsMinus1() != 0)
    17121413    {
    1713 #if !REMOVE_TILE_DEPENDENCE
    1714       READ_FLAG ( uiCode, "tile_boundary_independence_flag" ); 
    1715       pcSPS->setTileBoundaryIndependenceIdr( uiCode );
    1716       if(pcSPS->getTileBoundaryIndependenceIdr() == 1)
    1717       {
    1718 #endif
    17191414        READ_FLAG ( uiCode, "loop_filter_across_tile_flag" ); 
    17201415        pcSPS->setLFCrossTileBoundaryFlag( (uiCode==1)?true:false);
    1721 #if !REMOVE_TILE_DEPENDENCE
    1722       }
    1723 #endif
    1724     }
    1725 #if TILES_OR_ENTROPY_SYNC_IDC
    1726   }
    1727 #endif
     1416    }
     1417  }
    17281418  READ_FLAG( uiCode, "sps_extension_flag");
    17291419#if !QC_MVHEVC_B0046
     
    18941584}
    18951585
    1896 #if LCU_SYNTAX_ALF
    18971586#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    18981587Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)
    18991588#else
    19001589Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)
    1901 #endif
    1902 #else
    1903 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl)
    19041590#endif
    19051591{
     
    19881674    rpcSlice->setSPS(sps);
    19891675    rpcSlice->setPPS(pps);
    1990 #if H0388
    19911676    if( pps->getOutputFlagPresentFlag() )
    19921677    {
     
    19981683      rpcSlice->setPicOutputFlag( true );
    19991684    }
    2000 #endif
    20011685#if QC_REM_IDV_B0046
    20021686#if !QC_MVHEVC_B0046
     
    20651749        {
    20661750          rps = rpcSlice->getLocalRPS();
    2067 #if RPS_IN_SPS
    20681751          parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets());
    2069 #else
    2070           parseShortTermRefPicSet(pps,rps, pps->getRPSList()->getNumberOfReferencePictureSets());
    2071 #endif
    20721752          rpcSlice->setRPS(rps);
    20731753        }
    20741754        else // use reference to short-term reference picture set in PPS
    20751755        {
    2076 #if RPS_IN_SPS
    20771756          READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode));
    2078 #else
    2079           READ_UVLC( uiCode, "short_term_ref_pic_set_idx"); rpcSlice->setRPS(pps->getRPSList()->getReferencePictureSet(uiCode));
    2080 #endif
    20811757          rps = rpcSlice->getRPS();
    20821758        }
    2083 #if RPS_IN_SPS
    20841759        if(sps->getLongTermRefsPresent())
    2085 #else
    2086         if(pps->getLongTermRefsPresent())
    2087 #endif
    20881760        {
    20891761          Int offset = rps->getNumberOfNegativePictures()+rps->getNumberOfPositivePictures();
    20901762          READ_UVLC( uiCode, "num_long_term_pics");             rps->setNumberOfLongtermPictures(uiCode);
    20911763          Int prev = 0;
    2092 #if LTRP_MULT
    20931764          Int prevMsb=0;
    20941765          Int prevDeltaPocLt=0;
    2095 #endif
    20961766          for(Int j=rps->getNumberOfLongtermPictures()+offset-1 ; j > offset-1; j--)
    20971767          {
     
    20991769            prev += uiCode;
    21001770
    2101 #if LTRP_MULT
    21021771            READ_FLAG(uiCode,"delta_poc_msb_present_flag");
    21031772            Int decDeltaPOCMsbPresent=uiCode;
     
    21201789            else
    21211790            {
    2122 #endif
    21231791              rps->setPOC(j,rpcSlice->getPOC()-prev);         
    21241792              rps->setDeltaPOC(j,-(Int)prev);
    2125 #if LTRP_MULT
    21261793            }
    21271794            prevDeltaPocLt=prev;
    2128 #endif
    21291795            READ_FLAG( uiCode, "used_by_curr_pic_lt_flag");     rps->setUsed(j,uiCode);
    21301796          }
     
    21451811      if (sps->getUseSAO())
    21461812      {
    2147 #if SAO_UNIT_INTERLEAVING
    21481813        READ_FLAG(uiCode, "slice_sao_interleaving_flag");        rpcSlice->setSaoInterleavingFlag(uiCode);
    2149 #endif
    21501814        READ_FLAG(uiCode, "slice_sample_adaptive_offset_flag");  rpcSlice->setSaoEnabledFlag((Bool)uiCode);
    2151 #if SAO_UNIT_INTERLEAVING
    21521815        if (rpcSlice->getSaoEnabledFlag() && rpcSlice->getSaoInterleavingFlag())
    21531816        {
     
    21601823          rpcSlice->setSaoEnabledFlagCr(0);
    21611824        }
    2162 #endif
    21631825      }
    21641826      READ_UVLC (    uiCode, "aps_id" );  rpcSlice->setAPSId(uiCode);
     
    21881850    if( !rpcSlice->isIntra() )
    21891851    {
    2190 #if H0412_REF_PIC_LIST_RESTRICTION
    21911852#if QC_MVHEVC_B0046
    21921853    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     
    21991860      else
    22001861      {
    2201 #endif
    22021862        READ_FLAG( uiCode, "ref_pic_list_modification_flag_l0" ); refPicListModification->setRefPicListModificationFlagL0( uiCode ? 1 : 0 );
    2203 #if H0412_REF_PIC_LIST_RESTRICTION
    2204       }
    2205 #endif
     1863      }
    22061864     
    22071865      if(refPicListModification->getRefPicListModificationFlagL0())
     
    22091867        uiCode = 0;
    22101868        Int i = 0;
    2211 #if H0137_0138_LIST_MODIFICATION
    22121869        Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc();
    22131870        if ( NumPocTotalCurr > 1 )
     
    22321889          }
    22331890        }
    2234 #else
    2235         Int list_modification_idc = 0;
    2236         while(list_modification_idc != 3) 
    2237         {
    2238           READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL0(i, uiCode );
    2239           list_modification_idc = uiCode;
    2240           if(uiCode != 3)
    2241           {
    2242             READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL0(i, uiCode );
    2243           }
    2244           i++;
    2245         }
    2246         refPicListModification->setNumberOfRefPicListModificationsL0(i-1);
    2247 #endif
    2248       }
    2249 #if !H0137_0138_LIST_MODIFICATION
    2250       else
    2251       {
    2252         refPicListModification->setNumberOfRefPicListModificationsL0(0);
    2253       }
    2254 #endif
     1891      }
    22551892    }
    22561893    else
    22571894    {
    22581895      refPicListModification->setRefPicListModificationFlagL0(0);
    2259 #if !H0137_0138_LIST_MODIFICATION
    2260       refPicListModification->setNumberOfRefPicListModificationsL0(0);
    2261 #endif
    22621896    }
    22631897    if(rpcSlice->isInterB())
    22641898    {
    2265 #if H0412_REF_PIC_LIST_RESTRICTION
    22661899#if QC_MVHEVC_B0046
    22671900    if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() )
     
    22741907      else
    22751908      {
    2276 #endif
    22771909        READ_FLAG( uiCode, "ref_pic_list_modification_flag_l1" ); refPicListModification->setRefPicListModificationFlagL1( uiCode ? 1 : 0 );
    2278 #if H0412_REF_PIC_LIST_RESTRICTION
    2279       }
    2280 #endif
     1910      }
    22811911      if(refPicListModification->getRefPicListModificationFlagL1())
    22821912      {
    22831913        uiCode = 0;
    22841914        Int i = 0;
    2285 #if H0137_0138_LIST_MODIFICATION
    22861915        Int NumPocTotalCurr = rpcSlice->getNumPocTotalCurrMvc();
    22871916        if ( NumPocTotalCurr > 1 )
     
    23061935          }
    23071936        }
    2308 #else
    2309         Int list_modification_idc = 0;
    2310         while(list_modification_idc != 3) 
    2311         {
    2312           READ_UVLC( uiCode, "list_modification_idc" ); refPicListModification->setListIdcL1(i, uiCode );
    2313           list_modification_idc = uiCode;
    2314           if(uiCode != 3)
    2315           {
    2316             READ_UVLC( uiCode, "ref_pic_set_idx" ); refPicListModification->setRefPicSetIdxL1(i, uiCode );
    2317           }
    2318           i++;
    2319         }
    2320         refPicListModification->setNumberOfRefPicListModificationsL1(i-1);
    2321 #endif
    2322       }
    2323 #if !H0137_0138_LIST_MODIFICATION
    2324       else
    2325       {
    2326         refPicListModification->setNumberOfRefPicListModificationsL1(0);
    2327       }
    2328 #endif
     1937      }
    23291938    } 
    23301939    else
    23311940    {
    23321941      refPicListModification->setRefPicListModificationFlagL1(0);
    2333 #if !H0137_0138_LIST_MODIFICATION
    2334       refPicListModification->setNumberOfRefPicListModificationsL1(0);
    2335 #endif
    23361942    }
    23371943  }
     
    23511957      READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" );      rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 );
    23521958     
    2353 #if H0412_REF_PIC_LIST_RESTRICTION
    23541959#if QC_MVHEVC_B0046
    23551960    if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() )
     
    23581963#endif
    23591964      {
    2360 #endif
    23611965        READ_FLAG( uiCode, "ref_pic_list_modification_flag_lc" ); rpcSlice->setRefPicListModificationFlagLC( uiCode ? 1 : 0 );
    23621966        if(uiCode)
     
    23661970            READ_FLAG( uiCode, "pic_from_list_0_flag" );
    23671971            rpcSlice->setListIdFromIdxOfLC(i, uiCode);
    2368 #if H0137_0138_LIST_MODIFICATION
    23691972          if (((rpcSlice->getListIdFromIdxOfLC(i) == REF_PIC_LIST_0) && (rpcSlice->getNumRefIdx( REF_PIC_LIST_0 ) == 1)) || ((rpcSlice->getListIdFromIdxOfLC(i) == REF_PIC_LIST_1) && (rpcSlice->getNumRefIdx( REF_PIC_LIST_1 ) == 1)) )
    23701973          {
     
    23751978            READ_UVLC( uiCode, "ref_idx_list_curr" );
    23761979          }
    2377 #else
    2378             READ_UVLC( uiCode, "ref_idx_list_curr" );
    2379 #endif
    23801980            rpcSlice->setRefIdxFromIdxOfLC(i, uiCode);
    23811981            rpcSlice->setRefIdxOfLC((RefPicList)rpcSlice->getListIdFromIdxOfLC(i), rpcSlice->getRefIdxFromIdxOfLC(i), i);
    23821982          }
    23831983        }
    2384 #if H0412_REF_PIC_LIST_RESTRICTION
    23851984      }
    23861985      else
     
    23881987        rpcSlice->setRefPicListModificationFlagLC(false);
    23891988      }
    2390 #endif
    23911989    }
    23921990    else
     
    24011999  }
    24022000 
    2403 #if H0111_MVD_L1_ZERO
    24042001  if (rpcSlice->isInterB())
    24052002  {
    24062003    READ_FLAG( uiCode, "mvd_l1_zero_flag" );       rpcSlice->setMvdL1ZeroFlag( (uiCode ? true : false) );
    24072004  }
    2408 #endif
    24092005
    24102006#if CABAC_INIT_FLAG
     
    24322028    rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode);
    24332029
    2434 #if H0736_AVC_STYLE_QP_RANGE
    24352030    assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() );
    24362031    assert( rpcSlice->getSliceQp() <=  51 );
    2437 #endif
    2438 
    2439 #if DBL_CONTROL
     2032
    24402033    if (rpcSlice->getPPS()->getDeblockingFilterControlPresent())
    24412034    {
     
    24472040        rpcSlice->setInheritDblParamFromAPS(0);
    24482041      }
    2449 #else
    2450     READ_FLAG ( uiCode, "inherit_dbl_param_from_APS_flag" ); rpcSlice->setInheritDblParamFromAPS(uiCode ? 1 : 0);
    2451 #endif
    24522042      if(!rpcSlice->getInheritDblParamFromAPS())
    24532043      {
     
    24592049        }
    24602050      }
    2461 #if DBL_CONTROL
    24622051   }
    2463 #endif
    24642052    if ( rpcSlice->getSliceType() == B_SLICE )
    24652053    {
     
    25312119
    25322120      Int uiNumCUsInFrame = uiNumLCUsInWidth* uiNumLCUsInHeight;
    2533 #if LCU_SYNTAX_ALF
    25342121      if(sps->getUseALFCoefInSlice())
    25352122      {
     
    25442131      if(!sps->getUseALFCoefInSlice())
    25452132      {
    2546 #endif
    25472133      xParseAlfCuControlParam(alfCUCtrl, uiNumCUsInFrame);
    2548 #if LCU_SYNTAX_ALF
    2549       }
    2550 #endif
     2134      }
    25512135
    25522136    }
     
    25572141  if (!bEntropySlice)
    25582142  {
    2559 #if !REMOVE_TILE_DEPENDENCE
    2560     if (sps->getTileBoundaryIndependenceIdr())
    2561     {   
    2562 #endif
    25632143    xReadCode(1, uiCode); // read flag indicating if tile markers transmitted
    25642144    rpcSlice->setTileMarkerFlag( uiCode );
    2565 #if !REMOVE_TILE_DEPENDENCE
    2566     }
    2567 #endif
    2568   }
    2569 
    2570 #if TILES_WPP_ENTRY_POINT_SIGNALLING
     2145  }
     2146
    25712147  Int tilesOrEntropyCodingSyncIdc = rpcSlice->getSPS()->getTilesOrEntropyCodingSyncIdc();
    25722148  UInt *entryPointOffset          = NULL;
     
    26292205    delete [] entryPointOffset;
    26302206  }
    2631 #else
    2632 #if WPP_SIMPLIFICATION
    2633   if (pps->getNumSubstreams() > 1)
    2634 #else
    2635   if (pps->getEntropyCodingSynchro())
    2636 #endif
    2637   {
    2638     UInt uiNumSubstreams = pps->getNumSubstreams();
    2639     rpcSlice->allocSubstreamSizes(uiNumSubstreams);
    2640     UInt *puiSubstreamSizes = rpcSlice->getSubstreamSizes();
    2641 
    2642     for (UInt ui = 0; ui+1 < uiNumSubstreams; ui++)
    2643     {
    2644       xReadCode(2, uiCode);
    2645      
    2646       switch ( uiCode )
    2647       {
    2648       case 0:
    2649         xReadCode(8,  uiCode);
    2650         break;
    2651       case 1:
    2652         xReadCode(16, uiCode);
    2653         break;
    2654       case 2:
    2655         xReadCode(24, uiCode);
    2656         break;
    2657       case 3:
    2658         xReadCode(32, uiCode);
    2659         break;
    2660       default:
    2661         printf("Error in parseSliceHeader\n");
    2662         exit(-1);
    2663         break;
    2664       }
    2665       puiSubstreamSizes[ui] = uiCode;
    2666     }
    2667   }
    2668 #endif
    26692207
    26702208  if (!bEntropySlice)
    26712209  {
    26722210    // Reading location information
    2673 #if !REMOVE_TILE_DEPENDENCE
    2674     if (sps->getTileBoundaryIndependenceIdr())
    2675     {   
    2676 #endif
    2677 #if !TILES_WPP_ENTRY_POINT_SIGNALLING
    2678       xReadCode(1, uiCode); // read flag indicating if location information signaled in slice header
    2679       Bool bTileLocationInformationInSliceHeaderFlag = (uiCode)? true : false;
    2680 
    2681       if (bTileLocationInformationInSliceHeaderFlag)
    2682       {
    2683         // location count
    2684         xReadCode(5, uiCode); // number of tiles for which location information signaled
    2685         rpcSlice->setTileLocationCount ( uiCode + 1 );
    2686 
    2687         xReadCode(5, uiCode); // number of bits used by diff
    2688         Int iBitsUsedByDiff = uiCode + 1;
    2689 
    2690         // read out tile start location
    2691         Int iLastSize = 0;
    2692         for (UInt uiIdx=0; uiIdx<rpcSlice->getTileLocationCount(); uiIdx++)
    2693         {
    2694           Int iAbsDiff, iCurSize, iCurDiff;
    2695           if (uiIdx==0)
    2696           {
    2697             xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff  = uiCode;
    2698             rpcSlice->setTileLocation( uiIdx, iAbsDiff );
    2699             iCurDiff  = iAbsDiff;
    2700             iLastSize = iAbsDiff;
    2701           }
    2702           else
    2703           {
    2704             xReadCode(1, uiCode); // read sign
    2705             Int iSign = (uiCode) ? -1 : +1;
    2706 
    2707             xReadCode(iBitsUsedByDiff-1, uiCode); iAbsDiff  = uiCode;
    2708             iCurDiff  = (iSign) * iAbsDiff;
    2709             iCurSize  = iLastSize + iCurDiff;
    2710             iLastSize = iCurSize;
    2711             rpcSlice->setTileLocation( uiIdx, rpcSlice->getTileLocation( uiIdx-1 ) + iCurSize ); // calculate byte location
    2712           }
    2713         }
    2714       }
    2715 #endif
    27162211
    27172212      // read out trailing bits
    27182213    m_pcBitstream->readOutTrailingBits();
    2719 #if !REMOVE_TILE_DEPENDENCE
    2720     }
    2721 #endif
    27222214  }
    27232215  return;
     
    28142306Void TDecCavlc::parseIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    28152307{
    2816 #if BURST_IPCM
    28172308  assert(0);
    2818 #else
    2819   UInt uiSymbol;
    2820 
    2821   xReadFlag( uiSymbol );
    2822 
    2823   if ( uiSymbol )
    2824   {
    2825     Bool bIpcmFlag   = true;
    2826 
    2827     xReadPCMAlignZero();
    2828 
    2829     pcCU->setPartSizeSubParts  ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
    2830     pcCU->setSizeSubParts      ( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth );
    2831     pcCU->setIPCMFlagSubParts  ( bIpcmFlag, uiAbsPartIdx, uiDepth );
    2832 
    2833     UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();
    2834     UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    2835     UInt uiChromaOffset = uiLumaOffset>>2;
    2836 
    2837     Pel* piPCMSample;
    2838     UInt uiWidth;
    2839     UInt uiHeight;
    2840     UInt uiSampleBits;
    2841     UInt uiX, uiY;
    2842 
    2843     piPCMSample = pcCU->getPCMSampleY() + uiLumaOffset;
    2844     uiWidth = pcCU->getWidth(uiAbsPartIdx);
    2845     uiHeight = pcCU->getHeight(uiAbsPartIdx);
    2846     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthLuma();
    2847 
    2848     for(uiY = 0; uiY < uiHeight; uiY++)
    2849     {
    2850       for(uiX = 0; uiX < uiWidth; uiX++)
    2851       {
    2852         UInt uiSample;
    2853         xReadCode(uiSampleBits, uiSample);
    2854 
    2855         piPCMSample[uiX] = uiSample;
    2856       }
    2857       piPCMSample += uiWidth;
    2858     }
    2859 
    2860     piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;
    2861     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    2862     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    2863     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    2864 
    2865     for(uiY = 0; uiY < uiHeight; uiY++)
    2866     {
    2867       for(uiX = 0; uiX < uiWidth; uiX++)
    2868       {
    2869         UInt uiSample;
    2870         xReadCode(uiSampleBits, uiSample);
    2871         piPCMSample[uiX] = uiSample;
    2872       }
    2873       piPCMSample += uiWidth;
    2874     }
    2875 
    2876     piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;
    2877     uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;
    2878     uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;
    2879     uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
    2880 
    2881     for(uiY = 0; uiY < uiHeight; uiY++)
    2882     {
    2883       for(uiX = 0; uiX < uiWidth; uiX++)
    2884       {
    2885         UInt uiSample;
    2886         xReadCode(uiSampleBits, uiSample);
    2887         piPCMSample[uiX] = uiSample;
    2888       }
    2889       piPCMSample += uiWidth;
    2890     }
    2891   }
    2892 #endif
    28932309}
    28942310
     
    29202336Void TDecCavlc::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    29212337{
    2922 #if H0736_AVC_STYLE_QP_RANGE
    29232338  Int qp;
    2924 #else
    2925   UInt uiQp;
    2926 #endif
    29272339  Int  iDQp;
    29282340 
    29292341  xReadSvlc( iDQp );
    29302342
    2931 #if H0736_AVC_STYLE_QP_RANGE
    29322343  Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY();
    29332344  qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) -  qpBdOffsetY;
    2934 #else
    2935   uiQp = pcCU->getRefQP( uiAbsPartIdx ) + iDQp;
    2936 #endif
    29372345
    29382346  UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ;
    29392347  UInt uiQpCUDepth =   min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ;
    29402348
    2941 #if H0736_AVC_STYLE_QP_RANGE
    29422349  pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth );
    2943 #else
    2944   pcCU->setQPSubParts( uiQp, uiAbsQpCUPartIdx, uiQpCUDepth );
    2945 #endif
    29462350}
    29472351
     
    34072811          READ_UVLC( code, "scaling_list_pred_matrix_id_delta");
    34082812          scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code+1)));
    3409 #if SCALING_LIST
    34102813          if( sizeId > SCALING_LIST_8x8 )
    34112814          {
    34122815            scalingList->setScalingListDC(sizeId,listId,scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId)));
    34132816          }
    3414 #endif
    34152817          scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId));
    34162818         
     
    34332835Void TDecCavlc::xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId)
    34342836{
    3435 #if SCALING_LIST
    34362837  Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]);
    34372838  Int data;
     
    34732874    }
    34742875  }
    3475 #else
    3476   Int i,coefNum = g_scalingListSize[sizeId];
    3477   Int data;
    3478   Int nextCoef = SCALING_LIST_START_VALUE;
    3479   UInt* scan  = g_auiFrameScanXY [ sizeId + 1 ];
    3480   Int *dst = scalingList->getScalingListAddress(sizeId, listId);
    3481 
    3482   for(i = 0; i < coefNum; i++)
    3483   {
    3484     READ_SVLC( data, "scaling_list_delta_coef");
    3485     nextCoef = (nextCoef + data + 256 ) % 256;
    3486     dst[scan[i]] = nextCoef;
    3487   }
    3488 #endif
    34892876}
    34902877
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h

    r292 r294  
    8282  UInt  xGetBit             ();
    8383 
    84 #if RPS_IN_SPS
    8584  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
    86 #else
    87   void  parseShortTermRefPicSet            (TComPPS* pcPPS, TComReferencePictureSet* pcRPS, Int idx);
    88 #endif
    8985private:
    9086  TComInputBitstream*   m_pcBitstream;
     
    123119  Void  parseSPS            ( TComSPS* pcSPS );
    124120#endif
    125 #if TILES_OR_ENTROPY_SYNC_IDC
    126121  Void  parsePPS            ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet);
    127 #else
    128   Void  parsePPS            ( TComPPS* pcPPS);
    129 #endif
    130122  Void  parseSEI(SEImessages&);
    131123  Void  parseAPS            ( TComAPS* pAPS );
    132 #if LCU_SYNTAX_ALF
    133124#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    134125  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth);
    135126#else
    136127  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet);
    137 #endif
    138 #else
    139   Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl );
    140128#endif
    141129  Void  parseTerminatingBit ( UInt& ruiBit );
     
    175163  Void readTileMarker     ( UInt& uiTileIdx, UInt uiBitsUsed );
    176164  Void updateContextTables  ( SliceType eSliceType, Int iQp ) { return; }
    177 #if OL_FLUSH
    178165  Void decodeFlush() {};
    179 #endif
    180166
    181167  Void xParsePredWeightTable ( TComSlice* pcSlice );
     
    190176#endif
    191177protected:
    192 #if DBL_CONTROL
    193178  Void  xParseDblParam       ( TComAPS* aps );
    194 #endif
    195179  Void  xParseSaoParam       ( SAOParam* pSaoParam );
    196 #if SAO_UNIT_INTERLEAVING
    197180  Void  xParseSaoOffset      (SaoLcuParam* saoLcuParam);
    198181  Void  xParseSaoUnit        (Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool& repeatedRow );
    199 #else
    200   Void  xParseSaoSplitParam  ( SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr );
    201   Void  xParseSaoOffsetParam ( SAOParam* pSaoParam, Int iPartIdx, Int iYCbCr );
    202 #endif
    203 #if LCU_SYNTAX_ALF
    204182  Void  xParseAlfParam(AlfParamSet* pAlfParamSet, Bool bSentInAPS = true, Int firstLCUAddr = 0, Bool acrossSlice = true, Int numLCUInWidth= -1, Int numLCUInHeight= -1);
    205183  Void  parseAlfParamSet(AlfParamSet* pAlfParamSet, Int firstLCUAddr, Bool alfAcrossSlice);
    206184  Void  parseAlfFixedLengthRun(UInt& idx, UInt rx, UInt numLCUInWidth);
    207185  Void  parseAlfStoredFilterIdx(UInt& idx, UInt numFilterSetsInBuffer);
    208 #endif
    209186  Void  xParseAlfParam       ( ALFParam* pAlfParam );
    210187  Void  xParseAlfCuControlParam(AlfCUCtrlInfo& cAlfParam, Int iNumCUsInPic);
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r292 r294  
    148148  }
    149149
    150 #if BURST_IPCM
    151150  pcCU->setNumSucIPCM(0);
    152 #endif
    153151
    154152  // start from the top level CU
     
    240238  if((!bStartInCU) && ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
    241239  {
    242 #if BURST_IPCM
    243240    if(pcCU->getNumSucIPCM() == 0)
    244241    {
     
    252249      pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx );
    253250    }
    254 #else
    255 #if HHI_MPI
    256     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) )
    257 #endif
    258     m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
    259 #endif
    260251  }
    261252  else
     
    323314
    324315  // decode CU mode and the partition size
    325 #if BURST_IPCM
    326316  if( !pcCU->getSlice()->isIntra() && pcCU->getNumSucIPCM() == 0 )
    327 #else
    328   if( !pcCU->getSlice()->isIntra() )
    329 #endif
    330317#if HHI_MPI
    331318  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
     
    382369    {
    383370#endif
    384 #if SIMP_MRG_PRUN     
    385371    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    386372#if MERL_VSP_C0152
     
    404390    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    405391#endif
    406 #else
    407     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    408     UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
    409 #endif
    410392    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
    411393
     
    438420  {
    439421#endif
    440 #if BURST_IPCM
    441422  if( pcCU->getNumSucIPCM() == 0 )
    442423  {
     
    451432    pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth );
    452433  }
    453 #else
    454   m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
    455   m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
    456 #endif
    457434
    458435  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
     
    592569  }
    593570
    594 #if BURST_IPCM
    595571  if( pcCU->getNumSucIPCM() > 0 )
    596572  {
     
    598574    return;
    599575  }
    600 #endif
    601576
    602577  ruiIsLast = xDecodeSliceEnd( pcCU, uiAbsPartIdx, uiDepth);
     
    820795 
    821796  //===== inverse transform =====
    822 #if H0736_AVC_STYLE_QP_RANGE
    823797  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
    824 #else
    825   m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, 0 );
    826 #endif
    827798
    828799  Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA];
     
    940911  if(eText == TEXT_CHROMA_U)
    941912  {
    942 #if H0736_AVC_STYLE_QP_RANGE
    943913    m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset() );
    944 #else
    945     m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getPPS()->getChromaQpOffset() );
    946 #endif
    947914  }
    948915  else
    949916  {
    950 #if H0736_AVC_STYLE_QP_RANGE
    951917    m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() );
    952 #else
    953     m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText, pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() );
    954 #endif
    955918  }
    956919
     
    12521215  pResi = m_ppcYuvResi[uiDepth]->getLumaAddr();
    12531216
    1254 #if H0736_AVC_STYLE_QP_RANGE
    12551217  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
    1256 #else
    1257   m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA, 0 );
    1258 #endif
    12591218
    12601219  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, uiLumaTrMode, 0, piCoeff );
    12611220 
    12621221  // Cb and Cr
    1263 #if H0736_AVC_STYLE_QP_RANGE
    12641222  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset() );
    1265 #else
    1266   m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getPPS()->getChromaQpOffset() );
    1267 #endif
    12681223
    12691224  uiWidth  >>= 1;
     
    12721227  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_U, pResi, 0, m_ppcYuvResi[uiDepth]->getCStride(), uiWidth, uiHeight, uiChromaTrMode, 0, piCoeff );
    12731228
    1274 #if H0736_AVC_STYLE_QP_RANGE
    12751229  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() );
    1276 #else
    1277   m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA, pcCU->getSlice()->getPPS()->getChromaQpOffset2nd() );
    1278 #endif
    12791230
    12801231  piCoeff = pcCU->getCoeffCr(); pResi = m_ppcYuvResi[uiDepth]->getCrAddr();
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r292 r294  
    330330      else
    331331      {
    332 #if SIMP_MRG_PRUN
    333332        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    334333        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    335 #else     
    336         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    337         uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    338 #endif
    339334      }
    340335#else
    341 #if SIMP_MRG_PRUN       
    342336      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    343337#if MERL_VSP_C0152
     
    375369#else
    376370      pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    377 #endif
    378 #else     
    379       pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    380       UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    381371#endif
    382372#endif
     
    547537}
    548538
    549 #if UNIFIED_TRANSFORM_TREE
    550539Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3, Bool& bCodeDQP )
    551 #else
    552 Void TDecEntropy::xDecodeTransformSubdiv( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 )
    553 #endif
    554540{
    555541  UInt uiSubdiv;
    556542  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
    557543
    558 #if UNIFIED_TRANSFORM_TREE
    559544  if(uiTrIdx==0)
    560545  {
     
    570555    }
    571556  }
    572 #endif // UNIFIED_TRANSFORM_TREE
    573557  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
    574558  {
    575559    uiSubdiv = 1;
    576560  }
    577 #if G519_TU_AMP_NSQT_HARMONIZATION
    578561  else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
    579 #else
    580   else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
    581 #endif
    582562  {
    583563    uiSubdiv = (uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));
     
    656636  if( uiSubdiv )
    657637  {
    658 #if UNIFIED_TRANSFORM_TREE
    659638    UInt size;
    660639    width  >>= 1;
     
    662641    size = width*height;
    663642    uiTrIdx++;
    664 #endif
    665643    ++uiDepth;
    666644    const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
     
    678656    for( Int i = 0; i < 4; i++ )
    679657    {
    680 #if UNIFIED_TRANSFORM_TREE
    681658      UInt nsAddr = 0;
    682659      nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, i, uiTrDepth+1 );
    683660      xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, nsAddr, uiDepth, width, height, uiTrIdx, i, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV, bCodeDQP );
    684 #else
    685       UInt nsAddr = 0;
    686       nsAddr = pcCU->getNSAbsPartIdx( uiLog2TrafoSize-1, uiAbsPartIdx, absTUPartIdx, i, uiTrDepth+1 );
    687       xDecodeTransformSubdiv( pcCU, uiAbsPartIdx, nsAddr, uiDepth, i, uiCurrentCbfY, uiCurrentCbfU, uiCurrentCbfV );
    688 #endif
    689661      uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiLumaTrMode );
    690662      uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiChromaTrMode );
    691663      uiVCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiChromaTrMode );
    692664      uiAbsPartIdx += uiQPartNum;
    693 #if UNIFIED_TRANSFORM_TREE
    694665      offsetLuma += size;  offsetChroma += (size>>2);
    695 #endif
    696666    }
    697667   
     
    751721      }
    752722    }
    753 #if UNIFIED_TRANSFORM_TREE
    754723    // transform_unit begin
    755724    UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA    , uiTrIdx );
     
    817786    }
    818787    // transform_unit end
    819 #endif // UNIFIED_TRANSFORM_TREE
    820   }
    821 }
    822 
    823 #if !UNIFIED_TRANSFORM_TREE
    824 Void TDecEntropy::decodeTransformIdx( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    825 {
    826   DTRACE_CABAC_VL( g_nSymbolCounter++ )
    827   DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" )
    828   DTRACE_CABAC_V( uiDepth )
    829   DTRACE_CABAC_T( "\n" )
    830   UInt temp = 0;
    831   UInt temp1 = 0;
    832   UInt temp2 = 0;
    833   xDecodeTransformSubdiv( pcCU, uiAbsPartIdx, uiAbsPartIdx, uiDepth, 0, temp, temp1, temp2 );
    834 }
    835 #endif // UNIFIED_TRANSFORM_TREE
    836 
    837 #if UNIFIED_TRANSFORM_TREE
     788  }
     789}
     790
     791
    838792Void TDecEntropy::decodeQP          ( TComDataCU* pcCU, UInt uiAbsPartIdx )
    839793{
     
    843797  }
    844798}
    845 #else
    846 Void TDecEntropy::decodeQP          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    847 {
    848   if ( pcCU->getSlice()->getPPS()->getUseDQP() )
    849   {
    850     m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, uiDepth );
    851   }
    852 }
    853 #endif
    854 
    855 #if !UNIFIED_TRANSFORM_TREE
    856 Void TDecEntropy::xDecodeCoeff( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP )
    857 {
    858   UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiDepth ] + 2;
    859   UInt uiCbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx );
    860   UInt uiCbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    861   UInt uiCbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    862   if( uiLog2TrSize == 2 )
    863   {
    864     UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    865     if( ( uiAbsPartIdx % uiQPDiv ) == 0 )
    866     {
    867       m_uiBakAbsPartIdx   = uiAbsPartIdx;
    868       m_uiBakChromaOffset = uiChromaOffset;
    869     }
    870     else if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) )
    871     {
    872       uiCbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
    873       uiCbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
    874     }
    875   }
    876 
    877   if ( uiCbfY || uiCbfU || uiCbfV )
    878   {
    879     // dQP: only for LCU
    880     if ( pcCU->getSlice()->getPPS()->getUseDQP() )
    881     {
    882       if ( bCodeDQP )
    883       {
    884         decodeQP( pcCU, uiAbsPartIdx, uiDepth);
    885         bCodeDQP = false;
    886       }
    887     }   
    888     UInt uiLumaTrMode, uiChromaTrMode;
    889     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx( uiAbsPartIdx ), uiLumaTrMode, uiChromaTrMode );
    890     const UInt uiStopTrMode = uiLumaTrMode;
    891    
    892     if( uiTrIdx == uiStopTrMode )
    893     {
    894       if( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrIdx ) )
    895       {
    896         Int trWidth = uiWidth;
    897         Int trHeight = uiHeight;
    898         pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight );
    899         m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffY()+uiLumaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_LUMA );
    900       }
    901      
    902       uiWidth  >>= 1;
    903       uiHeight >>= 1;
    904 
    905       if( uiLog2TrSize == 2 )
    906       {
    907         UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
    908         if( ( uiAbsPartIdx % uiQPDiv ) == (uiQPDiv - 1) )
    909         {
    910           uiWidth  <<= 1;
    911           uiHeight <<= 1;
    912           Int trWidth = uiWidth;
    913           Int trHeight = uiHeight;
    914           pcCU->getNSQTSize( uiTrIdx-1, uiAbsPartIdx, trWidth, trHeight );
    915           if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) )
    916           {
    917             m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
    918           }
    919           if( pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) )
    920           {
    921             m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
    922           }
    923         }
    924       }
    925       else
    926       {
    927         Int trWidth = uiWidth;
    928         Int trHeight = uiHeight;
    929         pcCU->getNSQTSize( uiTrIdx, uiAbsPartIdx, trWidth, trHeight );
    930         if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx ) )
    931         {
    932           m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
    933         }
    934         if( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx ) )
    935         {
    936           m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+uiChromaOffset), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
    937         }
    938       }
    939     }
    940     else
    941     {
    942       {
    943         DTRACE_CABAC_VL( g_nSymbolCounter++ );
    944         DTRACE_CABAC_T( "\tgoing down\tdepth=" );
    945         DTRACE_CABAC_V( uiDepth );
    946         DTRACE_CABAC_T( "\ttridx=" );
    947         DTRACE_CABAC_V( uiTrIdx );
    948         DTRACE_CABAC_T( "\n" );
    949       }
    950       if( uiCurrTrIdx <= uiTrIdx )
    951       {
    952         assert(1);
    953       }
    954       UInt uiSize;
    955       uiWidth  >>= 1;
    956       uiHeight >>= 1;
    957       uiSize = uiWidth*uiHeight;
    958       uiDepth++;
    959       uiTrIdx++;
    960      
    961       UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
    962       UInt uiIdx      = uiAbsPartIdx;
    963      
    964       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    965       uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    966      
    967       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    968       uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    969      
    970       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    971       uiLumaOffset += uiSize;  uiChromaOffset += (uiSize>>2);  uiIdx += uiQPartNum;
    972      
    973       xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiIdx, uiDepth, uiWidth, uiHeight, uiTrIdx, uiCurrTrIdx, bCodeDQP );
    974       {
    975         DTRACE_CABAC_VL( g_nSymbolCounter++ );
    976         DTRACE_CABAC_T( "\tgoing up\n" );
    977       }
    978     }
    979   }
    980 }
    981 #endif // !UNIFIED_TRANSFORM_TREE
     799
    982800
    983801/** decode coefficients
     
    994812  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
    995813  UInt uiChromaOffset = uiLumaOffset>>2;
    996 #if UNIFIED_TRANSFORM_TREE
    997814  UInt temp  = 0;
    998815  UInt temp1 = 0;
    999816  UInt temp2 = 0;
    1000 #else
    1001   UInt uiLumaTrMode, uiChromaTrMode;
    1002 #endif
    1003817 
    1004818#if RWTH_SDC_DLT_B0036
     
    1018832  if( pcCU->isIntra(uiAbsPartIdx) )
    1019833  {
    1020 #if !UNIFIED_TRANSFORM_TREE
    1021     decodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );
    1022    
    1023     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );
    1024    
    1025 #endif // !UNIFIED_TRANSFORM_TREE
    1026834  }
    1027835  else
     
    1045853    }
    1046854   
    1047 #if !UNIFIED_TRANSFORM_TREE
    1048     decodeTransformIdx( pcCU, uiAbsPartIdx, pcCU->getDepth(uiAbsPartIdx) );
    1049    
    1050     pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode );
    1051 #endif // !UNIFIED_TRANSFORM_TREE
    1052855  }
    1053856
     
    1068871#endif
    1069872
    1070 #if UNIFIED_TRANSFORM_TREE
    1071873  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP );
    1072 #else // UNIFIED_TRANSFORM_TREE
    1073   xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP );
    1074 #endif // UNIFIED_TRANSFORM_TREE
    1075874
    1076875#if FIX_MPI_B0065
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h

    r292 r294  
    6767  virtual Void  setBitstream          ( TComInputBitstream* p )  = 0;
    6868
    69 #if OL_FLUSH
    7069  virtual Void  decodeFlush()                                                                      = 0;
    71 #endif
    7270
    7371#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
     
    7977  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
    8078#endif
    81 #if TILES_OR_ENTROPY_SYNC_IDC 
    8279  virtual Void  parsePPS                  ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet )                                      = 0;
    83 #else
    84   virtual Void  parsePPS                  ( TComPPS* pcPPS )                                      = 0;
    85 #endif
    8680  virtual Void  parseAPS                  ( TComAPS* pAPS  )                                      = 0;
    8781  virtual void parseSEI(SEImessages&) = 0;
    8882
    89 #if LCU_SYNTAX_ALF
    9083#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    9184  virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)       = 0;
    9285#else
    9386  virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)       = 0;
    94 #endif
    95 #else
    96   virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl )                                = 0;
    9787#endif
    9888
     
    163153  UInt    m_uiBakAbsPartIdx;
    164154  UInt    m_uiBakChromaOffset;
    165 #if UNIFIED_TRANSFORM_TREE
    166155  UInt    m_bakAbsPartIdxCU;
    167 #endif
    168156 
    169157public:
     
    188176  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
    189177#endif
    190 #if TILES_OR_ENTROPY_SYNC_IDC
    191178  Void    decodePPS                   ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet    )    { m_pcEntropyDecoderIf->parsePPS(pcPPS, parameterSet);                    }
    192 #else
    193   Void    decodePPS                   ( TComPPS* pcPPS     )    { m_pcEntropyDecoderIf->parsePPS(pcPPS);                    }
    194 #endif
    195179  Void    decodeAPS                   ( TComAPS* pAPS      )    { m_pcEntropyDecoderIf->parseAPS(pAPS);}
    196180  void decodeSEI(SEImessages& seis) { m_pcEntropyDecoderIf->parseSEI(seis); }
    197181
    198 #if LCU_SYNTAX_ALF
    199182#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    200183  Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl, alfParamSet, isDepth);         }
    201184#else
    202185  Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl, alfParamSet);         }
    203 #endif
    204 #else
    205   Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl )  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, alfCUCtrl);         }
    206186#endif
    207187
     
    231211  Void decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    232212 
    233 #if !UNIFIED_TRANSFORM_TREE
    234   Void decodeTransformIdx      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    235 #endif
    236 #if UNIFIED_TRANSFORM_TREE
    237213  Void decodeQP                ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    238 #else
    239   Void decodeQP                ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    240 #endif
    241214 
    242215  Void readTileMarker         ( UInt& uiTileIdx, UInt uiBitsUsed )  {  m_pcEntropyDecoderIf->readTileMarker( uiTileIdx, uiBitsUsed ); }
     
    245218 
    246219private:
    247 #if UNIFIED_TRANSFORM_TREE
    248220  Void xDecodeTransform        ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3, Bool& bCodeDQP );
    249 #else
    250   Void xDecodeTransformSubdiv  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt absTUPartIdx, UInt uiDepth, UInt uiInnerQuadIdx, UInt& uiYCbfFront3, UInt& uiUCbfFront3, UInt& uiVCbfFront3 );
    251  
    252   Void xDecodeCoeff            ( TComDataCU* pcCU, UInt uiLumaOffset, UInt uiChromaOffset, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, UInt uiTrIdx, UInt uiCurrTrIdx, Bool& bCodeDQP );
    253 #endif //UNIFIED_TRANSFORM_TREE
    254221
    255222public:
     
    261228  Void setSliceGranularity (Int iSliceGranularity) {m_pcEntropyDecoderIf->setSliceGranularity(iSliceGranularity);}
    262229
    263 #if SAO_UNIT_INTERLEAVING
    264230  Void decodeSaoParam         (SAOParam* saoParam);
    265231  void decodeSaoLcu(Int rx, Int ry, Int compIdx, SAOParam* saoParam, Bool &repeatedRow );
    266232  Void decodeSaoOneLcu(SaoLcuParam* saoLcuParam);
    267 #endif
    268 
    269 #if OL_FLUSH
     233
    270234  Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); }
    271 #endif
    272235 
    273236#if RWTH_SDC_DLT_B0036
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp

    r289 r294  
    7979Void TDecGop::destroy()
    8080{
    81 #if LCU_SYNTAX_ALF
    8281  m_alfParamSetPilot.releaseALFParam();
    83 #endif
    8482}
    8583
     
    120118// Private member functions
    121119// ====================================================================================================================
    122 #if LCU_SYNTAX_ALF
    123120Void TDecGop::patchAlfLCUParams(ALFParam*** alfLCUParam, AlfParamSet* alfParamSet, Int firstLCUAddr)
    124121{
     
    195192}
    196193
    197 #endif
    198194// ====================================================================================================================
    199195// Public member functions
     
    279275        if(pcSlice->getAlfEnabledFlag())
    280276        {
    281 #if LCU_SYNTAX_ALF
    282277          if(pcSlice->getSPS()->getUseALFCoefInSlice())
    283278          {
     
    289284          if( !pcSlice->getSPS()->getUseALFCoefInSlice())
    290285          {
    291 #endif
    292286          m_vAlfCUCtrlSlices.push_back(m_cAlfCUCtrlOneSlice);
    293 #if LCU_SYNTAX_ALF
    294287          }
    295 #endif
    296288        }
    297289      }
     
    323315    m_pcSliceDecoder->decompressSlice( pcBitstream, ppcSubstreams, rpcPic, m_pcSbacDecoder, m_pcSbacDecoders);
    324316    m_pcEntropyDecoder->setBitstream(  ppcSubstreams[uiNumSubstreams-1] );
    325 #if WPP_SIMPLIFICATION
    326317    if ( uiNumSubstreams > 1 )
    327 #else
    328     if ( pcSlice->getPPS()->getEntropyCodingSynchro() )
    329 #endif
    330318    {
    331319      // deallocate all created substreams, including internal buffers.
     
    356344    Bool bLFCrossTileBoundary = (pcSlice->getPPS()->getTileBehaviorControlPresentFlag() == 1)?
    357345                                (pcSlice->getPPS()->getLFCrossTileBoundaryFlag()):(pcSlice->getPPS()->getSPS()->getLFCrossTileBoundaryFlag());
    358 #if DBL_CONTROL
    359346    if (pcSlice->getPPS()->getDeblockingFilterControlPresent())
    360347    {
    361 #endif
    362348      if(pcSlice->getSPS()->getUseDF())
    363349      {
     
    372358        }
    373359      }
    374 #if DBL_CONTROL
    375360    }
    376361    m_pcLoopFilter->setCfg(pcSlice->getPPS()->getDeblockingFilterControlPresent(), pcSlice->getLoopFilterDisable(), pcSlice->getLoopFilterBetaOffset(), pcSlice->getLoopFilterTcOffset(), bLFCrossTileBoundary);
    377 #else
    378     m_pcLoopFilter->setCfg(pcSlice->getLoopFilterDisable(), pcSlice->getLoopFilterBetaOffset(), pcSlice->getLoopFilterTcOffset(), bLFCrossTileBoundary);
    379 #endif
    380362    m_pcLoopFilter->loopFilterPic( rpcPic );
    381363
     
    392374      if(pcSlice->getSaoEnabledFlag())
    393375      {
    394 #if SAO_UNIT_INTERLEAVING
    395376        if (pcSlice->getSaoInterleavingFlag())
    396377        {
     
    402383        }
    403384        m_pcSAO->setSaoInterleavingFlag(pcSlice->getAPS()->getSaoInterleavingFlag());
    404 #endif
    405385        m_pcSAO->createPicSaoInfo(rpcPic, m_uiILSliceCount);
    406386        m_pcSAO->SAOProcess(rpcPic, pcSlice->getAPS()->getSaoParam()); 
     
    413393    if( pcSlice->getSPS()->getUseALF() )
    414394    {
    415 #if LCU_SYNTAX_ALF
    416395      if( (pcSlice->getSPS()->getUseALFCoefInSlice())?(true):(pcSlice->getAlfEnabledFlag()))
    417 #else
    418       if(pcSlice->getAlfEnabledFlag())
    419 #endif
    420       {
    421 
    422 #if LCU_SYNTAX_ALF
     396      {
     397
    423398        if(!pcSlice->getSPS()->getUseALFCoefInSlice())
    424399        {
     
    427402        m_pcAdaptiveLoopFilter->createPicAlfInfo(rpcPic, m_uiILSliceCount, pcSlice->getSliceQp());
    428403        m_pcAdaptiveLoopFilter->ALFProcess(rpcPic, m_vAlfCUCtrlSlices, pcSlice->getSPS()->getUseALFCoefInSlice());
    429 #else
    430         m_pcAdaptiveLoopFilter->createPicAlfInfo(rpcPic, m_uiILSliceCount);
    431       m_pcAdaptiveLoopFilter->ALFProcess(rpcPic, pcSlice->getAPS()->getAlfParam(), m_vAlfCUCtrlSlices);
    432 #endif
    433404      m_pcAdaptiveLoopFilter->PCMLFDisableProcess(rpcPic);
    434405      m_pcAdaptiveLoopFilter->destroyPicAlfInfo();
    435406      }
    436 #if LCU_SYNTAX_ALF
    437407      m_pcAdaptiveLoopFilter->resetLCUAlfInfo(); //reset all LCU ALFParam->alf_flag = 0
    438 #endif   
    439408    }
    440409   
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecGop.h

    r56 r294  
    101101  bool m_pictureDigestEnabled; ///< if true, handle picture_digest SEI messages
    102102  AlfCUCtrlInfo       m_cAlfCUCtrlOneSlice;
    103 #if LCU_SYNTAX_ALF
    104103  AlfParamSet           m_alfParamSetPilot;
    105 #endif
    106104
    107105public:
     
    131129  void setPictureDigestEnabled(bool enabled) { m_pictureDigestEnabled = enabled; }
    132130  AlfCUCtrlInfo& getAlfCuCtrlParam() { return m_cAlfCUCtrlOneSlice; }
    133 #if LCU_SYNTAX_ALF
    134131  AlfParamSet& getAlfParamSet() {return m_alfParamSetPilot;}
    135 #endif
    136132
    137133private:
    138 #if LCU_SYNTAX_ALF
    139134  Void patchAlfLCUParams(ALFParam*** alfLCUParam, AlfParamSet* alfParamSet, Int firstLCUAddr = 0);
    140 #endif
    141135
    142136
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r292 r294  
    8787, m_cALFUvlcSCModel           ( 1,             1,               NUM_ALF_UVLC_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    8888, m_cALFSvlcSCModel           ( 1,             1,               NUM_ALF_SVLC_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    89 #if AMP_CTX
    9089, m_cCUAMPSCModel             ( 1,             1,               NUM_CU_AMP_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    91 #else
    92 , m_cCUXPosiSCModel           ( 1,             1,               NUM_CU_X_POS_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    93 , m_cCUYPosiSCModel           ( 1,             1,               NUM_CU_Y_POS_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    94 #endif
    9590, m_cSaoFlagSCModel           ( 1,             1,               NUM_SAO_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    9691, m_cSaoUvlcSCModel           ( 1,             1,               NUM_SAO_UVLC_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    9792, m_cSaoSvlcSCModel           ( 1,             1,               NUM_SAO_SVLC_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    98 #if SAO_UNIT_INTERLEAVING
    9993, m_cSaoMergeLeftSCModel      ( 1,             1,               NUM_SAO_MERGE_LEFT_FLAG_CTX   , m_contextModels + m_numContextModels, m_numContextModels)
    10094, m_cSaoMergeUpSCModel        ( 1,             1,               NUM_SAO_MERGE_UP_FLAG_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
    10195, m_cSaoTypeIdxSCModel        ( 1,             1,               NUM_SAO_TYPE_IDX_CTX          , m_contextModels + m_numContextModels, m_numContextModels)
    102 #endif
    10396#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    10497, m_cDmmFlagSCModel           ( 1,             1,               NUM_DMM_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
     
    171164  m_cCUAlfCtrlFlagSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_ALF_CTRL_FLAG );
    172165  m_cCUPartSizeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PART_SIZE );
    173 #if AMP_CTX
    174166  m_cCUAMPSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );
    175 #else
    176   m_cCUXPosiSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_CU_X_POS );
    177   m_cCUYPosiSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_CU_Y_POS );
    178 #endif
    179167  m_cCUPredModeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PRED_MODE );
    180168  m_cCUIntraPredSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_INTRA_PRED_MODE );
     
    199187  m_cSaoUvlcSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_SAO_UVLC );
    200188  m_cSaoSvlcSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_SAO_SVLC );
    201 #if SAO_UNIT_INTERLEAVING
    202189  m_cSaoMergeLeftSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_SAO_MERGE_LEFT_FLAG );
    203190  m_cSaoMergeUpSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SAO_MERGE_UP_FLAG );
    204191  m_cSaoTypeIdxSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_SAO_TYPE_IDX );
    205 #endif
    206192
    207193  m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
     
    265251  m_cCUAlfCtrlFlagSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG );
    266252  m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
    267 #if AMP_CTX
    268253  m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
    269 #else
    270   m_cCUXPosiSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_CU_X_POS );
    271   m_cCUYPosiSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_CU_Y_POS );
    272 #endif
    273254  m_cCUPredModeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PRED_MODE );
    274255  m_cCUIntraPredSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_INTRA_PRED_MODE );
     
    293274  m_cSaoUvlcSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_SAO_UVLC );
    294275  m_cSaoSvlcSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_SAO_SVLC );
    295 #if SAO_UNIT_INTERLEAVING
    296276  m_cSaoMergeLeftSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_LEFT_FLAG );
    297277  m_cSaoMergeUpSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_UP_FLAG );
    298278  m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
    299 #endif
    300279  m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
    301280#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
     
    449428  }
    450429
    451 #if EIGHT_BITS_RICE_CODE
    452430  ruiGoRiceParam = g_aauiGoRiceUpdate[ ruiGoRiceParam ][ min<UInt>( ruiSymbol, 23 ) ];
    453 #else
    454   ruiGoRiceParam = g_aauiGoRiceUpdate[ ruiGoRiceParam ][ min<UInt>( ruiSymbol, 15 ) ];
    455 #endif
    456431
    457432  return;
     
    470445{
    471446  UInt uiSymbol;
    472 #if BURST_IPCM
    473447  Int numSubseqIPCM = 0;
    474448  Bool readPCMSampleFlag = false;
     
    490464    }
    491465  }
    492 #else
    493   m_pcTDecBinIf->decodeBinTrm(uiSymbol);
    494 #endif
    495 
    496 #if BURST_IPCM
     466
    497467  if (readPCMSampleFlag == true)
    498 #else
    499   if (uiSymbol)
    500 #endif
    501468  {
    502469    Bool bIpcmFlag = true;
    503470
    504 #if !BURST_IPCM
    505     m_pcTDecBinIf->decodePCMAlignBits();
    506 #endif
    507471
    508472    pcCU->setPartSizeSubParts  ( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
     
    568532    }
    569533
    570 #if BURST_IPCM
    571534    pcCU->setNumSucIPCM( pcCU->getNumSucIPCM() - 1);
    572535    if(pcCU->getNumSucIPCM() == 0)
     
    574537      m_pcTDecBinIf->resetBac();
    575538    }
    576 #else
    577     m_pcTDecBinIf->resetBac();
    578 #endif
    579539  }
    580540}
     
    664624{
    665625  UInt uiNumCand = MRG_MAX_NUM_CANDS;
    666 #if !MRG_IDX_CTX_RED 
    667   UInt auiCtx[4] = { 0, 1, 2, 3 };
    668 #endif
    669626  UInt uiUnaryIdx = 0;
    670627  uiNumCand = pcCU->getSlice()->getMaxNumMergeCand();
     
    678635    {
    679636      UInt uiSymbol = 0;
    680 #if MRG_IDX_CTX_RED
    681637      if ( uiUnaryIdx==0 )
    682638      {
     
    687643        m_pcTDecBinIf->decodeBinEP( uiSymbol );
    688644      }
    689 #else
    690       m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUMergeIdxExtSCModel.get( 0, 0, auiCtx[uiUnaryIdx] ) );
    691 #endif
    692645      if( uiSymbol == 0 )
    693646      {
     
    879832        if (eMode == SIZE_2NxN)
    880833        {
    881 #if AMP_CTX
    882834            m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    883 #else
    884           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));
    885 #endif
    886835          if (uiSymbol == 0)
    887836          {
    888 #if AMP_CTX
    889837            m_pcTDecBinIf->decodeBinEP(uiSymbol);
    890 #else
    891             m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 ));
    892 #endif
    893838            eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
    894839          }
     
    896841        else if (eMode == SIZE_Nx2N)
    897842        {
    898 #if AMP_CTX
    899843          m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
    900 #else
    901           m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 ));
    902 #endif
    903844          if (uiSymbol == 0)
    904845          {
    905 #if AMP_CTX
    906846            m_pcTDecBinIf->decodeBinEP(uiSymbol);
    907 #else
    908             m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 ));
    909 #endif
    910847            eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
    911848          }
     
    989926  {
    990927#endif
    991 #if !LOGI_INTRA_NAME_3MPM
    992     Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx);
    993 #endif
    994928
    995929#if LGE_EDGE_INTRA_A0070
     
    1003937#endif
    1004938
    1005 #if LOGI_INTRA_NAME_3MPM
    1006939    Int uiPreds[3] = {-1, -1, -1};
    1007 #else
    1008     Int uiPreds[2] = {-1, -1};
    1009 #endif
    1010940    Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 
    1011941#if LGE_EDGE_INTRA_A0070
     
    1018948    {
    1019949      m_pcTDecBinIf->decodeBinEP( uiSymbol );
    1020 #if LOGI_INTRA_NAME_3MPM
    1021950      if (uiSymbol)
    1022951      {
     
    1024953        uiSymbol++;
    1025954      }
    1026 #endif
    1027955      intraPredMode = uiPreds[uiSymbol];
    1028956    }
     
    1031959      intraPredMode = 0;
    1032960
    1033 #if LOGI_INTRA_NAME_3MPM
    1034961
    1035962      m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 );
     
    1060987        std::swap(uiPreds[1], uiPreds[2]);
    1061988      }
    1062 #else
    1063       m_pcTDecBinIf->decodeBinsEP( uiSymbol, g_aucIntraModeBitsAng[iIntraIdx] - 1 );
    1064       intraPredMode = uiSymbol;
    1065 
    1066       if ( intraPredMode == 31 )
    1067       {
    1068         m_pcTDecBinIf->decodeBinEP( uiSymbol );
    1069         intraPredMode += uiSymbol;     
    1070       }
    1071 #endif
    1072989#if LGE_EDGE_INTRA_A0070
    1073990      if ( intraPredMode != EDGE_INTRA_IDX)
     
    11581075    {
    11591076      UInt uiIPredMode;
    1160 #if CHROMA_MODE_CODING
    11611077      m_pcTDecBinIf->decodeBinsEP( uiIPredMode, 2 );
    1162 #else
    1163       xReadUnaryMaxSymbol( uiIPredMode, m_cCUChromaPredSCModel.get( 0, 0 ) + 1, 0, 3 );
    1164 #endif
    11651078      UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ];
    11661079      pcCU->getAllowedChromaDir( uiAbsPartIdx, uiAllowedChromaDir );
     
    12301143  ContextModel *pCtx = m_cCUMvdSCModel.get( 0 );
    12311144
    1232 #if H0111_MVD_L1_ZERO
    12331145  if(pcCU->getSlice()->getMvdL1ZeroFlag() && eRefList == REF_PIC_LIST_1 && pcCU->getInterDir(uiAbsPartIdx)==3)
    12341146  {
     
    12381150  else
    12391151  {
    1240 #endif
    12411152
    12421153    m_pcTDecBinIf->decodeBin( uiHorAbs, *pCtx );
     
    12811192    }
    12821193
    1283 #if H0111_MVD_L1_ZERO
    1284   }
    1285 #endif
     1194  }
    12861195
    12871196  const TComMv cMv( uiHorSign ? -Int( uiHorAbs ): uiHorAbs, uiVerSign ? -Int( uiVerAbs ) : uiVerAbs );
     
    13231232Void TDecSbac::parseDeltaQP( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    13241233{
    1325 #if H0736_AVC_STYLE_QP_RANGE
    13261234  Int qp;
    1327 #endif
    13281235  UInt uiDQp;
    13291236  Int  iDQp;
     
    13331240  if ( uiDQp == 0 )
    13341241  {
    1335 #if H0736_AVC_STYLE_QP_RANGE
    13361242    qp = pcCU->getRefQP(uiAbsPartIdx);
    1337 #else
    1338     uiDQp = pcCU->getRefQP(uiAbsPartIdx);
    1339 #endif
    13401243  }
    13411244  else
    13421245  {
    13431246    UInt uiSign;
    1344 #if H0736_AVC_STYLE_QP_RANGE
    13451247    Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY();
    1346 #else
    1347     UInt uiQpBdOffsetY = 6*(g_uiBitIncrement + g_uiBitDepth - 8);
    1348 #endif
    13491248    m_pcTDecBinIf->decodeBinEP(uiSign);
    13501249
    1351 #if H0736_AVC_STYLE_QP_RANGE
    13521250    UInt uiMaxAbsDQpMinus1 = 24 + (qpBdOffsetY/2) + (uiSign);
    1353 #else
    1354     UInt uiMaxAbsDQpMinus1 = 24 + (uiQpBdOffsetY/2) + (uiSign);
    1355 #endif
    13561251    UInt uiAbsDQpMinus1;
    13571252    xReadUnaryMaxSymbol (uiAbsDQpMinus1,  &m_cCUDeltaQpSCModel.get( 0, 0, 1 ), 1, uiMaxAbsDQpMinus1);
     
    13641259    }
    13651260
    1366 #if H0736_AVC_STYLE_QP_RANGE
    13671261    qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+qpBdOffsetY)) - qpBdOffsetY;
    1368 #else
    1369 #if LOSSLESS_CODING
    1370     uiDQp = (pcCU->getRefQP(uiAbsPartIdx) + iDQp + 52) % 52;
    1371 #else
    1372     uiDQp = pcCU->getRefQP(uiAbsPartIdx) + iDQp;
    1373 #endif
    1374 #endif
    13751262  }
    13761263 
    13771264  UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ;
    13781265  UInt uiQpCUDepth =   min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ;
    1379 #if H0736_AVC_STYLE_QP_RANGE
    13801266  pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth );
    1381 #else
    1382   pcCU->setQPSubParts( uiDQp, uiAbsQpCUPartIdx, uiQpCUDepth );
    1383 #endif
    13841267}
    13851268
     
    14221305
    14231306  // posX
    1424 #if LAST_CTX_REDUCTION
    14251307  Int widthCtx = eTType ? 4 : width;
    14261308  const UInt *puiCtxIdxX = g_uiLastCtx + ( g_aucConvertToBit[ widthCtx ] * ( g_aucConvertToBit[ widthCtx ] + 3 ) );
    1427 #else
    1428   const UInt *puiCtxIdxX = g_uiLastCtx + ( g_aucConvertToBit[ width ] * ( g_aucConvertToBit[ width ] + 3 ) );
    1429 #endif
    14301309  for( uiPosLastX = 0; uiPosLastX < g_uiGroupIdx[ width - 1 ]; uiPosLastX++ )
    14311310  {
    1432 #if LAST_CTX_REDUCTION
    14331311    if ( eTType  )
    14341312    {
     
    14371315    else
    14381316    {
    1439 #endif
    14401317      m_pcTDecBinIf->decodeBin( uiLast, *( pCtxX + puiCtxIdxX[ uiPosLastX ] ) );
    1441 #if LAST_CTX_REDUCTION
    1442     }
    1443 #endif
     1318    }
    14441319    if( !uiLast )
    14451320    {
     
    14491324
    14501325  // posY
    1451 #if LAST_CTX_REDUCTION
    14521326  Int heightCtx = eTType? 4 : height;
    14531327  const UInt *puiCtxIdxY = g_uiLastCtx + ( g_aucConvertToBit[ heightCtx ] * ( g_aucConvertToBit[ heightCtx ] + 3 ) );
    1454 #else
    1455   const UInt *puiCtxIdxY = g_uiLastCtx + ( g_aucConvertToBit[ height ] * ( g_aucConvertToBit[ height ] + 3 ) );
    1456 #endif
    14571328  for( uiPosLastY = 0; uiPosLastY < g_uiGroupIdx[ height - 1 ]; uiPosLastY++ )
    14581329  {
    1459 #if LAST_CTX_REDUCTION
    14601330    if (eTType)
    14611331    {
     
    14641334    else
    14651335    {
    1466 #endif
    14671336      m_pcTDecBinIf->decodeBin( uiLast, *( pCtxY + puiCtxIdxY[ uiPosLastY ] ) );
    1468 #if LAST_CTX_REDUCTION
    1469     }
    1470 #endif
     1337    }
    14711338    if( !uiLast )
    14721339    {
     
    15881455  UInt uiGoRiceParam           = 0;
    15891456
    1590 #if MULTIBITS_DATA_HIDING
    15911457  UInt const tsig = pcCU->getSlice()->getPPS()->getTSIG();
    15921458#if LOSSLESS_CODING
     
    16041470#endif
    16051471  UInt absSum = 0;
    1606 #endif  // MULTIBITS_DATA_HIDING
    16071472
    16081473  UInt uiSigCoeffGroupFlag[ MLS_GRP_NUM ];
     
    16131478  {
    16141479    scanCG = g_auiSigLastScan[ uiScanIdx ][ uiLog2BlockSize > 3 ? uiLog2BlockSize-2-1 : 0  ];   
    1615 #if MULTILEVEL_SIGMAP_EXT
    16161480    if( uiLog2BlockSize == 3 )
    16171481    {
     
    16221486      scanCG = g_sigLastScanCG32x32;
    16231487    }
    1624 #endif
    16251488  }
    16261489  else
     
    16351498    Int numNonZero = 0;
    16361499   
    1637 #if MULTIBITS_DATA_HIDING
    16381500    Int lastNZPosInCG = -1, firstNZPosInCG = SCAN_SET_SIZE;
    1639 #endif
    16401501
    16411502    Int pos[SCAN_SET_SIZE];
    16421503    if( iScanPosSig == (Int) uiScanPosLast )
    16431504    {
    1644 #if MULTIBITS_DATA_HIDING
    16451505      lastNZPosInCG  = iScanPosSig;
    16461506      firstNZPosInCG = iScanPosSig;
    1647 #endif
    16481507      iScanPosSig--;
    16491508      pos[ numNonZero ] = uiBlkPosLast;
     
    16511510    }
    16521511
    1653 #if !MULTILEVEL_SIGMAP_EXT
    1654     if( blockType > 3 )
    1655     {
    1656 #endif
    16571512      // decode significant_coeffgroup_flag
    16581513      Int iCGBlkPos = scanCG[ iSubSet ];
    16591514      Int iCGPosY   = iCGBlkPos / uiNumBlkSide;
    16601515      Int iCGPosX   = iCGBlkPos - (iCGPosY * uiNumBlkSide);
    1661 #if MULTILEVEL_SIGMAP_EXT
    16621516      if( uiWidth == 8 && uiHeight == 8 && (uiScanIdx == SCAN_HOR || uiScanIdx == SCAN_VER) )
    16631517      {
     
    16651519        iCGPosX = (uiScanIdx == SCAN_VER ? iCGBlkPos : 0);
    16661520      }
    1667 #endif
    1668 #if !REMOVE_INFER_SIGGRP
    1669       Bool bInferredCGFlag = false;
    1670 #endif
    1671 #if REMOVE_INFER_SIGGRP
    16721521      if( iSubSet == iLastScanSet || iSubSet == 0)
    1673 #else
    1674       if( iSubSet == iLastScanSet )
    1675 #endif
    16761522      {
    16771523        uiSigCoeffGroupFlag[ iCGBlkPos ] = 1;
     
    16791525      else
    16801526      {
    1681 #if !REMOVE_INFER_SIGGRP
    1682 #if MULTILEVEL_SIGMAP_EXT
    1683         if( !TComTrQuant::bothCGNeighboursOne( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiScanIdx, uiWidth, uiHeight) && ( iSubSet ) )
    1684 #else
    1685         if( !TComTrQuant::bothCGNeighboursOne( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiWidth, uiHeight) && ( iSubSet ) )
    1686 #endif
    1687         {
    1688 #endif
    16891527          UInt uiSigCoeffGroup;
    1690 #if MULTILEVEL_SIGMAP_EXT
    16911528          UInt uiCtxSig  = TComTrQuant::getSigCoeffGroupCtxInc( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiScanIdx, uiWidth, uiHeight );
    1692 #else
    1693           UInt uiCtxSig  = TComTrQuant::getSigCoeffGroupCtxInc( uiSigCoeffGroupFlag, iCGPosX, iCGPosY, uiWidth, uiHeight );
    1694 #endif
    16951529          m_pcTDecBinIf->decodeBin( uiSigCoeffGroup, baseCoeffGroupCtx[ uiCtxSig ] );
    16961530          uiSigCoeffGroupFlag[ iCGBlkPos ] = uiSigCoeffGroup;
    1697 #if !REMOVE_INFER_SIGGRP
    1698         }
    1699         else
    1700         {
    1701           uiSigCoeffGroupFlag[ iCGBlkPos ] = 1;
    1702           bInferredCGFlag = true;
    1703         }
    1704 #endif
    17051531      }
    17061532
     
    17161542        if( uiSigCoeffGroupFlag[ iCGBlkPos ] )
    17171543        {
    1718 #if REMOVE_INFER_SIGGRP
    17191544          if( iScanPosSig > iSubPos || iSubSet == 0  || numNonZero )
    1720 #else
    1721           if( iScanPosSig > iSubPos || bInferredCGFlag || numNonZero )
    1722 #endif
    17231545          {
    17241546            uiCtxSig  = TComTrQuant::getSigCtxInc( pcCoef, uiPosX, uiPosY, blockType, uiWidth, uiHeight, eTType );
     
    17351557          pos[ numNonZero ] = uiBlkPos;
    17361558          numNonZero ++;
    1737 #if MULTIBITS_DATA_HIDING
    17381559          if( lastNZPosInCG == -1 )
    17391560          {
     
    17411562          }
    17421563          firstNZPosInCG = iScanPosSig;
    1743 #endif
    17441564        }
    17451565      }
    1746 #if !MULTILEVEL_SIGMAP_EXT
    1747     }
    1748     else
    1749     {
    1750       for( ; iScanPosSig >= iSubPos; iScanPosSig-- )
    1751       {
    1752         UInt uiBlkPos   = scan[ iScanPosSig ];
    1753         UInt  uiPosY    = uiBlkPos >> uiLog2BlockSize;
    1754         UInt  uiPosX    = uiBlkPos - ( uiPosY << uiLog2BlockSize );
    1755         UInt  uiSig     = 0;
    1756         UInt  uiCtxSig  = TComTrQuant::getSigCtxInc( pcCoef, uiPosX, uiPosY, blockType, uiWidth, uiHeight, eTType );
    1757         m_pcTDecBinIf->decodeBin( uiSig, baseCtx[ uiCtxSig ] );
    1758         pcCoef[ uiBlkPos ] = uiSig;
    1759         if( uiSig )
    1760         {
    1761           pos[ numNonZero ] = uiBlkPos;
    1762           numNonZero ++;
    1763 #if MULTIBITS_DATA_HIDING
    1764           if( lastNZPosInCG == -1 )
    1765           {
    1766             lastNZPosInCG = iScanPosSig;
    1767           }
    1768           firstNZPosInCG = iScanPosSig;
    1769 #endif
    1770         }
    1771       }
    1772     }
    1773 #endif
    17741566
    17751567   
    17761568    if( numNonZero )
    17771569    {
    1778 #if MULTIBITS_DATA_HIDING
    17791570      Bool signHidden = ( lastNZPosInCG - firstNZPosInCG >= (Int)tsig );
    17801571      absSum = 0;
    1781 #endif  // MULTIBITS_DATA_HIDING
    17821572
    17831573      UInt c1 = 1;
    1784 #if !RESTRICT_GR1GR2FLAG_NUMBER
    1785       UInt c2 = 0;
    1786 #endif
    1787 #if LEVEL_CTX_LUMA_RED
    17881574      UInt uiCtxSet    = (iSubSet > 0 && eTType==TEXT_LUMA) ? 2 : 0;
    1789 #else
    1790       UInt uiCtxSet    = (iSubSet > 0 && eTType==TEXT_LUMA) ? 3 : 0;
    1791 #endif
    17921575      UInt uiBin;
    17931576     
     
    17951578      {
    17961579        uiCtxSet++;
    1797 #if !LEVEL_CTX_LUMA_RED
    1798         if(eTType==TEXT_LUMA && uiNumOne > 3)
    1799         {
    1800           uiCtxSet++;
    1801         }
    1802 #endif
    18031580      }
    18041581     
     
    18071584      Int absCoeff[SCAN_SET_SIZE];
    18081585
    1809 #if RESTRICT_GR1GR2FLAG_NUMBER
    18101586      for ( Int i = 0; i < numNonZero; i++) absCoeff[i] = 1;   
    18111587      Int numC1Flag = min(numNonZero, C1FLAG_NUMBER);
     
    18131589
    18141590      for( Int idx = 0; idx < numC1Flag; idx++ )
    1815 #else
    1816       for( Int idx = 0; idx < numNonZero; idx++ )
    1817 #endif
    18181591      {
    18191592        m_pcTDecBinIf->decodeBin( uiBin, baseCtxMod[c1] );
     
    18211594        {
    18221595          c1 = 0;
    1823 #if RESTRICT_GR1GR2FLAG_NUMBER
    18241596          if (firstC2FlagIdx == -1)
    18251597          {
    18261598            firstC2FlagIdx = idx;
    18271599          }
    1828 #endif
    18291600        }
    18301601        else if( (c1 < 3) && (c1 > 0) )
     
    18371608      if (c1 == 0)
    18381609      {
    1839 #if RESTRICT_GR1GR2FLAG_NUMBER
    18401610        baseCtxMod = ( eTType==TEXT_LUMA ) ? m_cCUAbsSCModel.get( 0, 0 ) + uiCtxSet : m_cCUAbsSCModel.get( 0, 0 ) + NUM_ABS_FLAG_CTX_LUMA + uiCtxSet;
    18411611        if ( firstC2FlagIdx != -1)
     
    18441614          absCoeff[ firstC2FlagIdx ] = uiBin + 2;
    18451615        }
    1846 #else   
    1847         baseCtxMod = ( eTType==TEXT_LUMA ) ? m_cCUAbsSCModel.get( 0, 0 ) + 3 * uiCtxSet : m_cCUAbsSCModel.get( 0, 0 ) + NUM_ABS_FLAG_CTX_LUMA + 3 * uiCtxSet;
     1616      }
     1617
     1618      UInt coeffSigns;
     1619      if ( signHidden && beValid )
     1620      {
     1621        m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero-1 );
     1622        coeffSigns <<= 32 - (numNonZero-1);
     1623      }
     1624      else
     1625      {
     1626        m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero );
     1627        coeffSigns <<= 32 - numNonZero;
     1628      }
     1629     
     1630      Int iFirstCoeff2 = 1;   
     1631      if (c1 == 0 || numNonZero > C1FLAG_NUMBER)
     1632      {
    18481633        for( Int idx = 0; idx < numNonZero; idx++ )
    18491634        {
    1850           if( absCoeff[ idx ] == 2 )
    1851           {
    1852             m_pcTDecBinIf->decodeBin( uiBin, baseCtxMod[c2] );
    1853             absCoeff[ idx ] = uiBin + 2;
    1854             c2 += (c2 < 2);
    1855             uiNumOne++;
    1856           }
    1857         }
    1858 #endif
    1859       }
    1860 
    1861 #if MULTIBITS_DATA_HIDING
    1862       UInt coeffSigns;
    1863       if ( signHidden && beValid )
    1864       {
    1865         m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero-1 );
    1866         coeffSigns <<= 32 - (numNonZero-1);
    1867       }
    1868       else
    1869       {
    1870         m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero );
    1871         coeffSigns <<= 32 - numNonZero;
    1872       }
    1873 #else
    1874       UInt coeffSigns;
    1875       m_pcTDecBinIf->decodeBinsEP( coeffSigns, numNonZero );
    1876       coeffSigns <<= 32 - numNonZero;
    1877 #endif
    1878      
    1879 #if RESTRICT_GR1GR2FLAG_NUMBER
    1880       Int iFirstCoeff2 = 1;   
    1881       if (c1 == 0 || numNonZero > C1FLAG_NUMBER)
    1882 #else
    1883       if (c1 == 0)
    1884 #endif
    1885       {
    1886         for( Int idx = 0; idx < numNonZero; idx++ )
    1887         {
    1888 #if RESTRICT_GR1GR2FLAG_NUMBER   
    18891635          UInt baseLevel  = (idx < C1FLAG_NUMBER)? (2 + iFirstCoeff2) : 1;
    18901636
     
    19011647            uiNumOne++;
    19021648          }
    1903 #else
    1904           if( absCoeff[ idx ] == 3 )
    1905           {
    1906             UInt uiLevel;
    1907             xReadGoRiceExGolomb( uiLevel, uiGoRiceParam );
    1908             absCoeff[ idx ] = uiLevel + 3;
    1909           }
    1910 #endif
    19111649        }
    19121650      }
     
    19151653      {
    19161654        Int blkPos = pos[ idx ];
    1917 #if MULTIBITS_DATA_HIDING
    19181655        // Signs applied later.
    19191656        pcCoef[ blkPos ] = absCoeff[ idx ];
     
    19321669          coeffSigns <<= 1;
    19331670        }
    1934 #else
    1935         Int sign = static_cast<Int>( coeffSigns ) >> 31;
    1936         pcCoef[ blkPos ] = ( absCoeff[ idx ] ^ sign ) - sign;
    1937         coeffSigns <<= 1;
    1938 #endif
    19391671      }
    19401672    }
     
    19491681
    19501682
    1951 #if SAO_UNIT_INTERLEAVING
    19521683Void TDecSbac::parseSaoUvlc (UInt& ruiVal)
    19531684{
     
    21861917  }
    21871918}
    2188 #endif
    21891919
    21901920/**
     
    22171947}
    22181948
    2219 #if OL_FLUSH
    22201949Void TDecSbac::decodeFlush ( )
    22211950{
     
    22251954
    22261955}
    2227 #endif
    22281956
    22291957#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC)
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSbac.h

    r292 r294  
    7474  Void xCopyFrom           ( TDecSbac* pSrc );
    7575  Void xCopyContextsFrom       ( TDecSbac* pSrc );
    76 #if OL_FLUSH
    7776  Void decodeFlush();
    78 #endif
    7977
    8078#if CABAC_INIT_FLAG
     
    9593  Void  parseSPS                  ( TComSPS* pcSPS         ) {}
    9694#endif
    97 #if TILES_OR_ENTROPY_SYNC_IDC 
    9895  Void  parsePPS                  ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet         ) {}
    99 #else
    100   Void  parsePPS                  ( TComPPS* pcPPS         ) {}
    101 #endif
    10296  Void  parseAPS                  ( TComAPS* pAPS          ) {}
    10397  void parseSEI(SEImessages&) {}
    10498
    105 #if LCU_SYNTAX_ALF
    10699#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    107100  Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) {}
    108101#else
    109102  Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) {}
    110 #endif
    111 #else
    112   Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl ) {}
    113103#endif
    114104
     
    120110#endif
    121111 
    122 #if SAO_UNIT_INTERLEAVING
    123112  Void  parseSaoUvlc              ( UInt& ruiVal           );
    124113  Void  parseSaoSvlc              ( Int&  riVal            );
     
    129118  Void  parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Bool bLFCrossSliceBoundaryFlag);
    130119  Void  parseSaoOffset            (SaoLcuParam* psSaoLcuParam);
    131 #endif
    132120 
    133121#if RWTH_SDC_DLT_B0036
     
    256244  ContextModel3DBuffer m_cALFUvlcSCModel;
    257245  ContextModel3DBuffer m_cALFSvlcSCModel;
    258 #if AMP_CTX
    259246  ContextModel3DBuffer m_cCUAMPSCModel;
    260 #else
    261   ContextModel3DBuffer m_cCUXPosiSCModel;
    262   ContextModel3DBuffer m_cCUYPosiSCModel;
    263 #endif
    264247  ContextModel3DBuffer m_cSaoFlagSCModel;
    265248  ContextModel3DBuffer m_cSaoUvlcSCModel;
    266249  ContextModel3DBuffer m_cSaoSvlcSCModel;
    267 #if SAO_UNIT_INTERLEAVING
    268250  ContextModel3DBuffer m_cSaoMergeLeftSCModel;
    269251  ContextModel3DBuffer m_cSaoMergeUpSCModel;
    270252  ContextModel3DBuffer m_cSaoTypeIdxSCModel;
    271 #endif
    272253
    273254#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecSlice.cpp

    r210 r294  
    148148  UInt uiCol=0, uiLin=0, uiSubStrm=0;
    149149
    150 #if !REMOVE_TILE_DEPENDENCE
    151   Int iBreakDep;
    152 #endif
    153150  UInt uiTileCol;
    154151  UInt uiTileStartLCU;
     
    163160    pcCU = rpcPic->getCU( iCUAddr );
    164161    pcCU->initCU( rpcPic, iCUAddr );
    165 #if !REMOVE_TILE_DEPENDENCE
    166     iBreakDep = rpcPic->getPicSym()->getTileBoundaryIndependenceIdr();
    167 #endif
    168162    uiTileCol = rpcPic->getPicSym()->getTileIdxMap(iCUAddr) % (rpcPic->getPicSym()->getNumColumnsMinus1()+1); // what column of tiles are we in?
    169163    uiTileStartLCU = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr();
     
    175169    uiLin     = iCUAddr / uiWidthInLCUs;
    176170    // inherit from TR if necessary, select substream to use.
    177 #if WPP_SIMPLIFICATION
    178171    if( iSymbolMode && pcSlice->getPPS()->getNumSubstreams() > 1 )
    179 #else
    180     if( iSymbolMode && pcSlice->getPPS()->getEntropyCodingSynchro() )
    181 #endif
    182     {
    183 #if !REMOVE_TILE_DEPENDENCE
    184 #if WPP_SIMPLIFICATION
    185       if (iBreakDep && pcSlice->getPPS()->getNumSubstreams() > 1)
    186 #else
    187       if (iBreakDep && pcSlice->getPPS()->getEntropyCodingSynchro())
    188 #endif
    189 #else
    190 #if WPP_SIMPLIFICATION
     172    {
    191173      if (pcSlice->getPPS()->getNumSubstreams() > 1)
    192 #else
    193       if (pcSlice->getPPS()->getEntropyCodingSynchro())
    194 #endif
    195 #endif
    196174      {
    197175        // independent tiles => substreams are "per tile".  iNumSubstreams has already been multiplied.
     
    207185      m_pcEntropyDecoder->setBitstream( ppcSubstreams[uiSubStrm] );
    208186      // Synchronize cabac probabilities with upper-right LCU if it's available and we're at the start of a line.
    209 #if WPP_SIMPLIFICATION
    210187      if (pcSlice->getPPS()->getNumSubstreams() > 1 && uiCol == uiTileLCUX)
    211 #else
    212       if (pcSlice->getPPS()->getEntropyCodingSynchro() && uiCol == uiTileLCUX)
    213 #endif
    214188      {
    215189        // We'll sync if the TR is available.
     
    217191        UInt uiWidthInCU = rpcPic->getFrameWidthInCU();
    218192        TComDataCU *pcCUTR = NULL;
    219 #if WPP_SIMPLIFICATION
    220193        if ( pcCUUp && ((iCUAddr%uiWidthInCU+1) < uiWidthInCU)  )
    221194        {
    222195          pcCUTR = rpcPic->getCU( iCUAddr - uiWidthInCU + 1 );
    223196        }
    224 #else
    225         if ( pcCUUp && ((iCUAddr%uiWidthInCU+pcSlice->getPPS()->getEntropyCodingSynchro()) < uiWidthInCU)  )
    226         {
    227           pcCUTR = rpcPic->getCU( iCUAddr - uiWidthInCU + pcSlice->getPPS()->getEntropyCodingSynchro() );
    228         }
    229 #endif
    230197        UInt uiMaxParts = 1<<(pcSlice->getSPS()->getMaxCUDepth()<<1);
    231198
     
    233200             ((pcCUTR==NULL) || (pcCUTR->getSlice()==NULL) ||
    234201             ((pcCUTR->getSCUAddr()+uiMaxParts-1) < pcSlice->getSliceCurStartCUAddr()) ||
    235 #if !REMOVE_TILE_DEPENDENCE
    236              (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr() && (rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)))
    237 #else
    238202             ((rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)))
    239 #endif
    240203             ))||
    241204             (true/*bEnforceEntropySliceRestriction*/ &&
    242205             ((pcCUTR==NULL) || (pcCUTR->getSlice()==NULL) ||
    243206             ((pcCUTR->getSCUAddr()+uiMaxParts-1) < pcSlice->getEntropySliceCurStartCUAddr()) ||
    244 #if !REMOVE_TILE_DEPENDENCE
    245              (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr() && (rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)))
    246 #else
    247207             ((rpcPic->getPicSym()->getTileIdxMap( pcCUTR->getAddr() ) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)))
    248 #endif
    249208             ))
    250209           )
     
    260219      pcSbacDecoder->load(&pcSbacDecoders[uiSubStrm]);  //this load is used to simplify the code (avoid to change all the call to pcSbacDecoders)
    261220    }
    262 #if WPP_SIMPLIFICATION
    263221    else if ( iSymbolMode && pcSlice->getPPS()->getNumSubstreams() <= 1 )
    264 #else
    265     else if ( iSymbolMode && !pcSlice->getPPS()->getEntropyCodingSynchro() )
    266 #endif
    267222    {
    268223      // Set variables to appropriate values to avoid later code change.
     
    273228         (iCUAddr!=0) && (iCUAddr!=rpcPic->getPicSym()->getPicSCUAddr(rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getSliceCurStartCUAddr())/rpcPic->getNumPartInCU())) // !1st in frame && !1st in slice
    274229    {
    275 #if WPP_SIMPLIFICATION
    276230      if (pcSlice->getPPS()->getNumSubstreams() > 1)
    277 #else
    278       if (pcSlice->getPPS()->getEntropyCodingSynchro())
    279 #endif
    280231      {
    281232        // We're crossing into another tile, tiles are independent.
     
    330281    }
    331282
    332 #if !REMOVE_TILE_DEPENDENCE
    333     if ( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) )
    334     {   
    335       // Synchronize cabac probabilities with LCU among Tiles
    336       if( (uiTileLCUX != 0) &&
    337           (iCUAddr == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr()) )
    338       {       
    339         TComDataCU *pcCULeft = pcCU->getCULeft();
    340         UInt uiMaxParts = 1<<(pcSlice->getSPS()->getMaxCUDepth()<<1);
    341 
    342         if ( (true/*bEnforceSliceRestriction*/ &&
    343               ((pcCULeft==NULL) || (pcCULeft->getSlice()==NULL) ||
    344                ((pcCULeft->getSCUAddr()+uiMaxParts-1) < pcSlice->getSliceCurStartCUAddr())
    345               )
    346              )||
    347              (true/*bEnforceEntropySliceRestriction*/ &&
    348               ((pcCULeft==NULL) || (pcCULeft->getSlice()==NULL) ||
    349                ((pcCULeft->getSCUAddr()+uiMaxParts-1) < pcSlice->getEntropySliceCurStartCUAddr())
    350               )
    351              )
    352            )
    353         {
    354           // Left not available.
    355         }
    356         else
    357         {
    358           // Left is available, we use it.
    359           pcSbacDecoders[uiSubStrm].loadContexts( &m_pcBufferLowLatSbacDecoders[uiTileCol-1] );
    360           pcSbacDecoder->loadContexts(&pcSbacDecoders[uiSubStrm]);  //this load is used to simplify the code (avoid to change all the call to pcSbacDecoders)
    361         }
    362       }
    363     }
    364 #endif
    365283
    366284
     
    368286    g_bJustDoIt = g_bEncDecTraceEnable;
    369287#endif
    370 #if SAO_UNIT_INTERLEAVING
    371288    if ( pcSlice->getSPS()->getUseSAO() && pcSlice->getSaoInterleavingFlag() && pcSlice->getSaoEnabledFlag() )
    372289    {
     
    384301      pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, pcSlice->getAPS()->getSaoParam(),pcCU, cuAddrInSlice, cuAddrUpInSlice, pcSlice->getSPS()->getLFCrossSliceBoundaryFlag() );
    385302    }
    386 #endif
    387303
    388304    m_pcCuDecoder->decodeCU     ( pcCU, uiIsLast );
     
    394310    if( iSymbolMode )
    395311    {
    396 #if OL_FLUSH
    397312      /*If at the end of a LCU line but not at the end of a substream, perform CABAC flush*/
    398 #if WPP_SIMPLIFICATION
    399313      if (!uiIsLast && pcSlice->getPPS()->getNumSubstreams() > 1)
    400 #else
    401       if (!uiIsLast && pcSlice->getPPS()->getCabacIstateReset())
    402 #endif
    403       {
    404 #if !REMOVE_TILE_DEPENDENCE
    405         if ((iBreakDep && (uiCol == uiTileLCUX+uiTileWidth-1) && (uiLin+iNumSubstreamsPerTile < uiTileLCUY+uiTileHeight))
    406             || (!iBreakDep && (uiCol == uiWidthInLCUs-1) && (uiLin+iNumSubstreams < pcCU->getPic()->getFrameHeightInCU())))
    407 #else
     314      {
    408315        if ((uiCol == uiTileLCUX+uiTileWidth-1) && (uiLin+iNumSubstreamsPerTile < uiTileLCUY+uiTileHeight))
    409 #endif
    410316        {
    411317          m_pcEntropyDecoder->decodeFlush();
    412318        }
    413319      }
    414 #endif
    415320      pcSbacDecoders[uiSubStrm].load(pcSbacDecoder);
    416321
    417322      //Store probabilities of second LCU in line into buffer
    418 #if WPP_SIMPLIFICATION
    419323      if (pcSlice->getPPS()->getNumSubstreams() > 1 && (uiCol == uiTileLCUX+1))
    420 #else
    421       if (pcSlice->getPPS()->getEntropyCodingSynchro() && (uiCol == uiTileLCUX+pcSlice->getPPS()->getEntropyCodingSynchro()))
    422 #endif
    423324      {
    424325        m_pcBufferSbacDecoders[uiTileCol].loadContexts( &pcSbacDecoders[uiSubStrm] );
     
    426327
    427328    }
    428 #if !REMOVE_TILE_DEPENDENCE
    429     if ( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) )
    430     {
    431       pcSbacDecoders[uiSubStrm].load(pcSbacDecoder);
    432        //Store probabilties for next tile
    433       if( (uiLin == (rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getFirstCUAddr() / uiWidthInLCUs )) &&
    434           (uiCol == rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getRightEdgePosInCU()) )
    435       {
    436         m_pcBufferLowLatSbacDecoders[uiTileCol].loadContexts( &pcSbacDecoders[uiSubStrm] );
    437       }
    438     }
    439 #endif
    440329  }
    441330
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r280 r294  
    525525  xUpdateGopSize(pcSlice);
    526526 
    527 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    528527  m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded
    529 #else
    530   m_iMaxRefPicNum = pcSlice->getSPS()->getMaxNumberOfReferencePictures()+pcSlice->getSPS()->getNumReorderFrames() + 1; // +1 to have space for the picture currently being decoded
    531 #endif
    532528
    533529#if DEPTH_MAP_GENERATION
     
    716712  }
    717713
    718 #if !LCU_SYNTAX_ALF
    719   // create ALF temporary buffer
    720   m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    721 #endif
    722714  m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    723715  m_cLoopFilter.        create( g_uiMaxCUDepth );
    724716}
    725717
    726 #if SKIPFRAME_BUGFIX
    727718Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay )
    728 #else
    729 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay )
    730 #endif
    731719{
    732720  TComPic*&   pcPic         = m_pcPic;
     
    785773  }
    786774
    787 #if NAL_REF_FLAG
    788775  m_apcSlicePilot->setReferenced(nalu.m_nalRefFlag);
    789 #else
    790   m_apcSlicePilot->setReferenced(nalu.m_nalRefIDC != NAL_REF_IDC_PRIORITY_LOWEST);
    791 #endif
    792776  m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId);
    793777
    794778  // ALF CU parameters should be part of the slice header -> needs to be fixed
    795 #if LCU_SYNTAX_ALF
    796779#if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    797780  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet(),m_apcSlicePilot->getVPS()->getDepthFlag(nalu.m_layerId));
     
    799782  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam(), m_cGopDecoder.getAlfParamSet());
    800783#endif
    801 #else
    802   m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_cGopDecoder.getAlfCuCtrlParam() );
    803 #endif
    804784  // byte align
    805785  {
     
    816796  if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence)
    817797  {
    818 #if START_DECODING_AT_CRA
    819798    if (m_prevPOC >= m_pocRandomAccess)
    820799    {
     
    823802    }
    824803    m_prevPOC = m_apcSlicePilot->getPOC();
    825 #else
    826     m_prevPOC = m_apcSlicePilot->getPOC();
    827     return true;
    828 #endif
    829804  }
    830805  // actual decoding starts here
     
    846821  }
    847822  //detect lost reference picture and insert copy of earlier frame.
    848 #if START_DECODING_AT_CRA
    849823  while(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), true, m_pocRandomAccess) > 0)
    850 #else
    851   while(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), true) > 0)
    852 #endif
    853824  {
    854825    xCreateLostPicture(m_apcSlicePilot->checkThatAllRefPicsAreAvailable(m_cListPic, m_apcSlicePilot->getRPS(), false)-1);
     
    897868  UInt i, j, p;
    898869
    899 #if !REMOVE_TILE_DEPENDENCE
    900   //set the TileBoundaryIndependenceIdr
    901   if(pcSlice->getPPS()->getTileBehaviorControlPresentFlag() == 1)
    902   {
    903     pcPic->getPicSym()->setTileBoundaryIndependenceIdr( pcSlice->getPPS()->getTileBoundaryIndependenceIdr() );
    904   }
    905   else
    906   {
    907     pcPic->getPicSym()->setTileBoundaryIndependenceIdr( pcSlice->getPPS()->getSPS()->getTileBoundaryIndependenceIdr() );
    908   }
    909 #endif
    910870
    911871  if( pcSlice->getPPS()->getColumnRowInfoPresent() == 1 )
     
    12651225{
    12661226  TComSPS* sps = new TComSPS();
    1267 #if RPS_IN_SPS
    12681227  TComRPSList* rps = new TComRPSList();
    12691228  sps->setRPSList(rps);
    1270 #endif
    12711229#if HHI_MPI || OL_QTLIMIT_PREDCODING_B0068
    12721230  m_cEntropyDecoder.decodeSPS( sps, m_isDepth );
     
    12751233#endif
    12761234  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
    1277 #if LCU_SYNTAX_ALF
    12781235  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    1279 #endif
    12801236}
    12811237
    12821238Void TDecTop::xDecodePPS()
    12831239{
    1284 #if !RPS_IN_SPS
    1285   TComRPSList* rps = new TComRPSList();
    1286 #endif
    12871240  TComPPS* pps = new TComPPS();
    1288 #if !RPS_IN_SPS
    1289   pps->setRPSList(rps);
    1290 #endif
    1291 #if TILES_OR_ENTROPY_SYNC_IDC
    12921241  m_cEntropyDecoder.decodePPS( pps, &m_parameterSetManagerDecoder );
    1293 #else
    1294   m_cEntropyDecoder.decodePPS( pps );
    1295 #endif
    12961242  m_parameterSetManagerDecoder.storePrefetchedPPS( pps );
    12971243
     
    13461292    case NAL_UNIT_CODED_SLICE:
    13471293    case NAL_UNIT_CODED_SLICE_IDR:
    1348 #if H0566_TLA
    13491294#if !QC_REM_IDV_B0046
    13501295    case NAL_UNIT_CODED_SLICE_IDV:
     
    13521297    case NAL_UNIT_CODED_SLICE_CRA:
    13531298    case NAL_UNIT_CODED_SLICE_TLA:
    1354 #else
    1355     case NAL_UNIT_CODED_SLICE_CDR:
    1356 #endif
    13571299      return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay);
    13581300      break;
     
    13751317  sps = pSPSV0;
    13761318  m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
    1377 #if LCU_SYNTAX_ALF
    13781319  m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    1379 #endif
    13801320}
    13811321
     
    14121352  else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet.
    14131353  {
    1414 #if H0566_TLA
    14151354    if( m_apcSlicePilot->getNalUnitTypeBaseViewMvc() == NAL_UNIT_CODED_SLICE_CRA )
    1416 #else
    1417     if( m_apcSlicePilot->getNalUnitTypeBaseViewMvc() == NAL_UNIT_CODED_SLICE_CDR )
    1418 #endif
    14191355    {
    14201356      m_pocRandomAccess = m_apcSlicePilot->getPOC(); // set the POC random access since we need to skip the reordered pictures in CRA.
     
    14261362    else
    14271363    {
    1428 #if START_DECODING_AT_CRA
    14291364      static bool warningMessage = false;
    14301365      if(!warningMessage)
     
    14341369      }
    14351370      return true;
    1436 #else
    1437       printf("\nUnsafe random access point. Decoder may crash.");
    1438       m_pocRandomAccess = 0;
    1439 #endif
    14401371    }
    14411372  }
     
    14581389  m_cSAO.allocSaoParam(pAPS->getSaoParam());
    14591390  pAPS->createAlfParam();
    1460 #if !LCU_SYNTAX_ALF
    1461   m_cAdaptiveLoopFilter.allocALFParam(pAPS->getAlfParam());
    1462 #endif
    14631391}
    14641392
  • branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecTop.h

    r280 r294  
    282282  Void      decodeAPS( TComAPS* cAPS) { m_cEntropyDecoder.decodeAPS(cAPS); };
    283283  Void      xActivateParameterSets();
    284 #if SKIPFRAME_BUGFIX
    285284  Bool      xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
    286 #else
    287   Bool      xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay);
    288 #endif
    289285#if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    290286  Void      xDecodeVPS();
Note: See TracChangeset for help on using the changeset viewer.