Changeset 821 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 8 Jul 2014, 06:07:59 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r820 r821 516 516 #endif 517 517 518 #if SVC_EXTENSION519 for( i = 0; i < m_activeNumILRRefIdx; i++ )520 {521 UInt refLayerIdc = m_interLayerPredLayerIdc[i];522 //inter-layer reference picture523 #if O0225_MAX_TID_FOR_REF_LAYERS524 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId) : 0;525 #else526 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0;527 #endif528 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) )529 {530 #if REF_IDX_MFM531 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && getMFMEnabledFlag())532 {533 ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] );534 }535 else536 {537 ilpPic[refLayerIdc]->initUpsampledMvField();538 }539 #endif540 ilpPic[refLayerIdc]->setIsLongTerm(1);541 }542 }543 #endif544 518 // ref_pic_list_init 545 519 TComPic* rpsCurrList0[MAX_NUM_REF+1]; … … 3895 3869 #endif 3896 3870 3897 #if REF_IDX_MFM3898 Void TComSlice::setRefPOCListILP( TComPic** ilpPic, TComPic** pcRefPicRL )3899 {3900 for( UInt i = 0; i < m_activeNumILRRefIdx; i++ )3901 {3902 UInt refLayerIdc = m_interLayerPredLayerIdc[i];3903 3904 TComPic* pcRefPicBL = pcRefPicRL[refLayerIdc];3905 3906 //set reference picture POC of each ILP reference3907 Int thePoc = ilpPic[refLayerIdc]->getPOC();3908 assert(thePoc == pcRefPicBL->getPOC());3909 3910 ilpPic[refLayerIdc]->getSlice(0)->setBaseColPic( refLayerIdc, pcRefPicBL );3911 3912 //copy layer id from the reference layer3913 ilpPic[refLayerIdc]->setLayerId( pcRefPicBL->getLayerId() );3914 3915 //copy slice type from the reference layer3916 ilpPic[refLayerIdc]->getSlice(0)->setSliceType( pcRefPicBL->getSlice(0)->getSliceType() );3917 3918 //copy "used for reference"3919 ilpPic[refLayerIdc]->getSlice(0)->setReferenced( pcRefPicBL->getSlice(0)->isReferenced() );3920 3921 for( Int refList = 0; refList < 2; refList++ )3922 {3923 RefPicList refPicList = RefPicList( refList );3924 3925 //set reference POC of ILP3926 ilpPic[refLayerIdc]->getSlice(0)->setNumRefIdx(refPicList, pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList));3927 assert(ilpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) >= 0);3928 assert(ilpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) <= MAX_NUM_REF);3929 3930 //initialize reference POC of ILP3931 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx++)3932 {3933 ilpPic[refLayerIdc]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(refPicList, refIdx), refPicList, refIdx);3934 ilpPic[refLayerIdc]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(refPicList, refIdx), refPicList, refIdx);3935 }3936 3937 for(Int refIdx = pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx < MAX_NUM_REF; refIdx++)3938 {3939 ilpPic[refLayerIdc]->getSlice(0)->setRefPOC(0, refPicList, refIdx);3940 ilpPic[refLayerIdc]->getSlice(0)->setRefPic(NULL, refPicList, refIdx);3941 }3942 3943 //copy reference pictures' marking from the reference layer3944 for(Int j = 0; j < MAX_NUM_REF + 1; j++)3945 {3946 ilpPic[refLayerIdc]->getSlice(0)->setIsUsedAsLongTerm(refList, j, pcRefPicBL->getSlice(0)->getIsUsedAsLongTerm(refList, j));3947 }3948 }3949 }3950 return;3951 }3952 #endif3953 3954 3871 Void TComSlice::setILRPic(TComPic **pcIlpPic) 3955 3872 { … … 3960 3877 if( pcIlpPic[refLayerIdc] ) 3961 3878 { 3962 pcIlpPic[refLayerIdc]->copyUpsampledPictureYuv( m_pcPic->getFullPelBaseRec( refLayerIdc ), pcIlpPic[refLayerIdc]->getPicYuvRec() ); 3879 TComPic* pcRefPicBL = m_pcBaseColPic[refLayerIdc]; 3880 3881 pcIlpPic[refLayerIdc]->copyUpsampledPictureYuv( m_pcPic->getFullPelBaseRec( refLayerIdc ), pcIlpPic[refLayerIdc]->getPicYuvRec() ); 3882 pcIlpPic[refLayerIdc]->getSlice(0)->setBaseColPic( refLayerIdc, pcRefPicBL ); 3883 3884 //set reference picture POC of each ILP reference 3963 3885 pcIlpPic[refLayerIdc]->getSlice(0)->setPOC( m_iPOC ); 3964 pcIlpPic[refLayerIdc]->setLayerId( m_pcBaseColPic[refLayerIdc]->getLayerId() ); //set reference layerId 3886 3887 //set temporal Id 3888 pcIlpPic[refLayerIdc]->getSlice(0)->setTLayer( m_uiTLayer ); 3889 3890 //copy layer id from the reference layer 3891 pcIlpPic[refLayerIdc]->setLayerId( pcRefPicBL->getLayerId() ); 3892 3965 3893 pcIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension( false ); 3966 3894 pcIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder(); … … 3969 3897 pcIlpPic[refLayerIdc]->getPicSym()->getCU(j)->setLayerId( pcIlpPic[refLayerIdc]->getLayerId() ); 3970 3898 } 3971 } 3972 } 3973 } 3974 3899 pcIlpPic[refLayerIdc]->setIsLongTerm(1); 3900 3901 #if REF_IDX_MFM 3902 if( m_bMFMEnabledFlag && !(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) ) 3903 { 3904 //set reference picture POC of each ILP reference 3905 assert( pcIlpPic[refLayerIdc]->getPOC() == pcRefPicBL->getPOC() ); 3906 3907 //copy slice type from the reference layer 3908 pcIlpPic[refLayerIdc]->getSlice(0)->setSliceType( pcRefPicBL->getSlice(0)->getSliceType() ); 3909 3910 //copy "used for reference" 3911 pcIlpPic[refLayerIdc]->getSlice(0)->setReferenced( pcRefPicBL->getSlice(0)->isReferenced() ); 3912 3913 for( Int refList = 0; refList < 2; refList++ ) 3914 { 3915 RefPicList refPicList = RefPicList( refList ); 3916 3917 //set reference POC of ILP 3918 pcIlpPic[refLayerIdc]->getSlice(0)->setNumRefIdx(refPicList, pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList)); 3919 assert(pcIlpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) >= 0); 3920 assert(pcIlpPic[refLayerIdc]->getSlice(0)->getNumRefIdx(refPicList) <= MAX_NUM_REF); 3921 3922 //initialize reference POC of ILP 3923 for(Int refIdx = 0; refIdx < pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx++) 3924 { 3925 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPOC(pcRefPicBL->getSlice(0)->getRefPOC(refPicList, refIdx), refPicList, refIdx); 3926 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPic(pcRefPicBL->getSlice(0)->getRefPic(refPicList, refIdx), refPicList, refIdx); 3927 } 3928 3929 for(Int refIdx = pcRefPicBL->getSlice(0)->getNumRefIdx(refPicList); refIdx < MAX_NUM_REF; refIdx++) 3930 { 3931 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPOC(0, refPicList, refIdx); 3932 pcIlpPic[refLayerIdc]->getSlice(0)->setRefPic(NULL, refPicList, refIdx); 3933 } 3934 3935 //copy reference pictures' marking from the reference layer 3936 for(Int j = 0; j < MAX_NUM_REF + 1; j++) 3937 { 3938 pcIlpPic[refLayerIdc]->getSlice(0)->setIsUsedAsLongTerm(refList, j, pcRefPicBL->getSlice(0)->getIsUsedAsLongTerm(refList, j)); 3939 } 3940 } 3941 3942 pcIlpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] ); 3943 } 3944 else 3945 { 3946 pcIlpPic[refLayerIdc]->initUpsampledMvField(); 3947 } 3948 #endif 3949 3950 #if O0225_MAX_TID_FOR_REF_LAYERS 3951 Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerId(), m_layerId ); 3952 #else 3953 Int maxTidIlRefPicsPlus1 = m_pcVPS->getMaxTidIlRefPicsPlus1( pcIlpPic[refLayerIdc]->getSlice(0)->getLayerId() ); 3954 #endif 3955 assert( (Int)pcIlpPic[refLayerIdc]->getSlice(0)->getTLayer() < maxTidIlRefPicsPlus1 || ( !maxTidIlRefPicsPlus1 && pcIlpPic[refLayerIdc]->getSlice(0)->getRapPicFlag() ) ); 3956 3957 } 3958 } 3959 } 3975 3960 #endif //SVC_EXTENSION 3976 3961 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r820 r821 2410 2410 Int getNumILRRefIdx ( ) { return m_pcVPS->getNumDirectRefLayers( m_layerId ); } 2411 2411 2412 #if REF_IDX_MFM2413 Void setRefPOCListILP(TComPic** ilpPic, TComPic** pcRefPicRL);2414 #endif2415 2416 2412 Int getActiveNumILRRefIdx ( ) { return m_activeNumILRRefIdx; } 2417 2413 Void setActiveNumILRRefIdx ( Int i ) { m_activeNumILRRefIdx = i; } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r820 r821 1932 1932 1933 1933 #if REF_IDX_MFM 1934 if( pcSlice->getMFMEnabledFlag() )1935 {1936 pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic());1937 }1938 1934 pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic); 1939 1935 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r820 r821 1699 1699 if(m_layerId == 0 || ( m_layerId > 0 && pcSlice->getActiveNumILRRefIdx() == 0 ) ) 1700 1700 { 1701 pcSlice->setRefPicList( rcListPic );1701 pcSlice->setRefPicList( rcListPic ); 1702 1702 } 1703 1703 … … 1705 1705 { 1706 1706 pcSlice->setILRPic( m_pcEncTop->getIlpList() ); 1707 #if REF_IDX_MFM 1708 if( pcSlice->getMFMEnabledFlag() ) 1709 { 1710 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 1711 } 1712 #else 1707 #if !REF_IDX_MFM 1713 1708 // Set reference list 1714 1709 pcSlice->setRefPicList ( rcListPic );
Note: See TracChangeset for help on using the changeset viewer.