- Timestamp:
- 18 Jun 2013, 14:06:13 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source/Lib
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r288 r291 3583 3583 3584 3584 // use coldir. 3585 #if M0457_COL_PICTURE_SIGNALING 3586 TComPic *pColPic; 3587 if (m_layerId > 0 && getSlice()->getAltColIndicationFlag()) 3588 { 3589 pColPic = getSlice()->getMotionPredIlp(); 3590 } 3591 else 3592 { 3593 pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3594 } 3595 #else 3585 3596 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 3597 #endif 3586 3598 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 3587 3599 if(pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE) -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r290 r291 135 135 m_numILRRefIdx = 0; 136 136 #endif 137 #if M0457_COL_PICTURE_SIGNALING 138 m_altColIndicationFlag = false; 139 m_colRefLayerIdx = 0; 140 #endif 137 141 #endif 138 142 #endif … … 545 549 #endif 546 550 { 551 #if M0457_COL_PICTURE_SIGNALING 552 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && getMFMEnabledFlag()) 553 #else 547 554 if(!(m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) && m_pcSPS->getMFMEnabledFlag()) 555 #endif 548 556 { 549 557 ilpPic[refLayerIdc]->copyUpsampledMvField( refLayerIdc, m_pcBaseColPic[refLayerIdc] ); -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h
r290 r291 1038 1038 #endif 1039 1039 #if REF_IDX_MFM 1040 #if !M0457_COL_PICTURE_SIGNALING 1040 1041 Bool m_bMFMEnabledFlag; 1042 #endif 1041 1043 #endif 1042 1044 #if SCALED_REF_LAYER_OFFSETS … … 1180 1182 #endif 1181 1183 #if REF_IDX_MFM 1184 #if !M0457_COL_PICTURE_SIGNALING 1182 1185 Void setMFMEnabledFlag(Bool flag) {m_bMFMEnabledFlag = flag;} 1183 1186 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;} 1187 #endif 1184 1188 #endif 1185 1189 #if SCALED_REF_LAYER_OFFSETS … … 1515 1519 TComPic* m_pcBaseColPic[MAX_LAYERS]; 1516 1520 TComPicYuv* m_pcFullPelBaseRec[MAX_LAYERS]; 1521 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1522 Int m_numMotionPredRefLayers; 1523 #if REF_IDX_MFM 1524 Bool m_bMFMEnabledFlag; 1525 Int m_colRefLayerIdx; 1526 Bool m_altColIndicationFlag; 1527 TComPic* m_pcIlpPic; 1528 #endif 1529 #endif 1517 1530 #endif 1518 1531 Bool m_bTLayerSwitchingFlag; … … 1834 1847 Void setNumILRRefIdx ( Int i ) { m_numILRRefIdx = i; } 1835 1848 #endif 1849 1850 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1851 Void setNumMotionPredRefLayers(int i) { m_numMotionPredRefLayers = i; } 1852 Int getNumMotionPredRefLayers() { return m_numMotionPredRefLayers; } 1853 #if REF_IDX_MFM 1854 Void setMFMEnabledFlag(Bool flag) { m_bMFMEnabledFlag = flag; } 1855 Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } 1856 Void setColRefLayerIdx(Int i) { m_colRefLayerIdx = i; } 1857 Int getColRefLayerIdx() { return m_colRefLayerIdx; } 1858 Void setAltColIndicationFlag(Bool i) { m_altColIndicationFlag = i; } 1859 Bool getAltColIndicationFlag() { return m_altColIndicationFlag; } 1860 Void setMotionPredIlp(TComPic *ilpPic) { m_pcIlpPic = ilpPic; } 1861 TComPic* getMotionPredIlp() { return m_pcIlpPic; } 1862 #endif 1863 #endif 1864 1836 1865 #endif 1837 1866 -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
r290 r291 101 101 #define ILR_RESTR 1 ///< JCTVC-M0209 Inter-layer RPS and RPL 102 102 #endif 103 #define M0457_COL_PICTURE_SIGNALING 1 103 104 104 105 #else -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r290 r291 717 717 READ_FLAG( uiCode, "sps_temporal_mvp_enable_flag" ); pcSPS->setTMVPFlagsPresent(uiCode); 718 718 #if REF_IDX_MFM 719 #if !M0457_COL_PICTURE_SIGNALING 719 720 if(pcSPS->getLayerId() > 0) 720 721 { … … 722 723 pcSPS->setMFMEnabledFlag( uiCode ? true : false ); 723 724 } 725 #endif 724 726 #endif 725 727 READ_FLAG( uiCode, "sps_strong_intra_smoothing_enable_flag" ); pcSPS->setUseStrongIntraSmoothing(uiCode); … … 1613 1615 if ( rpcSlice->getEnableTMVPFlag() ) 1614 1616 { 1617 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1618 rpcSlice->setMFMEnabledFlag( false ); 1619 rpcSlice->setColRefLayerIdx( 0 ); 1620 rpcSlice->setAltColIndicationFlag( false ); 1621 if ( sps->getLayerId() > 0 && rpcSlice->getNumMotionPredRefLayers() > 0 ) 1622 { 1623 READ_FLAG( uiCode, "alt_collocated_indication_flag" ); 1624 rpcSlice->setAltColIndicationFlag( uiCode == 1 ? true : false ); 1625 rpcSlice->setMFMEnabledFlag( uiCode == 1 ? true : false ); 1626 if ( rpcSlice->getNumMotionPredRefLayers() > 1 ) 1627 { 1628 READ_UVLC( uiCode, "collocated_ref_layer_idx" ); 1629 rpcSlice->setColRefLayerIdx( uiCode ); 1630 } 1631 } 1632 else 1633 { 1634 #endif 1615 1635 if ( rpcSlice->getSliceType() == B_SLICE ) 1616 1636 { … … 1634 1654 rpcSlice->setColRefIdx(0); 1635 1655 } 1656 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1657 } 1658 #endif 1636 1659 } 1637 1660 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r290 r291 541 541 setRefLayerParams(m_apcSlicePilot->getVPS()); 542 542 #endif 543 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 544 m_apcSlicePilot->setNumMotionPredRefLayers(m_numMotionPredRefLayers); 545 #endif 546 543 547 #if SVC_EXTENSION 544 548 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder[m_layerId]); … … 919 923 setILRPic(pcPic); 920 924 #if REF_IDX_MFM 925 #if M0457_COL_PICTURE_SIGNALING 926 if( pcSlice->getMFMEnabledFlag() ) 927 #else 921 928 if( pcSlice->getSPS()->getMFMEnabledFlag() ) 929 #endif 922 930 { 923 931 pcSlice->setRefPOCListILP(m_ppcTDecTop[m_layerId]->m_cIlpPic, pcSlice->getBaseColPic()); 932 #if M0457_COL_PICTURE_SIGNALING 933 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice)); 934 #endif 924 935 } 925 936 #endif … … 1372 1383 1373 1384 #endif 1385 1386 #if M0457_COL_PICTURE_SIGNALING 1387 TComPic* TDecTop::getMotionPredIlp(TComSlice* pcSlice) 1388 { 1389 TComPic* ilpPic = NULL; 1390 Int activeMotionPredReflayerIdx = 0; 1391 1392 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 1393 { 1394 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i); 1395 if (getMotionPredEnabledFlag(refLayerIdc)) 1396 { 1397 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx()) 1398 { 1399 ilpPic = m_cIlpPic[i]; 1400 break; 1401 } 1402 else 1403 { 1404 activeMotionPredReflayerIdx++; 1405 } 1406 } 1407 } 1408 1409 assert(ilpPic != NULL); 1410 1411 return ilpPic; 1412 } 1413 #endif 1414 1374 1415 //! \} -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.h
r290 r291 230 230 Void xDecodePPS(); 231 231 Void xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ); 232 #if M0457_COL_PICTURE_SIGNALING 233 TComPic* getMotionPredIlp(TComSlice* pcSlice); 234 #endif 232 235 233 236 };// END CLASS DEFINITION TDecTop -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r290 r291 548 548 WRITE_FLAG( pcSPS->getTMVPFlagsPresent() ? 1 : 0, "sps_temporal_mvp_enable_flag" ); 549 549 #if REF_IDX_MFM 550 #if !M0457_COL_PICTURE_SIGNALING 550 551 if( pcSPS->getLayerId() > 0 ) 551 552 { 552 553 WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0, "sps_enh_mfm_enable_flag" ); 553 554 } 555 #endif 554 556 #endif 555 557 WRITE_FLAG( pcSPS->getUseStrongIntraSmoothing(), "sps_strong_intra_smoothing_enable_flag" ); … … 1219 1221 if ( pcSlice->getEnableTMVPFlag() ) 1220 1222 { 1223 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1224 if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 ) 1225 { 1226 WRITE_FLAG( 1, "alt_collocated_indication_flag" ); 1227 if (pcSlice->getNumMotionPredRefLayers() > 1) 1228 { 1229 WRITE_UVLC(0, "collocated_ref_layer_idx"); 1230 } 1231 } 1232 else 1233 { 1234 #endif 1221 1235 if ( pcSlice->getSliceType() == B_SLICE ) 1222 1236 { … … 1230 1244 WRITE_UVLC( pcSlice->getColRefIdx(), "collocated_ref_idx" ); 1231 1245 } 1246 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1247 } 1248 #endif 1232 1249 } 1233 1250 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r288 r291 487 487 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 488 488 #endif 489 #if M0457_COL_PICTURE_SIGNALING 490 pcSlice->setMFMEnabledFlag(m_pcEncTop->getMFMEnabledFlag()); 491 pcSlice->setAltColIndicationFlag(m_pcEncTop->getNumMotionPredRefLayers() > 0 ? true : false); 492 pcSlice->setColRefLayerIdx(0); 493 #endif 489 494 pcSlice->setLastIDR(m_iLastIDR); 490 495 pcSlice->setSliceIdx(0); … … 760 765 761 766 #if REF_IDX_FRAMEWORK 767 #if M0457_COL_PICTURE_SIGNALING 768 if ( pcSlice->getSliceType() == B_SLICE && !pcSlice->getAltColIndicationFlag() ) 769 #else 762 770 if( pcSlice->getSliceType() == B_SLICE ) 771 #endif 763 772 { 764 773 pcSlice->setColFromL0Flag(1-uiColDir); … … 789 798 790 799 #if REF_IDX_MFM 800 #if M0457_COL_PICTURE_SIGNALING 801 if( pcSlice->getMFMEnabledFlag() ) 802 #else 791 803 if( pcSlice->getSPS()->getMFMEnabledFlag() ) 804 #endif 792 805 { 793 806 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 807 #if M0457_COL_PICTURE_SIGNALING 808 pcSlice->setMotionPredIlp(getMotionPredIlp(pcSlice)); 809 #endif 794 810 } 795 811 #endif … … 798 814 799 815 #if REF_IDX_MFM 816 #if M0457_COL_PICTURE_SIGNALING 817 if( pcSlice->getMFMEnabledFlag() && !pcSlice->getAltColIndicationFlag() ) 818 #else 800 819 if( pcSlice->getSPS()->getMFMEnabledFlag() ) 820 #endif 801 821 { 802 822 Bool found = false; … … 1608 1628 startCUAddrSliceSegmentIdx++; 1609 1629 } 1610 1630 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1631 pcSlice->setNumMotionPredRefLayers(m_pcEncTop->getNumMotionPredRefLayers()); 1632 #endif 1611 1633 pcSlice->setRPS(pcPic->getSlice(0)->getRPS()); 1612 1634 pcSlice->setRPSidx(pcPic->getSlice(0)->getRPSidx()); … … 3001 3023 } 3002 3024 #endif 3025 3026 #if M0457_COL_PICTURE_SIGNALING 3027 TComPic* TEncGOP::getMotionPredIlp(TComSlice* pcSlice) 3028 { 3029 TComPic* ilpPic = NULL; 3030 Int activeMotionPredReflayerIdx = 0; 3031 3032 for( Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 3033 { 3034 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i); 3035 if (m_pcEncTop->getMotionPredEnabledFlag(refLayerIdc)) 3036 { 3037 if (activeMotionPredReflayerIdx == pcSlice->getColRefLayerIdx()) 3038 { 3039 ilpPic = m_pcEncTop->getIlpList()[i]; 3040 break; 3041 } 3042 else 3043 { 3044 activeMotionPredReflayerIdx++; 3045 } 3046 } 3047 } 3048 3049 assert(ilpPic != NULL); 3050 3051 return ilpPic; 3052 } 3053 #endif 3054 3003 3055 //! \} -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.h
r191 r291 207 207 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 208 208 #endif 209 #if M0457_COL_PICTURE_SIGNALING 210 TComPic* getMotionPredIlp(TComSlice* pcSlice); 211 #endif 209 212 };// END CLASS DEFINITION TEncGOP 210 213 -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r288 r291 599 599 #endif 600 600 #if REF_IDX_MFM 601 #if !M0457_COL_PICTURE_SIGNALING 601 602 m_cSPS.setMFMEnabledFlag(m_bMFMEnabledFlag); 603 #endif 602 604 #endif 603 605 #if SCALED_REF_LAYER_OFFSETS
Note: See TracChangeset for help on using the changeset viewer.