Ignore:
Timestamp:
13 Jul 2015, 20:38:11 (9 years ago)
Author:
seregin
Message:

port rev 4219 and rev 4246

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp

    r1230 r1235  
    109109  SliceType eSliceType  = m_pcSlice->getSliceType();
    110110
    111   Int  encCABACTableIdx = m_pcSlice->getPPS()->getEncCABACTableIdx();
     111  SliceType encCABACTableIdx = m_pcSlice->getEncCABACTableIdx();;
    112112  if (!m_pcSlice->isIntra() && (encCABACTableIdx==B_SLICE || encCABACTableIdx==P_SLICE) && m_pcSlice->getPPS()->getCabacInitPresentFlag())
    113113  {
    114     eSliceType = (SliceType) encCABACTableIdx;
     114    eSliceType = encCABACTableIdx;
    115115  }
    116116
     
    161161 * stores the index of the closest table.  This index is used for the next P/B slice when cabac_init_present_flag is true.
    162162 */
    163 Void TEncSbac::determineCabacInitIdx()
     163SliceType TEncSbac::determineCabacInitIdx()
    164164{
    165165  Int  qp              = m_pcSlice->getSliceQp();
     
    214214      }
    215215    }
    216     m_pcSlice->getPPS()->setEncCABACTableIdx( bestSliceType );
     216    return bestSliceType;
    217217  }
    218218  else
    219219  {
    220     m_pcSlice->getPPS()->setEncCABACTableIdx( I_SLICE );
    221   }
    222 }
    223 
    224 Void TEncSbac::codeVPS( TComVPS* pcVPS )
     220    return I_SLICE;
     221  }
     222}
     223
     224Void TEncSbac::codeVPS( const TComVPS* pcVPS )
    225225{
    226226  assert (0);
     
    228228}
    229229
    230 Void TEncSbac::codeSPS( TComSPS* pcSPS )
     230Void TEncSbac::codeSPS( const TComSPS* pcSPS )
    231231{
    232232  assert (0);
     
    234234}
    235235
    236 Void TEncSbac::codePPS( TComPPS* pcPPS
    237236#if CGS_3D_ASYMLUT
    238   , TEnc3DAsymLUT * pc3DAsymLUT
     237Void TEncSbac::codePPS( const TComPPS* pcPPS, TEnc3DAsymLUT * pc3DAsymLUT )
     238#else
     239Void TEncSbac::codePPS( const TComPPS* pcPPS )
    239240#endif
    240   )
    241241{
    242242  assert (0);
     
    459459      m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) );
    460460      m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 1) );
    461       if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     461      if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )
    462462      {
    463463        if (eSize == SIZE_2NxN)
     
    485485      }
    486486
    487       if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) )
     487      if ( pcCU->getSlice()->getSPS()->getUseAMP() && uiDepth < g_uiMaxCUDepth-g_uiAddCUDepth )
    488488      {
    489489        if (eSize == SIZE_Nx2N)
Note: See TracChangeset for help on using the changeset viewer.