Changeset 170 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib
- Timestamp:
- 9 May 2013, 17:40:26 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source/Lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp
r165 r170 126 126 m_aiNumILRRefIdx = 0; 127 127 #endif 128 #if JCTVC_M0458 129 m_aiActiveNumILRRefIdx = 0; 130 m_InterLayerPredEnabledFlag = 0; 131 132 for ( Int idx = 0; idx < MAX_VPS_LAYER_ID_PLUS1; idx++ ) 133 m_interLayerPredLayerIdc[idx] = 0; 134 #endif 135 128 136 initEqualRef(); 129 137 … … 178 186 { 179 187 m_aiNumILRRefIdx = 1; // to be set to NumDirectRefLayers[LayerIdInVps[nuh_layer_id]] 188 #if JCTVC_M0458 189 m_aiActiveNumILRRefIdx = 1; 190 m_InterLayerPredEnabledFlag = 1; 191 #endif 180 192 } 181 193 else 182 194 { 183 195 m_aiNumILRRefIdx = 0; 196 #if JCTVC_M0458 197 m_aiActiveNumILRRefIdx = 0; 198 m_InterLayerPredEnabledFlag = 0; 199 #endif 184 200 } 185 201 #endif … … 528 544 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 529 545 #if REF_IDX_FRAMEWORK 546 #if JCTVC_M0458 547 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_aiActiveNumILRRefIdx; 548 #else 530 549 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + m_aiNumILRRefIdx; 550 #endif 531 551 #else 532 552 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; … … 574 594 if(getLayerId()) 575 595 { 596 #if JCTVC_M0458 597 for( i = 0; i < m_aiActiveNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 598 #else 576 599 for( i = 0; i < m_aiNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 600 #endif 577 601 { 578 602 rpsCurrList0[cIdx] = ilpPic[i]; … … 598 622 if(getLayerId()) 599 623 { 624 #if JCTVC_M0458 625 for( i = 0; i < m_aiActiveNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 626 #else 600 627 for( i = 0; i < m_aiNumILRRefIdx && cIdx < numPocTotalCurr; cIdx ++, i ++) 628 #endif 601 629 { 602 630 rpsCurrList1[cIdx] = ilpPic[i]; … … 668 696 else 669 697 { 698 #if JCTVC_M0458 699 for(Int i = m_aiActiveNumILRRefIdx; i > 0; i-- ) 700 #else 670 701 for(Int i = m_aiNumILRRefIdx; i > 0; i-- ) 702 #endif 671 703 { 672 704 refPicListModification->setRefPicSetIdxL0(m_aiNumRefIdx[REF_PIC_LIST_0] - i, numberOfRpsCurrTempList - i); … … 694 726 else 695 727 { 728 #if JCTVC_M0458 729 for(Int i = m_aiActiveNumILRRefIdx; i > 0; i-- ) 730 #else 696 731 for(Int i = m_aiNumILRRefIdx; i > 0; i-- ) 732 #endif 697 733 { 698 734 refPicListModification->setRefPicSetIdxL1(m_aiNumRefIdx[REF_PIC_LIST_1] - i, numberOfRpsCurrTempList - i); … … 717 753 { 718 754 #if REF_IDX_FRAMEWORK 755 #if JCTVC_M0458 756 return m_aiActiveNumILRRefIdx; 757 #else 719 758 return m_aiNumILRRefIdx; 759 #endif 720 760 #else 721 761 return 0; … … 732 772 if(getLayerId()) 733 773 { 774 #if JCTVC_M0458 775 numRpsCurrTempList += getActiveNumILRRefIdx(); 776 #else 734 777 numRpsCurrTempList += getNumILRRefIdx(); 778 #endif 735 779 } 736 780 #endif … … 1541 1585 #if VPS_PROFILE_OUTPUT_LAYERS 1542 1586 ::memset(m_profileLevelTierIdx, 0, sizeof(m_profileLevelTierIdx)); 1587 #endif 1588 #if JCTVC_M0458 1589 m_maxOneActiveRefLayerFlag = true; 1543 1590 #endif 1544 1591 } -
branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h
r165 r170 557 557 Int m_profileLevelTierIdx[64]; 558 558 #endif 559 #if JCTVC_M0458 560 Bool m_maxOneActiveRefLayerFlag; 561 #endif 559 562 public: 560 563 TComVPS(); … … 705 708 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } 706 709 #endif 710 #if JCTVC_M0458 711 Bool getMaxOneActiveRefLayerFlag() { return m_maxOneActiveRefLayerFlag; } 712 Void setMaxOneActiveRefLayerFlag(Bool x) { m_maxOneActiveRefLayerFlag = x; } 713 #endif 707 714 }; 708 715 … … 1413 1420 Int m_aiNumILRRefIdx; //< for inter-layer reference picture ser 1414 1421 #endif 1422 #if JCTVC_M0458 1423 UInt m_aiActiveNumILRRefIdx; //< Active inter-layer reference pictures 1424 UInt m_interLayerPredLayerIdc [MAX_VPS_LAYER_ID_PLUS1]; 1425 #endif 1415 1426 #if L0034_COMBINED_LIST_CLEANUP 1416 1427 Int m_list1IdxToList0Idx[MAX_NUM_REF]; … … 1505 1516 1506 1517 Bool m_enableTMVPFlag; 1518 #if JCTVC_M0458 1519 Bool m_InterLayerPredEnabledFlag; 1520 UInt m_NumInterLayerRefPics; 1521 #endif 1507 1522 public: 1508 1523 TComSlice(); … … 1564 1579 Void setNumILRRefIdx ( Int i ) { m_aiNumILRRefIdx = i; } 1565 1580 #endif 1581 #if JCTVC_M0458 1582 Int getActiveNumILRRefIdx ( ) { return m_aiActiveNumILRRefIdx; } 1583 Void setActiveNumILRRefIdx ( Int i ) { m_aiActiveNumILRRefIdx = i; } 1584 1585 Int getInterLayerPredLayerIdc (UInt Idx ) { return m_interLayerPredLayerIdc[Idx]; } 1586 Void setInterLayerPredLayerIdc (UInt val,UInt Idx) { m_interLayerPredLayerIdc[Idx] = val; } 1587 #endif 1566 1588 Int getNumRefIdx ( RefPicList e ) { return m_aiNumRefIdx[e]; } 1567 1589 TComPic* getPic () { return m_pcPic; } … … 1767 1789 Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } 1768 1790 Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} 1791 #if JCTVC_M0458 1792 Void setInterLayerPredEnabledFlag ( Bool val ) { m_InterLayerPredEnabledFlag = val; } 1793 Bool getInterLayerPredEnabledFlag () { return m_InterLayerPredEnabledFlag;} 1794 1795 Void setNumInterLayerRefPics ( UInt val ) { m_NumInterLayerRefPics = val; } 1796 UInt getNumInterLayerRefPics () { return m_NumInterLayerRefPics;} 1797 #endif 1769 1798 protected: 1770 1799 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, -
branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h
r165 r170 88 88 #define ENCODER_FAST_MODE 1 ///< L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1. 89 89 #define REF_IDX_MFM 1 ///< L0336: motion vector mapping of inter-layer reference picture 90 #define JCTVC_M0458 1 ///< implementation of JCTVC-L0178 (currently only one reference layer is supported ) 90 91 #else 91 92 #define INTRA_BL 1 ///< inter-layer texture prediction -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r169 r170 1039 1039 #endif 1040 1040 #endif 1041 #if JCTVC_M0458 1042 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 1043 vps->setMaxOneActiveRefLayerFlag(uiCode); 1044 #endif 1041 1045 1042 1046 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG … … 1591 1595 } 1592 1596 1597 #if JCTVC_M0458 1598 rpcSlice->setActiveNumILRRefIdx(0); 1599 if((sps->getLayerId() > 0) && (rpcSlice->getNumILRRefIdx() > 0) ) 1600 { 1601 READ_FLAG(uiCode,"inter_layer_pred_enabled_flag"); 1602 rpcSlice->setInterLayerPredEnabledFlag(uiCode); 1603 if( rpcSlice->getInterLayerPredEnabledFlag()) 1604 { 1605 if(rpcSlice->getNumILRRefIdx() > 1) 1606 { 1607 if( !rpcSlice->getVPS()->getMaxOneActiveRefLayerFlag()) 1608 { 1609 READ_UVLC(uiCode,"num_inter_layer_ref_pics_minus1"); 1610 rpcSlice->setActiveNumILRRefIdx(uiCode + 1); 1611 } 1612 else 1613 { 1614 rpcSlice->setActiveNumILRRefIdx(1); 1615 rpcSlice->setInterLayerPredLayerIdc(0,0); 1616 } 1617 for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ ) 1618 { 1619 READ_UVLC(uiCode,"inter_layer_pred_layer_idc[i]"); 1620 rpcSlice->setInterLayerPredLayerIdc(uiCode,i); 1621 } 1622 } 1623 else 1624 { 1625 rpcSlice->setActiveNumILRRefIdx(1); 1626 rpcSlice->setInterLayerPredLayerIdc(0,0); 1627 } 1628 } 1629 } 1630 #endif 1631 1593 1632 if(pps->getSliceHeaderExtensionPresentFlag()) 1594 1633 { -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r163 r170 1257 1257 // currently only one reference layer is supported 1258 1258 assert( vps->getNumDirectRefLayers( m_layerId ) == 1 ); 1259 #if JCTVC_M0458 1260 assert( vps->getMaxOneActiveRefLayerFlag() == 1 ); 1261 #endif 1262 1259 1263 1260 1264 return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, 0 ) ); -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r169 r170 797 797 #endif 798 798 #endif 799 #if JCTVC_M0458 800 WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag"); 801 #endif 799 802 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG 800 803 #if VPS_EXTN_DIRECT_REF_LAYERS … … 1163 1166 } 1164 1167 } 1168 #if JCTVC_M0458 1169 if((pcSlice->getSPS()->getLayerId() > 0) && (pcSlice->getNumILRRefIdx() > 0) ) 1170 { 1171 WRITE_FLAG(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_enabled_flag"); 1172 if( pcSlice->getInterLayerPredEnabledFlag()) 1173 { 1174 if(pcSlice->getNumILRRefIdx() > 1) 1175 { 1176 if( !pcSlice->getVPS()->getMaxOneActiveRefLayerFlag()) 1177 { 1178 WRITE_UVLC(pcSlice->getNumInterLayerRefPics(),"num_inter_layer_ref_pics_minus1"); 1179 } 1180 for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ ) 1181 WRITE_UVLC(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_layer_idc[i]"); 1182 } 1183 } 1184 } 1185 #endif 1165 1186 if(pcSlice->getPPS()->getSliceHeaderExtensionPresentFlag()) 1166 1187 {
Note: See TracChangeset for help on using the changeset viewer.