Ignore:
Timestamp:
15 Jul 2015, 14:57:32 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev2@1277.

Location:
branches/HTM-14.1-update-dev1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev1

  • branches/HTM-14.1-update-dev1/source/Lib/TLibDecoder/TDecSbac.cpp

    r1258 r1279  
    7373, m_cCUMergeFlagExtSCModel                   ( 1,             1,                      NUM_MERGE_FLAG_EXT_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
    7474, m_cCUMergeIdxExtSCModel                    ( 1,             1,                      NUM_MERGE_IDX_EXT_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    75 #if H_3D_ARP
     75#if NH_3D_ARP
    7676, m_cCUPUARPWSCModel          ( 1,             1,               NUM_ARPW_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
    7777#endif
    78 #if H_3D_IC
     78#if NH_3D_IC
    7979, m_cCUICFlagSCModel          ( 1,             1,               NUM_IC_FLAG_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
    8080#endif
     
    120120, m_cDdcFlagSCModel                          ( 1,             1,                     NUM_DDC_FLAG_CTX                      , m_contextModels + m_numContextModels, m_numContextModels)
    121121#endif
    122 #if H_3D_DBBP
     122#if NH_3D_DBBP
    123123, m_cDBBPFlagSCModel                         ( 1,             1,                     DBBP_NUM_FLAG_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
    124124#endif
     
    165165  m_cCUMergeFlagExtSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
    166166  m_cCUMergeIdxExtSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
    167 #if H_3D_ARP
     167#if NH_3D_ARP
    168168  m_cCUPUARPWSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_ARPW );
    169169#endif
    170 #if H_3D_IC
     170#if NH_3D_IC
    171171  m_cCUICFlagSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_IC_FLAG );
    172172#endif
     
    211211  m_cDdcFlagSCModel.initBuffer                    ( sliceType, qp, (UChar*)INIT_DDC_FLAG );
    212212#endif
    213 #if H_3D_DBBP
     213#if NH_3D_DBBP
    214214  m_cDBBPFlagSCModel.initBuffer                   ( sliceType, qp, (UChar*)INIT_DBBP_FLAG );
    215215#endif
     
    238238}
    239239
    240 #if H_3D_ARP
    241   m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
    242 #endif
    243 #if H_3D_IC
    244   m_cCUICFlagSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
    245 #endif
    246 #if H_3D_DBBP
    247   m_cDBBPFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
    248 #endif
    249240
    250241
     
    651642
    652643  UInt uiSymbol;
    653 #if H_3D_QTLPC
     644#if NH_3D_QTLPC
    654645  Bool bParseSplitFlag    = true;
    655646  Bool    bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag();
     
    666657#endif
    667658  {
    668     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     659    TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr());
    669660    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
    670661    bParseSplitFlag         = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth);
     
    681672  DTRACE_CABAC_T( "\tSplitFlag\n" )
    682673#endif
    683 #if H_3D_QTLPC
     674#if NH_3D_QTLPC
    684675  }
    685676  else
     
    713704  assert ( pcCU->getSlice()->getSPS()->getLog2DiffMaxMinCodingBlockSize() == log2DiffMaxMinCodingBlockSize);
    714705
    715 #if H_3D_QTLPC
     706#if NH_3D_QTLPC
    716707  Bool bParsePartSize    = true;
    717708
     
    732723#endif
    733724  {
    734     TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr());
     725    TComDataCU *pcTextureCU = pcTexture->getCtu(pcCU->getCtuRsAddr());
    735726    assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth);
    736727    if(pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth )
     
    749740  if ( pcCU->isIntra( uiAbsPartIdx ) )
    750741  {
    751 #if H_3D_QTLPC
     742#if NH_3D_QTLPC
    752743    if(bParsePartSize)
    753744    {
     
    762753    }
    763754    eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN;
    764 #if H_3D_QTLPC
     755#if NH_3D_QTLPC
    765756    }
    766757#endif
     
    780771  else
    781772  {
    782 #if H_3D_QTLPC
     773#if NH_3D_QTLPC
    783774    if(bParsePartSize)
    784775    {
     
    824815      }
    825816    }
    826 #if H_3D_QTLPC
     817#if NH_3D_QTLPC
    827818      }
    828819      else if(uiTexturePart == SIZE_2NxN || uiTexturePart == SIZE_2NxnU || uiTexturePart == SIZE_2NxnD)
    829820      {
    830821        UInt uiMaxNumBits = 1;
    831         if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     822        if ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )
    832823        {
    833824          uiMaxNumBits ++;
     
    835826        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    836827        {
    837           m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     828          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype) );
    838829          if ( uiSymbol )
    839830          {
     
    843834        }
    844835        eMode = (PartSize) uiMode;
    845         if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 )
     836        if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 )
    846837        {
    847838          eMode = SIZE_2NxN;
    848839        }
    849         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0  && uiSymbol==0)
     840        else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0)  && uiSymbol==0)
    850841        {
    851842          eMode = SIZE_2NxN;
    852843        }
    853         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0)
    854         {
    855           m_pcTDecBinIf->decodeBinEP(uiSymbol);
     844        else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0)
     845        {
     846          m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype));
    856847          eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD);
    857848        }
     
    860851      {
    861852        UInt uiMaxNumBits = 1;
    862         if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     853        if (  ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )
    863854        {
    864855          uiMaxNumBits ++;
     
    866857        for ( UInt ui = 0; ui < uiMaxNumBits; ui++ )
    867858        {
    868           m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) );
     859          m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype));
    869860          if ( uiSymbol )
    870861          {
     
    874865        }
    875866        eMode = (PartSize) uiMode;
    876         if(uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==1 )
     867        if(uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==1 )
    877868        {
    878869          eMode = SIZE_Nx2N;
    879870        }
    880         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth )==0  && uiSymbol==0)
     871        else if (uiMode && (( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize )==0)  && uiSymbol==0)
    881872        {
    882873          eMode = SIZE_Nx2N;
    883874        }
    884         else if (uiMode && pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) && uiSymbol==0)
    885         {
    886           m_pcTDecBinIf->decodeBinEP(uiSymbol);
     875        else if (uiMode && ( ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiDepth < log2DiffMaxMinCodingBlockSize ) && uiSymbol==0)
     876        {
     877          m_pcTDecBinIf->decodeBinEP(uiSymbol RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype));
    887878          eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N);
    888879        }
     
    896887      DTRACE_CU("part_mode", eMode )
    897888#endif
    898 #if H_3D_QTLPC
     889#if NH_3D_QTLPC
    899890    }
    900891#endif
     
    22782269}
    22792270
    2280 #if H_3D_ARP
     2271#if NH_3D_ARP
    22812272Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    22822273{
    2283   UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;
    22842274  UInt uiW = 0;
    22852275  UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
    22862276  UInt uiCode = 0;
    22872277
    2288   assert ( uiMaxW > 0 );
    2289 
    2290   m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) );
     2278  m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG));
    22912279
    22922280  uiW = uiCode;
    22932281  if( 1 == uiW )   
    22942282  {
    2295     m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) );
     2283    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__ARP_FLAG));
    22962284    uiW += ( 1 == uiCode ? 1 : 0 );
    22972285  }
     
    23032291#endif
    23042292
    2305 #if H_3D_IC
     2293#if NH_3D_IC
    23062294/** parse illumination compensation flag
    23072295 * \param pcCU
     
    23132301{
    23142302  UInt uiSymbol = 0;
    2315   m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) );
     2303  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__3D_IC) );
     2304
    23162305#if !H_MV_ENC_DEC_TRAC
    23172306  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     
    25232512#endif
    25242513
    2525 #if H_3D_DBBP
     2514#if NH_3D_DBBP
    25262515Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    25272516{
     
    25312520  UInt uiSymbol = 0;
    25322521 
    2533   m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
     2522  m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(STATS__CABAC_BITS__DBBP_FLAG) );
    25342523  DTRACE_CU("dbbp_flag", uiSymbol)
    25352524  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
    25362525  AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N );
    2537   UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
     2526  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4;
    25382527  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth);
    25392528  pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
Note: See TracChangeset for help on using the changeset viewer.