Changeset 1130 in SHVCSoftware
- Timestamp:
- 7 Jul 2015, 03:13:38 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1128 r1130 1685 1685 ("SEITemporalMotionVectorPredictionConstraints", m_TMVPConstraintsSEIEnabled, 0, "Control generation of TMVP constrants SEI message") 1686 1686 #endif 1687 #if M0040_ADAPTIVE_RESOLUTION_CHANGE1688 1687 ("AdaptiveResolutionChange", m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)") 1689 #endif1690 1688 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1691 1689 ("LayerSwitchOffBegin%d", cfg_layerSwitchOffBegin, 0, MAX_LAYERS, "Switch layer %d off after given poc") … … 4349 4347 } 4350 4348 #endif //VPS_EXTN_DIRECT_REF_LAYERS 4351 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 4352 if (m_adaptiveResolutionChange > 0)4349 4350 if( m_adaptiveResolutionChange > 0 ) 4353 4351 { 4354 4352 xConfirmPara(m_numLayers != 2, "Adaptive resolution change works with 2 layers only"); 4355 4353 xConfirmPara(m_acLayerCfg[1].m_iIntraPeriod == 0 || (m_adaptiveResolutionChange % m_acLayerCfg[1].m_iIntraPeriod) != 0, "Adaptive resolution change must happen at enhancement layer RAP picture"); 4356 4354 } 4357 #endif 4358 4359 if (m_adaptiveResolutionChange > 0) 4355 4356 if( m_adaptiveResolutionChange > 0 ) 4360 4357 { 4361 4358 xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change."); 4362 4359 } 4363 if (m_skipPictureAtArcSwitch) 4360 4361 if( m_skipPictureAtArcSwitch ) 4364 4362 { 4365 4363 xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)"); … … 4497 4495 printf("Auxiliary pictures : %d\n", m_scalabilityMask[AUX_ID] ); 4498 4496 #endif 4499 #if M0040_ADAPTIVE_RESOLUTION_CHANGE4500 4497 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange ); 4501 #endif4502 4498 printf("Skip picture at ARC switch : %d\n", m_skipPictureAtArcSwitch ); 4503 4499 printf("Align picture type : %d\n", m_crossLayerPictureTypeAlignFlag ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1128 r1130 473 473 Void xPrintUsage (); ///< print usage 474 474 #if SVC_EXTENSION 475 #if M0040_ADAPTIVE_RESOLUTION_CHANGE476 475 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame 477 #endif478 476 Bool m_skipPictureAtArcSwitch; ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture 479 477 #if REPN_FORMAT_IN_VPS -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1128 r1130 787 787 } 788 788 789 #if M0040_ADAPTIVE_RESOLUTION_CHANGE790 789 m_acTEncTop[layer].setAdaptiveResolutionChange ( m_adaptiveResolutionChange ); 791 #endif792 790 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 793 791 m_acTEncTop[layer].setLayerSwitchOffBegin (m_acLayerCfg[layer].m_layerSwitchOffBegin); … … 1769 1767 } 1770 1768 } 1771 #if M0040_ADAPTIVE_RESOLUTION_CHANGE1772 1769 vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false); 1773 #endif1774 1770 vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch); 1775 1771 … … 2095 2091 #endif 2096 2092 2097 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2098 if (m_adaptiveResolutionChange) 2093 if( m_adaptiveResolutionChange ) 2099 2094 { 2100 2095 for(UInt layer = 0; layer < m_numLayers; layer++) … … 2108 2103 } 2109 2104 } 2110 #endif2111 2105 2112 2106 // loop through frames in one GOP … … 2509 2503 TComPicYuv* pcPicYuvRecBottom = *(iterPicYuvRec++); 2510 2504 2511 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2512 if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed()) 2513 #else 2514 if (!m_acLayerCfg[layer].getReconFile().empty()) 2515 #endif 2505 if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() ) 2516 2506 { 2517 2507 #if REPN_FORMAT_IN_VPS … … 2538 2528 { 2539 2529 TComPicYuv* pcPicYuvRec = *(iterPicYuvRec++); 2540 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2541 if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed()) 2542 #else 2543 if (!m_acLayerCfg[layer].getReconFile().empty()) 2544 #endif 2530 if( !m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed() ) 2545 2531 { 2546 2532 #if REPN_FORMAT_IN_VPS … … 2564 2550 list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin(); 2565 2551 2566 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2567 for ( i = 0; i < iNumEncoded/2 && iterBitstream != accessUnits.end(); i++ ) 2568 #else 2569 for ( i = 0; i < iNumEncoded/2; i++ ) 2570 #endif 2552 for( i = 0; i < iNumEncoded/2 && iterBitstream != accessUnits.end(); i++ ) 2571 2553 { 2572 2554 const AccessUnit& auTop = *(iterBitstream++); … … 2585 2567 list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin(); 2586 2568 2587 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2588 for ( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ ) 2589 #else 2590 for ( i = 0; i < iNumEncoded; i++ ) 2591 #endif 2569 for( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ ) 2592 2570 { 2593 2571 const AccessUnit& au = *(iterBitstream++); -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h
r1117 r1130 85 85 #if SVC_EXTENSION 86 86 Window m_conformanceWindow; 87 #if M0040_ADAPTIVE_RESOLUTION_CHANGE88 87 Bool m_isReconstructed; 89 88 #endif 90 #endif //SVC_EXTENSION91 89 92 90 public: … … 106 104 const UInt uiMaxCUHeight, 107 105 const UInt uiMaxCUDepth ); 108 #endif //SVC_EXTENSION106 #endif 109 107 110 108 Void destroy (); … … 168 166 169 167 #if SVC_EXTENSION 170 Void setHeight ( Int iPicHeight ) { m_iPicHeight = iPicHeight;}168 Void setHeight ( Int iPicHeight ) { m_iPicHeight = iPicHeight; } 171 169 Window& getConformanceWindow() { return m_conformanceWindow; } 172 170 Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } 173 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 174 Void setReconstructed(Bool x) { m_isReconstructed = x; } 175 Bool isReconstructed() { return m_isReconstructed; } 176 #endif 171 Void setReconstructed(Bool x) { m_isReconstructed = x; } 172 Bool isReconstructed() { return m_isReconstructed; } 177 173 #if AUXILIARY_PICTURES 178 174 Void convertToMonochrome(); 179 175 #endif 180 #endif //SVC_EXTENSION 176 #endif 177 181 178 Void dump( Char* pFileName, Bool bAdd, Int bitDepth ); 182 179 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1128 r1130 481 481 #if SVC_EXTENSION 482 482 Int numInterLayerRPSPics = 0; 483 #if M0040_ADAPTIVE_RESOLUTION_CHANGE484 483 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 ) 485 #else486 if( m_layerId > 0 )487 #endif488 484 { 489 485 for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ ) -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1128 r1130 706 706 UInt m_maxTSLayerMinus1[MAX_LAYERS]; 707 707 #endif 708 #if M0040_ADAPTIVE_RESOLUTION_CHANGE709 708 Bool m_singleLayerForNonIrapFlag; 710 #endif711 709 Bool m_higherLayerIrapSkipFlag; 712 710 #if VPS_VUI_TILES_NOT_IN_USE__FLAG … … 1128 1126 Void setMaxTSLayersMinus1(Int layerIdx, UInt maxTSublayer) { m_maxTSLayerMinus1[layerIdx] = maxTSublayer;} 1129 1127 #endif 1130 #if M0040_ADAPTIVE_RESOLUTION_CHANGE1131 1128 Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } 1132 1129 Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } 1133 #endif1134 1130 Bool getHigherLayerIrapSkipFlag() { return m_higherLayerIrapSkipFlag; } 1135 1131 Void setHigherLayerIrapSkipFlag(Bool x) { m_higherLayerIrapSkipFlag = x; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1128 r1130 138 138 #define VPS_EXTN_PROFILE_INFO 1 ///< Include profile information for layer sets in VPS extension 139 139 #define VPS_EXTN_DIRECT_REF_LAYERS 1 ///< Include indication of direct dependency of layers in VPS extension 140 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1141 140 #define R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1 142 141 … … 244 243 #define JCTVC_M0259_LAMBDAREFINEMENT 1 ///< JCTVC-M0259: lambda refinement (encoder only optimization) 245 244 #define ENCODER_FAST_MODE 1 ///< JCTVC-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. 246 #if M0040_ADAPTIVE_RESOLUTION_CHANGE247 245 #define HIGHER_LAYER_IRAP_SKIP_FLAG 1 ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only 248 #endif249 246 #define LAYER_CTB 0 ///< enable layer-specific CTB structure 250 247 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1128 r1130 3463 3463 vps->setCrossLayerIrapAlignFlag( false ); 3464 3464 3465 #if M0040_ADAPTIVE_RESOLUTION_CHANGE3466 3465 // When single_layer_for_non_irap_flag is not present, it is inferred to be equal to 0. 3467 3466 vps->setSingleLayerForNonIrapFlag( false ); 3468 #endif3469 3467 3470 3468 // When higher_layer_irap_skip_flag is not present it is inferred to be equal to 0 … … 3834 3832 #endif 3835 3833 3836 #if M0040_ADAPTIVE_RESOLUTION_CHANGE3837 3834 READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false); 3838 #endif 3835 3839 3836 READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false); 3840 3837 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1123 r1130 1711 1711 // Create upsampling reference layer pictures for all possible dependent layers and do it only once for the first slice. 1712 1712 // Other slices might choose which reference pictures to be used for inter-layer prediction 1713 if( m_layerId > 0 && m_uiSliceIdx == 0 ) 1714 { 1715 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1716 if( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || ( pcSlice->getVPS()->getSingleLayerForNonIrapFlag() && pcSlice->isIRAP() ) ) 1717 #endif 1713 if( m_layerId > 0 && m_uiSliceIdx == 0 && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) ) 1714 { 1718 1715 for( Int i = 0; i < pcSlice->getNumILRRefIdx(); i++ ) 1719 1716 { … … 1865 1862 pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic); 1866 1863 } 1867 #if M0040_ADAPTIVE_RESOLUTION_CHANGE1868 1864 else if ( m_layerId > 0 ) 1869 1865 { 1870 1866 pcSlice->setRefPicList( m_cListPic, false, NULL); 1871 1867 } 1872 #endif1873 1868 #if MFM_ENCCONSTRAINT 1874 1869 if( pcSlice->getMFMEnabledFlag() ) … … 1889 1884 #endif 1890 1885 1891 if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() ) 1892 { 1893 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1894 if( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || ( pcSlice->getVPS()->getSingleLayerForNonIrapFlag() && pcSlice->isIRAP() ) ) 1895 #endif 1886 if( m_layerId > 0 && pcSlice->getVPS()->getCrossLayerIrapAlignFlag() && ( !pcSlice->getVPS()->getSingleLayerForNonIrapFlag() || pcSlice->isIRAP() ) ) 1887 { 1896 1888 for(Int dependentLayerIdx = 0; dependentLayerIdx < pcSlice->getVPS()->getNumDirectRefLayers(m_layerId); dependentLayerIdx++) 1897 1889 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1128 r1130 2642 2642 #endif 2643 2643 2644 #if M0040_ADAPTIVE_RESOLUTION_CHANGE2645 2644 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); 2646 #endif2647 2645 2648 2646 // When single_layer_for_non_irap_flag is equal to 0, higher_layer_irap_skip_flag shall be equal to 0 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1128 r1130 370 370 UInt m_numLayer; 371 371 Int m_elRapSliceBEnabled; 372 #if M0040_ADAPTIVE_RESOLUTION_CHANGE373 372 Int m_adaptiveResolutionChange; 374 #endif375 373 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 376 374 int m_layerSwitchOffBegin; … … 1007 1005 #endif 1008 1006 #if SVC_EXTENSION 1009 UInt getLayerId () { return m_layerId;}1010 Void setLayerId (UInt layer) { m_layerId = layer;}1011 UInt getNumLayer () { return m_numLayer;}1012 Void setNumLayer (UInt uiNum){ m_numLayer = uiNum; }1007 UInt getLayerId() { return m_layerId; } 1008 Void setLayerId( UInt layer ) { m_layerId = layer; } 1009 UInt getNumLayer() { return m_numLayer; } 1010 Void setNumLayer( UInt uiNum ) { m_numLayer = uiNum; } 1013 1011 Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } 1014 Void setElRapSliceTypeB(Int bEnabled) {m_elRapSliceBEnabled = bEnabled;} 1015 Int getElRapSliceTypeB() {return m_elRapSliceBEnabled;} 1016 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1017 Void setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x; } 1018 Int getAdaptiveResolutionChange() { return m_adaptiveResolutionChange; } 1019 #endif 1012 Void setElRapSliceTypeB(Int bEnabled) { m_elRapSliceBEnabled = bEnabled; } 1013 Int getElRapSliceTypeB() { return m_elRapSliceBEnabled; } 1014 Void setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x; } 1015 Int getAdaptiveResolutionChange() { return m_adaptiveResolutionChange; } 1020 1016 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1021 1017 Void setLayerSwitchOffBegin(Int x) { m_layerSwitchOffBegin = x; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1123 r1130 1105 1105 } 1106 1106 1107 #if M0040_ADAPTIVE_RESOLUTION_CHANGE1107 #if SVC_EXTENSION 1108 1108 if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId > 0 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) || 1109 1109 (m_layerId == 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())) ) … … 1263 1263 xSetLayerInitializedFlag(pcSlice); 1264 1264 #endif 1265 #if M0040_ADAPTIVE_RESOLUTION_CHANGE1266 1265 if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId > 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange()) 1267 1266 { … … 1270 1269 pcSlice->setMFMEnabledFlag(false); 1271 1270 } 1272 #endif1273 1271 #endif //SVC_EXTENSION 1274 1272 … … 3482 3480 pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut); 3483 3481 3484 #if M0040_ADAPTIVE_RESOLUTION_CHANGE3482 #if SVC_EXTENSION 3485 3483 pcPicYuvRecOut->setReconstructed(true); 3486 3484 #endif
Note: See TracChangeset for help on using the changeset viewer.