- Timestamp:
- 16 Nov 2013, 00:32:03 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r483 r484 1098 1098 { 1099 1099 #if N0120_MAX_TID_REF_CFG 1100 #if O0225_MAX_TID_FOR_REF_LAYERS 1101 for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++) 1102 { 1103 vps->setMaxTidIlRefPicsPlus1(i, j, m_acTEncTop[i].getMaxTidIlRefPicsPlus1()); 1104 } 1105 #else 1100 1106 vps->setMaxTidIlRefPicsPlus1(i, m_acTEncTop[i].getMaxTidIlRefPicsPlus1()); 1107 #endif 1108 #else 1109 #if O0225_MAX_TID_FOR_REF_LAYERS 1110 for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++) 1111 { 1112 vps->setMaxTidIlRefPicsPlus1(i, j, vps->getMaxTLayers()+1); 1113 } 1101 1114 #else 1102 1115 vps->setMaxTidIlRefPicsPlus1(i, vps->getMaxTLayers()+1); 1103 1116 #endif 1117 #endif 1104 1118 } 1105 1119 } … … 1108 1122 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 1109 1123 { 1124 #if O0225_MAX_TID_FOR_REF_LAYERS 1125 for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++) 1126 { 1127 vps->setMaxTidIlRefPicsPlus1(i, j, 7); 1128 } 1129 #else 1110 1130 vps->setMaxTidIlRefPicsPlus1(i, 7); 1131 #endif 1111 1132 } 1112 1133 } -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.cpp
r479 r484 456 456 UInt refLayerIdc = m_interLayerPredLayerIdc[i]; 457 457 //inter-layer reference picture 458 458 #if O0225_MAX_TID_FOR_REF_LAYERS 459 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId) : 0; 460 #else 459 461 Int maxTidIlRefPicsPlus1 = ( m_layerId > 0 && m_activeNumILRRefIdx > 0)? m_pcVPS->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()) : 0; 462 #endif 460 463 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 && ( ( (Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) ) 461 464 { … … 491 494 for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ ) 492 495 { 496 #if O0225_MAX_TID_FOR_REF_LAYERS 497 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId(),m_layerId); 498 #else 493 499 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[i]->getSlice(0)->getLayerId()); 500 #endif 494 501 if( ((Int)(ilpPic[i]->getSlice(0)->getTLayer())<= maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[i]->getSlice(0)->getRapPicFlag() ) ) 495 502 { … … 634 641 { 635 642 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 643 #if O0225_MAX_TID_FOR_REF_LAYERS 644 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId); 645 #else 636 646 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 647 #endif 637 648 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 638 649 { … … 662 673 { 663 674 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 675 #if O0225_MAX_TID_FOR_REF_LAYERS 676 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId); 677 #else 664 678 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 679 #endif 665 680 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 666 681 { … … 699 714 { 700 715 Int refLayerIdc = m_interLayerPredLayerIdc[i]; 716 #if O0225_MAX_TID_FOR_REF_LAYERS 717 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId(),m_layerId); 718 #else 701 719 Int maxTidIlRefPicsPlus1 = getVPS()->getMaxTidIlRefPicsPlus1(ilpPic[refLayerIdc]->getSlice(0)->getLayerId()); 720 #endif 702 721 if( ((Int)(ilpPic[refLayerIdc]->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && ilpPic[refLayerIdc]->getSlice(0)->getRapPicFlag()) ) 703 722 { … … 2013 2032 for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++) 2014 2033 { 2034 #if O0225_MAX_TID_FOR_REF_LAYERS 2035 for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++) 2036 { 2037 m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1; 2038 } 2039 #else 2015 2040 m_maxTidIlRefPicsPlus1[i] = m_uiMaxTLayers + 1; 2041 #endif 2016 2042 } 2017 2043 #endif -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TComSlice.h
r482 r484 573 573 #endif 574 574 #if JCTVC_M0203_INTERLAYER_PRED_IDC 575 #if O0225_MAX_TID_FOR_REF_LAYERS 576 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1]; 577 #else 575 578 UInt m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 579 #endif 576 580 #endif 577 581 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 792 796 #endif 793 797 #if JCTVC_M0203_INTERLAYER_PRED_IDC 798 #if O0225_MAX_TID_FOR_REF_LAYERS 799 UInt getMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId) { return m_maxTidIlRefPicsPlus1[layerId][refLayerId]; } 800 Void setMaxTidIlRefPicsPlus1(Int layerId, Int refLayerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId][refLayerId] = maxSublayer; } 801 #else 794 802 UInt getMaxTidIlRefPicsPlus1(Int layerId) { return m_maxTidIlRefPicsPlus1[layerId]; } 795 803 Void setMaxTidIlRefPicsPlus1(Int layerId, UInt maxSublayer) { m_maxTidIlRefPicsPlus1[layerId] = maxSublayer; } 804 #endif 796 805 #endif 797 806 #if N0120_MAX_TID_REF_PRESENT_FLAG -
branches/SHM-4.0-dev/source/Lib/TLibCommon/TypeDef.h
r479 r484 123 123 #define N0120_MAX_TID_REF_PRESENT_FLAG 1 ///< JCTVC-N0120: max_tid_ref_pics_plus1_present_flag 124 124 #define N0120_MAX_TID_REF_CFG 1 ///< set max_tid_il_ref_pics_plus1 and max_tid_ref_present_flag in the config. file (configuration setting) 125 #define O0225_MAX_TID_FOR_REF_LAYERS 1 125 126 #endif 126 127 #if REF_IDX_MFM -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r479 r484 1098 1098 for(i = 0; i < vps->getMaxLayers() - 1; i++) 1099 1099 { 1100 #if O0225_MAX_TID_FOR_REF_LAYERS 1101 for( j = i+1; j <= vps->getMaxLayers() - 1; j++) 1102 { 1103 if(vps->getDirectDependencyFlag(j, i)) 1104 { 1105 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i][j]" ); vps->setMaxTidIlRefPicsPlus1(i, j, uiCode); 1106 assert( uiCode <= vps->getMaxTLayers()); 1107 } 1108 } 1109 #else 1100 1110 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); vps->setMaxTidIlRefPicsPlus1(i, uiCode); 1101 1111 #if N0120_MAX_TID_REF_CFG … … 1104 1114 assert( uiCode <= vps->getMaxTLayers()+ 1 ); 1105 1115 #endif 1116 #endif 1106 1117 } 1107 1118 } … … 1110 1121 for(i = 0; i < vps->getMaxLayers() - 1; i++) 1111 1122 { 1123 #if O0225_MAX_TID_FOR_REF_LAYERS 1124 for( j = i+1; j <= vps->getMaxLayers() - 1; j++) 1125 { 1126 vps->setMaxTidIlRefPicsPlus1(i, j, 7); 1127 } 1128 #else 1112 1129 vps->setMaxTidIlRefPicsPlus1(i, 7); 1130 #endif 1113 1131 } 1114 1132 } … … 1116 1134 for(i = 0; i < vps->getMaxLayers() - 1; i++) 1117 1135 { 1136 #if O0225_MAX_TID_FOR_REF_LAYERS 1137 for( j = i+1; j <= vps->getMaxLayers() - 1; j++) 1138 { 1139 if(vps->getDirectDependencyFlag(j, i)) 1140 { 1141 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i][j]" ); vps->setMaxTidIlRefPicsPlus1(i, j, uiCode); 1142 assert( uiCode <= vps->getMaxTLayers() ); 1143 } 1144 } 1145 #else 1118 1146 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); vps->setMaxTidIlRefPicsPlus1(i, uiCode); 1119 1147 assert( uiCode <= vps->getMaxTLayers() ); 1148 #endif 1120 1149 } 1121 1150 #endif -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r475 r484 498 498 499 499 Int remainingInterLayerReferencesFlag = 0; 500 #if O0225_MAX_TID_FOR_REF_LAYERS 501 for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 502 { 503 Int jLidx = pcSlice->getVPS()->getLayerIdInVps(targetDecLayerIdList[j]); 504 if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId,jLidx) - 1 ) 505 { 506 #else 500 507 if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId) - 1 ) 501 508 { 502 509 for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 503 510 { 511 #endif 504 512 for ( Int k = 0; k < m_ppcTDecTop[targetDecLayerIdList[j]]->getNumDirectRefLayers(); k++ ) 505 513 { -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r479 r484 899 899 for( i = 0; i < vps->getMaxLayers() - 1; i++) 900 900 { 901 #if O0225_MAX_TID_FOR_REF_LAYERS 902 for( j = i+1; j <= vps->getMaxLayers() - 1; j++) 903 { 904 if(vps->getDirectDependencyFlag(j, i)) 905 { 906 WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i,j), 3, "max_tid_il_ref_pics_plus1[i][j]" ); 907 } 908 } 909 #else 901 910 WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i), 3, "max_tid_il_ref_pics_plus1[i]" ); 911 #endif 902 912 } 903 913 } … … 905 915 for( i = 0; i < vps->getMaxLayers() - 1; i++) 906 916 { 917 #if O0225_MAX_TID_FOR_REF_LAYERS 918 for( j = i+1; j <= vps->getMaxLayers() - 1; j++) 919 { 920 if(vps->getDirectDependencyFlag(j, i)) 921 { 922 WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i,j), 3, "max_tid_il_ref_pics_plus1[i][j]" ); 923 } 924 } 925 #else 907 926 WRITE_CODE(vps->getMaxTidIlRefPicsPlus1(i), 3, "max_tid_il_ref_pics_plus1[i]" ); 927 #endif 908 928 } 909 929 #endif -
branches/SHM-4.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r475 r484 769 769 770 770 // Apply temporal layer restriction to inter-layer prediction 771 #if O0225_MAX_TID_FOR_REF_LAYERS 772 Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId(),m_layerId); 773 #else 771 774 Int maxTidIlRefPicsPlus1 = m_pcEncTop->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getLayerId()); 775 #endif 772 776 if( ((Int)(pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getTLayer())<=maxTidIlRefPicsPlus1-1) || (maxTidIlRefPicsPlus1==0 && pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getRapPicFlag()) ) 773 777 {
Note: See TracChangeset for help on using the changeset viewer.