Changeset 497 in 3DVCSoftware
- Timestamp:
- 26 Jun 2013, 15:57:04 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev0/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r483 r497 152 152 Int pocCurrPic = -MAX_INT; 153 153 Int pocLastPic = -MAX_INT; 154 155 Int layerIdLastPic = 0; 154 156 155 Int layerIdCurrPic = 0; 157 156 … … 230 229 if ( bNewPicture || !bitstreamFile ) 231 230 { 232 layerIdLastPic = layerIdCurrPic;233 231 layerIdCurrPic = nalu.m_layerId; 234 232 -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.cpp
r496 r497 517 517 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 518 518 519 #if H_MV 520 521 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + getNumActiveRefLayerPics( ); 519 #if H_MV 520 Int numPocTotalCurr = ( getInterRefEnabledInRPLFlag() ? ( NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr ) : 0 ) + getNumActiveRefLayerPics( ); 522 521 assert( numPocTotalCurr == getNumRpsCurrTempList() ); 523 522 #else … … 613 612 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm)); 614 613 614 #if H_MV 615 Int numPocSt = getInterRefEnabledInRPLFlag( ) ? (NumPocStCurr0 + NumPocStCurr1) : 0; 616 617 for (Int li = 0; li < 2; li++) 618 { 619 if ( m_eSliceType == P_SLICE && li == 1 ) 620 { 621 m_aiNumRefIdx[1] = 0; 622 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1])); 623 } 624 else 625 { 626 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[ li ] - 1 ); rIdx ++) 627 { 628 Bool listModified = m_RefPicListModification.getRefPicListModificationFlagL( li ); 629 Int orgIdx = listModified ? m_RefPicListModification.getRefPicSetIdxL(li, rIdx) : (rIdx % numPocTotalCurr); 630 631 m_apcRefPicList [li][rIdx] = ( li == 0 ) ? rpsCurrList0[ orgIdx ] : rpsCurrList1[ orgIdx ]; 632 m_bIsUsedAsLongTerm[li][rIdx] = ( orgIdx >= numPocSt ) ; 633 } 634 } 635 } 636 #else 637 615 638 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[0]-1); rIdx ++) 616 639 { … … 633 656 } 634 657 } 658 #endif 635 659 } 636 660 … … 669 693 } 670 694 #if H_MV 671 numRpsCurrTempList = numRpsCurrTempList+ getNumActiveRefLayerPics();695 numRpsCurrTempList = ( getInterRefEnabledInRPLFlag() ? numRpsCurrTempList : 0 ) + getNumActiveRefLayerPics(); 672 696 #endif 673 697 return numRpsCurrTempList; -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibCommon/TComSlice.h
r495 r497 1266 1266 #if H_MV 1267 1267 // Why not an listIdx for all members, would avoid code duplication?? 1268 Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; }; 1269 Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag; }; 1268 Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; } 1269 UInt getRefPicSetIdxL(UInt li, UInt idx ) { return ( li == 0 ) ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ; } 1270 Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag; } 1271 Bool getRefPicListModificationFlagL(UInt li ) { return ( li== 0) ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1; } 1270 1272 #endif 1271 1273 }; -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r495 r497 691 691 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 692 692 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer.size() ) ) ); 693 xSetRefPicListModificationsMvc( pcSlice, iGOPid ); 693 694 xSetRefPicListModificationsMv( pcSlice, iGOPid ); 694 695 695 696 pcSlice->setActiveMotionPredRefLayers( ); … … 2948 2949 #endif 2949 2950 #if H_MV 2950 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt iGOPid ) 2951 { 2952 TComVPS* vps = pcSlice->getVPS(); 2951 Void TEncGOP::xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ) 2952 { 2953 2953 Int layer = pcSlice->getLayerIdInVps( ); 2954 2954 2955 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || vps->getNumDirectRefLayers( layer) == 0 )2955 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 ) 2956 2956 { 2957 2957 return; … … 2960 2960 // analyze inter-view modifications 2961 2961 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( layer > 0) ) ? MAX_GOP : iGOPid ); 2962 2963 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 2964 2962 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() ); 2963 2965 2964 Int maxRefListSize = pcSlice->getNumRpsCurrTempList(); 2966 Int numTemporalRefs = maxRefListSize - vps->getNumDirectRefLayers( layer ); 2967 2968 2965 Int numTemporalRefs = maxRefListSize - pcSlice->getNumActiveRefLayerPics(); 2966 2969 2967 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1 2970 2968 { 2971 Int numModifications = 0; 2972 2973 for( Int k = 0; k < ge.m_numActiveRefLayerPics; k++ ) 2974 { 2975 numModifications += ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0; 2976 } 2977 2978 // set inter-view modifications 2969 // set inter-view modifications 2970 Int tempList[16]; 2971 for( Int k = 0; k < 16; k++ ) 2972 { 2973 tempList[ k ] = -1; 2974 } 2975 2979 2976 Bool isModified = false; 2980 Int tempList[16]; 2981 for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; } 2982 2983 if( (maxRefListSize > 1) && (numModifications > 0) ) 2984 { 2985 for( Int k = 0; k < ge.m_numActiveRefLayerPics; k++ ) 2986 { 2987 if( ge.m_interViewRefPosL[li][k] >= 0 ) 2988 { 2989 Int orgIdx = numTemporalRefs; 2990 Int targetIdx = ge.m_interViewRefPosL[ li ][ k ]; 2991 for( Int idx = 0; idx < vps->getNumDirectRefLayers( layer ); idx++ ) 2992 { 2993 Int refLayer = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) ); 2994 if( ( layer + ge.m_interLayerPredLayerIdc[ k ]) == refLayer ) 2995 { 2996 tempList[ targetIdx ] = orgIdx; 2997 isModified = ( targetIdx != orgIdx ); 2998 } 2999 orgIdx++; 3000 } 3001 } 3002 } 3003 } 3004 2977 if ( maxRefListSize > 1 ) 2978 { 2979 for( Int k = 0, orgIdx = numTemporalRefs; k < ge.m_numActiveRefLayerPics; k++, orgIdx++ ) 2980 { 2981 Int targetIdx = ge.m_interViewRefPosL[ li ][ k ]; 2982 2983 isModified = ( targetIdx != orgIdx ) && ( targetIdx >= 0 ); 2984 if ( isModified ) 2985 { 2986 assert( tempList[ targetIdx ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position 2987 tempList[ targetIdx ] = orgIdx; 2988 } 2989 } 2990 } 2991 2992 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 3005 2993 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 3006 2994 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 2995 if( isModified ) 2996 { 2997 Int temporalRefIdx = 0; 2998 for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ ) 2999 { 3000 if( tempList[i] >= 0 ) 3001 { 3002 refPicListModification->setRefPicSetIdxL( li, i, tempList[i] ); 3003 } 3004 else 3005 { 3006 refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx ); 3007 temporalRefIdx++; 3008 } 3009 } 3010 } 3023 3011 } 3024 3012 } -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.h
r493 r497 221 221 #endif 222 222 #if H_MV 223 Void xSetRefPicListModificationsMv c( TComSlice* pcSlice, UInt iGOPid );223 Void xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ); 224 224 #endif 225 225 #if L0386_DB_METRIC
Note: See TracChangeset for help on using the changeset viewer.