Ignore:
Timestamp:
22 May 2015, 05:38:04 (10 years ago)
Author:
sharpjp-htm
Message:

Migration of illumination compensation(NH_3D_IC) and small fix(H_MV_ENC_DEC_TRAC_FIX)

Location:
branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1200 r1225  
    21822182      xCodePredWeightTable( pcSlice );
    21832183    }
    2184 #if H_3D_IC
     2184#if NH_3D_IC
    21852185    else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE )
    21862186      && !pcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0
     
    21912191      if( pcSlice->getApplyIC() )
    21922192      {
    2193         WRITE_FLAG( pcSlice->getIcSkipParseFlag() ? 1 : 0, "ic_skip_mergeidx0" );
     2193        WRITE_FLAG( pcSlice->getIcSkipParseFlag() ? 1 : 0, "slice_ic_disabled_merge_zero_idx_flag" );
    21942194      }
    21952195    }
     
    25852585#endif
    25862586
    2587 #if H_3D_IC
     2587#if NH_3D_IC
    25882588Void TEncCavlc::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    25892589{
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncCavlc.h

    r1200 r1225  
    129129  Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    130130#endif
    131 #if H_3D_IC
     131#if NH_3D_IC
    132132  Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    133133#endif
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncCfg.h

    r1200 r1225  
    572572  Void      setMaxTotalCUDepth              ( UInt  u )      { m_maxTotalCUDepth = u; }
    573573  Void      setLog2DiffMaxMinCodingBlockSize( UInt  u )      { m_log2DiffMaxMinCodingBlockSize = u; }
    574 #if H_3D_IC
     574#if NH_3D_IC
    575575  Void       setUseIC                       ( Bool bVal )    { m_bUseIC = bVal; }
    576576  Bool       getUseIC                       ()               { return m_bUseIC; }
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncCu.cpp

    r1200 r1225  
    505505  }
    506506
    507 #if H_3D_IC
     507#if NH_3D_IC
    508508  Bool bICEnabled = rpcTempCU->getSlice()->getViewIndex() && ( rpcTempCU->getSlice()->getSliceType() == P_SLICE || rpcTempCU->getSlice()->getSliceType() == B_SLICE ) && !rpcTempCU->getSlice()->getIsDepth();
    509509  bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC();
     
    642642      if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )
    643643      {
    644 #if H_3D_IC
     644#if NH_3D_IC
    645645        for( UInt uiICId = 0; uiICId < ( bICEnabled ? 2 : 1 ); uiICId++ )
    646646        {
     
    650650        if(m_pcEncCfg->getUseEarlySkipDetection())
    651651        {
    652 #if H_3D_IC
     652#if NH_3D_IC
    653653            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    654654#endif
     
    664664        }
    665665        // SKIP
    666 #if H_3D_IC
     666#if NH_3D_IC
    667667          rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    668668#endif
     
    680680        {
    681681          // 2Nx2N, NxN
    682 #if H_3D_IC
     682#if NH_3D_IC
    683683            rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth);
    684684#endif
     
    709709          }
    710710        }
    711 #if H_3D_IC
     711#if NH_3D_IC
    712712        }
    713713#endif
     
    15771577    m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    15781578#endif
    1579 #if H_3D_IC
     1579#if NH_3D_IC
    15801580    m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    15811581#endif
     
    16201620  m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );
    16211621#endif
    1622 #if H_3D_IC
     1622#if NH_3D_IC
    16231623  m_pcEntropyCoder->encodeICFlag  ( pcCU, uiAbsPartIdx );
    16241624#endif
     
    17771777  }
    17781778  UChar uhDepth = rpcTempCU->getDepth( 0 );
    1779 #if H_3D_IC
     1779#if NH_3D_IC
    17801780  Bool bICFlag = rpcTempCU->getICFlag( 0 );
    17811781#endif
     
    18621862    rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
    18631863    rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
    1864 #if H_3D_IC
     1864#if NH_3D_IC
    18651865    rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth );
    18661866#endif
     
    19051905    for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
    19061906    {
    1907 #if H_3D_IC
     1907#if NH_3D_IC
    19081908      if( rpcTempCU->getSlice()->getApplyIC() && rpcTempCU->getSlice()->getIcSkipParseFlag() )
    19091909      {
     
    19221922          // set MC parameters
    19231923          rpcTempCU->setPredModeSubParts( MODE_INTER, 0, uhDepth ); // interprets depth relative to CTU level
    1924 #if H_3D_IC
     1924#if NH_3D_IC
    19251925          rpcTempCU->setICFlagSubParts( bICFlag, 0, 0, uhDepth );
    19261926#endif
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncEntropy.cpp

    r1200 r1225  
    148148}
    149149
    150 #if H_3D_IC
     150#if NH_3D_IC
    151151Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
    152152{
     153#if H_3D_ARP
    153154  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
     155#else
     156  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
     157#endif
    154158  {
    155159    return;
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncEntropy.h

    r1200 r1225  
    8787  virtual Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    8888#endif
    89 #if H_3D_IC
     89#if NH_3D_IC
    9090  virtual Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    9191#endif
     
    176176  Void encodeARPW         ( TComDataCU* pcCU, UInt uiAbspartIdx );
    177177#endif
    178 #if H_3D_IC
     178#if NH_3D_IC
    179179  Void encodeICFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    180180#endif
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncGOP.cpp

    r1213 r1225  
    155155#endif
    156156#endif
    157 #if H_3D_IC
     157#if NH_3D_IC
    158158  m_aICEnableCandidate   = pcTEncTop->getICEnableCandidate();
    159159  m_aICEnableNum         = pcTEncTop->getICEnableNum();
     
    14901490    }
    14911491#endif
    1492 #if H_3D_IC
     1492#if NH_3D_IC
    14931493    pcSlice->setICEnableCandidate( m_aICEnableCandidate );         
    14941494    pcSlice->setICEnableNum( m_aICEnableNum );         
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncGOP.h

    r1200 r1225  
    132132#endif
    133133#endif
    134 #if H_3D_IC
     134#if NH_3D_IC
    135135  Int*                    m_aICEnableCandidate;
    136136  Int*                    m_aICEnableNum;
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncSbac.cpp

    r1200 r1225  
    7171, m_cCUPUARPWSCModel                   ( 1,             1,                      NUM_ARPW_CTX                         , m_contextModels + m_numContextModels, m_numContextModels)
    7272#endif                                                                                                               
    73 #if H_3D_IC                                                                                                         
     73#if NH_3D_IC                                                                                                         
    7474, m_cCUICFlagSCModel                   ( 1,             1,                      NUM_IC_FLAG_CTX                      , m_contextModels + m_numContextModels, m_numContextModels)
    7575#endif
     
    151151  m_cCUPUARPWSCModel.initBuffer                   ( eSliceType, iQp, (UChar*)INIT_ARPW );
    152152#endif
    153 #if H_3D_IC
     153#if NH_3D_IC
    154154  m_cCUICFlagSCModel.initBuffer                   ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
    155155#endif
     
    238238      curCost += m_cCUPUARPWSCModel.calcCost                   ( curSliceType, qp, (UChar*)INIT_ARPW );
    239239#endif                                                     
    240 #if H_3D_IC                                               
     240#if NH_3D_IC                                               
    241241      curCost += m_cCUICFlagSCModel.calcCost                   ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
    242242#endif                                                     
     
    305305  m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
    306306#endif
    307 #if H_3D_IC
    308   m_cCUICFlagSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
    309 #endif
    310307#if H_3D_DIM
    311308  m_cDepthIntraModeSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_DEPTH_INTRA_MODE );
     
    994991#endif
    995992
    996 #if H_3D_IC
     993#if NH_3D_IC
    997994/** code Illumination Compensation flag
    998995 * \param pcCU
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncSbac.h

    r1200 r1225  
    143143  Void codeARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    144144#endif
    145 #if H_3D_IC
     145#if NH_3D_IC
    146146  Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    147147#endif
     
    215215  ContextModel3DBuffer m_cCUPUARPWSCModel;
    216216#endif
    217 #if H_3D_IC
     217#if NH_3D_IC
    218218  ContextModel3DBuffer m_cCUICFlagSCModel;
    219219#endif
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncSearch.cpp

    r1200 r1225  
    340340
    341341  piRefSrch = rcStruct.piRefY + iSearchY * rcStruct.iYStride + iSearchX;
    342 #if H_3D_IC
     342#if NH_3D_IC
    343343  m_cDistParam.bUseIC = pcPatternKey->getICFlag();
    344344#endif
     
    851851
    852852    setDistParamComp(COMPONENT_Y);
    853 #if H_3D_IC
     853#if NH_3D_IC
    854854    m_cDistParam.bUseIC = pcPatternKey->getICFlag();
    855855#endif
     
    38573857                            iWidth, iHeight, m_pcEncCfg->getUseHADME() && (pcCU->getCUTransquantBypass(iPartIdx) == 0) );
    38583858
    3859 #if H_3D_IC
     3859#if NH_3D_IC
    38603860  cDistParam.bUseIC = false;
    38613861#endif
     
    50005000  pcCU->clipMv( cMvCand );
    50015001
    5002 #if H_3D_IC
     5002#if NH_3D_IC
    50035003  Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() );
    50045004#endif
     
    50155015      , false
    50165016#endif
    5017 #if H_3D_IC
     5017#if NH_3D_IC
    50185018    , bICFlag
    50195019#endif
     
    50605060  pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
    50615061
    5062 #if H_3D_IC
     5062#if NH_3D_IC
    50635063  Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getViewIndex() != pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getViewIndex() );
    50645064  pcPatternKey->setICFlag( bICFlag );
     
    52505250      m_cDistParam.bitDepth = pcPatternKey->getBitDepthY();
    52515251
    5252 #if H_3D_IC
     5252#if NH_3D_IC
    52535253      m_cDistParam.bUseIC = pcPatternKey->getICFlag();
    52545254#endif
     
    57845784    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
    57855785#endif
    5786 #if H_3D_IC
     5786#if NH_3D_IC
    57875787    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    57885788#endif
     
    71007100    m_pcEntropyCoder->encodeARPW( pcCU, 0 );
    71017101#endif
    7102 #if H_3D_IC
     7102#if NH_3D_IC
    71037103    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    71047104#endif
     
    71277127    m_pcEntropyCoder->encodeARPW( pcCU , 0  );
    71287128#endif
    7129 #if H_3D_IC
     7129#if NH_3D_IC
    71307130    m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );
    71317131#endif
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncSlice.cpp

    r1200 r1225  
    226226  rpcSlice->setPicOutputFlag( true );
    227227  rpcSlice->setPOC( pocCurr );
    228 #if H_3D_IC
     228#if NH_3D_IC
    229229  rpcSlice->setApplyIC( false );
    230230#endif
     
    823823#endif
    824824
    825 #if H_3D_IC
    826   if ( pcEncTop->getViewIndex() && pcEncTop->getUseIC() &&
     825#if NH_3D_IC
     826  if ( m_pcCfg->getViewIndex() && m_pcCfg->getUseIC() &&
    827827       !( ( pcSlice->getSliceType() == P_SLICE && pcSlice->getPPS()->getUseWP() ) || ( pcSlice->getSliceType() == B_SLICE && pcSlice->getPPS()->getWPBiPred() ) )
    828828     )
    829829  {
    830     pcSlice ->xSetApplyIC(pcEncTop->getUseICLowLatencyEnc());
     830    pcSlice ->xSetApplyIC(m_pcCfg->getUseICLowLatencyEnc());
    831831    if ( pcSlice->getApplyIC() )
    832832    {
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncTop.cpp

    r1200 r1225  
    7979  m_ivPicLists = NULL;
    8080#endif
    81 #if H_3D_IC
     81#if NH_3D_IC
    8282  m_aICEnableCandidate = NULL;
    8383  m_aICEnableNum = NULL;
     
    227227
    228228  xInitPPSforTiles();
    229 #if H_3D_IC
     229#if NH_3D_IC
    230230  m_aICEnableCandidate = new Int[ 10 ];
    231231  m_aICEnableNum = new Int[ 10 ];
  • branches/HTM-14.1-update-dev2-Sharp/source/Lib/TLibEncoder/TEncTop.h

    r1200 r1225  
    8181  TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers
    8282#endif
    83 #if H_3D_IC
     83#if NH_3D_IC
    8484  Int *m_aICEnableCandidate;
    8585  Int *m_aICEnableNum;
     
    158158  TComPicLists* getIvPicLists() { return m_ivPicLists; }
    159159#endif
    160 #if H_3D_IC
     160#if NH_3D_IC
    161161  Int*      getICEnableCandidate() { return m_aICEnableCandidate; }
    162162  Int*      getICEnableNum() { return m_aICEnableNum; }
     
    208208  Void                    setSps3dExtension     ( TComSps3dExtension sps3dExtension ) { m_cSPS.setSps3dExtension( sps3dExtension );  };
    209209#endif
    210 #if H_3D_IC
     210#if NH_3D_IC
    211211  Void                    setICEnableCandidate         ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }
    212212  Void                    setICEnableNum         ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
Note: See TracChangeset for help on using the changeset viewer.