Changeset 493 in 3DVCSoftware for branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder
- Timestamp:
- 24 Jun 2013, 21:36:38 (12 years ago)
- 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 1054 1054 } 1055 1055 1056 pcSlice->setActiveMotionPredRefLayers( );1057 1058 1056 if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && pcSlice->getNumActiveRefLayerPics() > 0 ) 1059 1057 { -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncCfg.h
r446 r493 74 74 Int m_refIdc[MAX_NUM_REF_PICS+1]; 75 75 #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; 79 80 #endif 80 81 GOPEntry() … … 93 94 , m_numRefIdc(0) 94 95 #if H_MV 95 , m_numInterViewRefPics(0) 96 , m_numActiveRefLayerPics(0) 97 , m_collocatedRefLayerIdx(-1) 96 98 #endif 97 99 { … … 100 102 ::memset( m_refIdc, 0, sizeof(m_refIdc) ); 101 103 #if H_MV 102 ::memset( m_inter ViewRefs, 0, sizeof(m_interViewRefs) );104 ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); 103 105 ::memset( m_interViewRefPosL[0], -1, sizeof(m_interViewRefPosL[0]) ); 104 106 ::memset( m_interViewRefPosL[1], -1, sizeof(m_interViewRefPosL[1]) ); -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r491 r493 655 655 refPicListModification->setRefPicListModificationFlagL1(0); 656 656 #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 657 690 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 661 707 #else 662 708 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); … … 2896 2942 #endif 2897 2943 #if H_MV 2898 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UIntiGOPid )2944 Void TEncGOP::xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt iGOPid ) 2899 2945 { 2900 2946 TComVPS* vps = pcSlice->getVPS(); … … 2919 2965 Int numModifications = 0; 2920 2966 2921 for( Int k = 0; k < ge.m_num InterViewRefPics; k++ )2967 for( Int k = 0; k < ge.m_numActiveRefLayerPics; k++ ) 2922 2968 { 2923 2969 numModifications += ( ge.m_interViewRefPosL[li][k] >= 0 ) ? 1 : 0; … … 2931 2977 if( (maxRefListSize > 1) && (numModifications > 0) ) 2932 2978 { 2933 for( Int k = 0; k < ge.m_num InterViewRefPics; k++ )2979 for( Int k = 0; k < ge.m_numActiveRefLayerPics; k++ ) 2934 2980 { 2935 2981 if( ge.m_interViewRefPosL[li][k] >= 0 ) … … 2940 2986 { 2941 2987 Int refLayer = vps->getLayerIdInVps( vps->getRefLayerId( layer, idx ) ); 2942 if( ( layer + ge.m_inter ViewRefs[ k ]) == refLayer )2988 if( ( layer + ge.m_interLayerPredLayerIdc[ k ]) == refLayer ) 2943 2989 { 2944 2990 tempList[ targetIdx ] = orgIdx; -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncGOP.h
r446 r493 221 221 #endif 222 222 #if H_MV 223 Void xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UIntiGOPid );223 Void xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt iGOPid ); 224 224 #endif 225 225 #if L0386_DB_METRIC -
branches/HTM-DEV-0.3-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r490 r493 731 731 m_cPPS.setWPBiPred( m_useWeightedBiPred ); 732 732 m_cPPS.setOutputFlagPresentFlag( false ); 733 #if H_MV 734 m_cPPS.setNumExtraSliceHeaderBits( 1 ); 735 #endif 733 736 m_cPPS.setSignHideFlag(getSignHideFlag()); 734 737 #if L0386_DB_METRIC
Note: See TracChangeset for help on using the changeset viewer.