Ignore:
Timestamp:
3 Feb 2014, 11:35:43 (10 years ago)
Author:
rwth
Message:
  • first version of DBBP (requires some cleanup)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.3-dev1-RWTH/source/Lib/TLibEncoder/TEncSbac.cpp

    r773 r816  
    106106, m_cInterSDCResidualSignFlagSCModel ( 1,             1,  NUM_INTER_SDC_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
    107107#endif
     108#if H_3D_DBBP
     109, m_cDBBPFlagSCModel             ( 1,             1,                 DBBP_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
     110#endif
    108111{
    109112  assert( m_numContextModels <= MAX_NUM_CTX_MOD );
     
    181184  m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    182185#endif
     186#if H_3D_DBBP
     187  m_cDBBPFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
     188#endif
    183189  // new structure
    184190  m_uiLastQp = iQp;
     
    222228      curCost += m_cInterSDCResidualSCModel.calcCost  ( curSliceType, qp, (UChar*)INIT_INTER_SDC_RESIDUAL );
    223229      curCost += m_cInterSDCResidualSignFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
     230#endif
     231#if H_3D_DBBP
     232      curCost += m_cDBBPFlagSCModel.calcCost          ( curSliceType, qp, (UChar*)INIT_DBBP_FLAG );
    224233#endif
    225234      curCost += m_cCUPartSizeSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_PART_SIZE );
     
    330339  m_cInterSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTER_SDC_SIGN_FLAG );
    331340#endif
     341#if H_3D_DBBP
     342  m_cDBBPFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DBBP_FLAG );
     343#endif
    332344  m_pcBinIf->start();
    333345}
     
    12281240    m_pcBinIf->encodeBin( uiInterDir == 2 ? 1 : 0, *( pCtx + uiCtx ) );
    12291241  }
     1242#if H_3D_DBBP
     1243  else
     1244  {
     1245    // only uni-prediction is allowed for DBBP
     1246    AOF( uiInterDir == 0 || uiInterDir == 1 );
     1247  }
     1248#endif
    12301249  if (uiInterDir < 2)
    12311250  {
     
    21582177}
    21592178#endif
     2179
     2180#if H_3D_DBBP
     2181Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
     2182{
     2183  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
     2184  AOF( ePartSize == RWTH_DBBP_PACK_MODE );
     2185  AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
     2186  AOF( !pcCU->getSlice()->getIsDepth() );
     2187 
     2188  UInt uiSymbol = pcCU->getDBBPFlag( uiAbsPartIdx ) ? 1 : 0;
     2189  m_pcBinIf->encodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) );
     2190}
     2191#endif
     2192
    21602193//! \}
Note: See TracChangeset for help on using the changeset viewer.