Ignore:
Timestamp:
24 Jun 2013, 21:36:38 (12 years ago)
Author:
tech
Message:

Incorporated further encoder parameters.

Location:
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp

    r492 r493  
    10541054    }
    10551055
    1056     pcSlice->setActiveMotionPredRefLayers( );
    1057 
    10581056    if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0  &&  pcSlice->getNumActiveRefLayerPics() > 0 )
    10591057    {
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncCfg.h

    r446 r493  
    7474  Int m_refIdc[MAX_NUM_REF_PICS+1];
    7575#if H_MV
    76   Int m_numInterViewRefPics;
    77   Int m_interViewRefs    [MAX_NUM_REF_PICS];
    78   Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 
     76  Int m_numActiveRefLayerPics;
     77  Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS];
     78  Int m_interViewRefPosL[2]    [MAX_NUM_REF_PICS]; 
     79  Int m_collocatedRefLayerIdx;
    7980#endif
    8081  GOPEntry()
     
    9394  , m_numRefIdc(0)
    9495#if H_MV
    95   , m_numInterViewRefPics(0)
     96  , m_numActiveRefLayerPics(0)
     97  , m_collocatedRefLayerIdx(-1)
    9698#endif
    9799  {
     
    100102    ::memset( m_refIdc,        0, sizeof(m_refIdc) );
    101103#if H_MV
    102     ::memset( m_interViewRefs,   0, sizeof(m_interViewRefs) );
     104    ::memset( m_interLayerPredLayerIdc,   0, sizeof(m_interLayerPredLayerIdc) );
    103105    ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) );
    104106    ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) );
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r491 r493  
    655655    refPicListModification->setRefPicListModificationFlagL1(0);
    656656#if H_MV
     657
     658    if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )
     659    {
     660      pcSlice->setDiscardableFlag           ( false );     
     661    }   
     662
     663    TComVPS*           vps = pcSlice->getVPS();
     664    Int       layerIdInVps = vps    ->getLayerIdInVps( getLayerId());
     665    Int numDirectRefLayers = vps    ->getNumDirectRefLayers( layerIdInVps );
     666    GOPEntry gopEntry      = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );     
     667   
     668    if ( getLayerId() > 0 && numDirectRefLayers > 0 )
     669    {         
     670      pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 );     
     671      if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 )
     672      {
     673        if ( !vps->getMaxOneActiveRefLayerFlag() )
     674        {   
     675          pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 );
     676        }
     677        for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ )
     678        {
     679          pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] );
     680        }
     681      }
     682    }
     683    assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics );
     684   
     685    if ( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0)
     686    {
     687      pcSlice->setInterLayerSamplePredOnlyFlag( gopEntry.m_numRefPics == 0 );
     688    }   
     689
    657690    pcSlice->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );
    658     pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
    659     pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ).m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
    660     xSetRefPicListModificationsMvc( pcSlice, pocCurr, iGOPid );   
     691    pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
     692    pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) );
     693    xSetRefPicListModificationsMvc( pcSlice, iGOPid );   
     694
     695    pcSlice->setActiveMotionPredRefLayers( );
     696
     697    if ( getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 && pcSlice->getEnableTMVPFlag() &&
     698        ( pcSlice->getSliceType() == B_SLICE || pcSlice->getSliceType() == P_SLICE ))
     699    {
     700      pcSlice->setAltCollocatedIndicationFlag( gopEntry.m_collocatedRefLayerIdx >= 0 );
     701      if ( pcSlice->getNumActiveRefLayerPics() && pcSlice->getNumActiveMotionPredRefLayers() > 0 )
     702      {
     703        pcSlice->setCollocatedRefLayerIdx( gopEntry.m_collocatedRefLayerIdx );
     704      }
     705    }
     706
    661707#else
    662708    pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures()));
     
    28962942#endif
    28972943#if H_MV
    2898 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid )
     2944Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt iGOPid )
    28992945{
    29002946  TComVPS* vps = pcSlice->getVPS();
     
    29192965    Int numModifications = 0;
    29202966   
    2921     for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
     2967    for( Int k = 0; k < ge.m_numActiveRefLayerPics; k++ )
    29222968    {
    29232969      numModifications +=  ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0;
     
    29312977    if( (maxRefListSize > 1) && (numModifications > 0) )
    29322978    {
    2933       for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
     2979      for( Int k = 0; k < ge.m_numActiveRefLayerPics; k++ )
    29342980      {
    29352981        if( ge.m_interViewRefPosL[li][k] >= 0 )
     
    29402986          {           
    29412987            Int refLayer  = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) );         
    2942             if( ( layer + ge.m_interViewRefs[ k ]) == refLayer )
     2988            if( ( layer + ge.m_interLayerPredLayerIdc[ k ]) == refLayer )
    29432989            {
    29442990              tempList[ targetIdx ] = orgIdx;             
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.h

    r446 r493  
    221221#endif
    222222#if H_MV
    223    Void  xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid );
     223   Void  xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt iGOPid );
    224224#endif
    225225#if L0386_DB_METRIC
  • branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncTop.cpp

    r490 r493  
    731731  m_cPPS.setWPBiPred( m_useWeightedBiPred );
    732732  m_cPPS.setOutputFlagPresentFlag( false );
     733#if H_MV
     734  m_cPPS.setNumExtraSliceHeaderBits( 1 );
     735#endif
    733736  m_cPPS.setSignHideFlag(getSignHideFlag());
    734737#if L0386_DB_METRIC
Note: See TracChangeset for help on using the changeset viewer.