Changeset 296 in SHVCSoftware for branches/SHM-2.1-dev/source
- Timestamp:
- 20 Jun 2013, 17:44:29 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r294 r296 843 843 ("ConstantPicRateIdc", cfg_constantPicRateIdc, string(""), "List of constant picture rate IDCs; include non-negative number even if corresponding flag is 0") 844 844 #endif 845 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 846 ("AdaptiveResolutionChange", m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)") 847 #endif 845 848 ; 846 849 … … 2137 2140 } 2138 2141 #endif 2142 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2143 if (m_adaptiveResolutionChange > 0) 2144 { 2145 xConfirmPara(m_numLayers != 2, "Adaptive resolution change works with 2 layers only"); 2146 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"); 2147 } 2148 #endif 2139 2149 #undef xConfirmPara 2140 2150 if (check_failed) … … 2175 2185 printf("Multiview : %d\n", m_scalabilityMask[0] ); 2176 2186 printf("Scalable : %d\n", m_scalabilityMask[1] ); 2187 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2188 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange ); 2189 #endif 2177 2190 for(UInt layer=0; layer<m_numLayers; layer++) 2178 2191 { -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r292 r296 369 369 Int* m_constantPicRateIdc; ///< Indicates constant picture rate idc for various sub-layers 370 370 #endif 371 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 372 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame 373 #endif 371 374 public: 372 375 TAppEncCfg(); -
branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r292 r296 515 515 } 516 516 #endif 517 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 518 m_acTEncTop[layer].setAdaptiveResolutionChange( m_adaptiveResolutionChange ); 519 #endif 517 520 } 518 521 } … … 1031 1034 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 1032 1035 #endif 1036 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1037 vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false); 1038 #endif 1033 1039 #else 1034 1040 m_cTEncTop.init(); … … 1150 1156 #endif 1151 1157 1158 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1159 if (m_adaptiveResolutionChange) 1160 { 1161 for(UInt layer = 0; layer < m_numLayers; layer++) 1162 { 1163 TComList<TComPicYuv*>::iterator iterPicYuvRec; 1164 for (iterPicYuvRec = m_acListPicYuvRec[layer].begin(); iterPicYuvRec != m_acListPicYuvRec[layer].end(); iterPicYuvRec++) 1165 { 1166 TComPicYuv* recPic = *(iterPicYuvRec); 1167 recPic->setReconstructed(false); 1168 } 1169 } 1170 } 1171 #endif 1172 1152 1173 // loop through frames in one GOP 1153 1174 for ( UInt iPicIdInGOP=0; iPicIdInGOP < (bFirstFrame? 1:m_iGOPSize); iPicIdInGOP++ ) … … 1416 1437 { 1417 1438 TComPicYuv* pcPicYuvRec = *(iterPicYuvRec++); 1439 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1440 if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed()) 1441 #else 1418 1442 if (!m_acLayerCfg[layer].getReconFile().empty()) 1443 #endif 1419 1444 { 1420 1445 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfLeft(), m_acLayerCfg[layer].getConfRight(), … … 1430 1455 list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin(); 1431 1456 1457 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1458 for ( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ ) 1459 #else 1432 1460 for ( i = 0; i < iNumEncoded; i++ ) 1461 #endif 1433 1462 { 1434 1463 const AccessUnit& au = *(iterBitstream++); -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComPicYuv.h
r236 r296 92 92 #endif 93 93 94 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 95 Bool m_isReconstructed; 96 #endif 97 94 98 Bool m_bIsBorderExtended; 95 99 … … 174 178 // Dump picture 175 179 Void dump (Char* pFileName, Bool bAdd = false); 176 180 181 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 182 Void setReconstructed(Bool x) { m_isReconstructed = x; } 183 Bool isReconstructed() { return m_isReconstructed; } 184 #endif 185 177 186 // Set border extension flag 178 187 Void setBorderExtension(Bool b) { m_bIsBorderExtended = b; } -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r291 r296 572 572 #if ILR_RESTR 573 573 Int numInterLayerRPSPics = 0; 574 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 575 if( m_layerId > 0 && m_activeNumILRRefIdx > 0 ) 576 #else 574 577 if( m_layerId > 0 ) 578 #endif 575 579 { 576 580 for( i=0; i < m_pcVPS->getNumDirectRefLayers( m_layerId ); i++ ) -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h
r291 r296 567 567 UInt m_maxSublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1]; 568 568 #endif 569 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 570 Bool m_singleLayerForNonIrapFlag; 571 #endif 569 572 public: 570 573 TComVPS(); … … 730 733 Bool getMaxSublayerForIlpPlus1(Int layerId) { return m_maxSublayerForIlpPlus1[layerId]; } 731 734 Void setMaxSublayerForIlpPlus1(Int layerId, UInt maxSublayer) { m_maxSublayerForIlpPlus1[layerId] = maxSublayer; } 735 #endif 736 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 737 Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } 738 Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } 732 739 #endif 733 740 }; -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
r292 r296 62 62 #define VPS_SPLIT_FLAG 1 ///< M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1. 63 63 #define M0457_PREDICTION_INDICATIONS 1 64 #define M0040_ADAPTIVE_RESOLUTION_CHANGE 1 64 65 #endif 65 66 -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r291 r296 1158 1158 } 1159 1159 #endif 1160 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1161 READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false); 1162 #endif 1160 1163 } 1161 1164 #endif … … 1619 1622 rpcSlice->setColRefLayerIdx( 0 ); 1620 1623 rpcSlice->setAltColIndicationFlag( false ); 1621 if ( sps->getLayerId() > 0 && rpcSlice->get NumMotionPredRefLayers() > 0 )1624 if ( sps->getLayerId() > 0 && rpcSlice->getActiveNumILRRefIdx() > 0 && rpcSlice->getNumMotionPredRefLayers() > 0 ) 1622 1625 { 1623 1626 READ_FLAG( uiCode, "alt_collocated_indication_flag" ); -
branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r295 r296 937 937 pcSlice->setRefPicList( m_cListPic, false, m_cIlpPic); 938 938 } 939 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 940 else if ( m_layerId > 0 ) 941 { 942 pcSlice->setRefPicList( m_cListPic, false, NULL); 943 } 944 #endif 939 945 #endif 940 946 -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r291 r296 879 879 } 880 880 #endif 881 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 882 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); 883 #endif 881 884 } 882 885 #endif … … 1222 1225 { 1223 1226 #if REF_IDX_FRAMEWORK && M0457_COL_PICTURE_SIGNALING 1224 if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->get NumMotionPredRefLayers() > 0 )1225 { 1226 WRITE_FLAG( 1, "alt_collocated_indication_flag" );1227 if (pcSlice->get NumMotionPredRefLayers() > 1)1227 if ( !pcSlice->getIdrPicFlag() && pcSlice->getLayerId() > 0 && pcSlice->getActiveNumILRRefIdx() > 0 && pcSlice->getNumMotionPredRefLayers() > 0 ) 1228 { 1229 WRITE_FLAG( pcSlice->getAltColIndicationFlag() ? 1 : 0, "alt_collocated_indication_flag" ); 1230 if (pcSlice->getAltColIndicationFlag() && pcSlice->getNumMotionPredRefLayers() > 1) 1228 1231 { 1229 1232 WRITE_UVLC(0, "collocated_ref_layer_idx"); -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r292 r296 367 367 #if REF_IDX_FRAMEWORK 368 368 Int m_elRapSliceBEnabled; 369 #endif 370 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 371 Int m_adaptiveResolutionChange; 369 372 #endif 370 373 … … 888 891 Int getElRapSliceTypeB() {return m_elRapSliceBEnabled;} 889 892 #endif 893 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 894 Void setAdaptiveResolutionChange(Int x) { m_adaptiveResolutionChange = x; } 895 Int getAdaptiveResolutionChange() { return m_adaptiveResolutionChange; } 896 #endif 890 897 }; 891 898 -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r295 r296 498 498 } 499 499 500 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 501 if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId == 1 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) || 502 (m_layerId == 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())) ) 503 { 504 continue; 505 } 506 #endif 507 500 508 if( getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR) == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 501 509 { … … 518 526 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 519 527 #endif 528 529 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 530 if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId == 1 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange()) 531 { 532 pcSlice->setActiveNumILRRefIdx(0); 533 pcSlice->setInterLayerPredEnabledFlag(false); 520 534 #if M0457_COL_PICTURE_SIGNALING 521 pcSlice->setMFMEnabledFlag(m_pcEncTop->getMFMEnabledFlag()); 522 pcSlice->setAltColIndicationFlag(m_pcEncTop->getNumMotionPredRefLayers() > 0 ? true : false); 523 pcSlice->setColRefLayerIdx(0); 524 #endif 535 pcSlice->setMFMEnabledFlag(false); 536 pcSlice->setAltColIndicationFlag(false); 537 #endif 538 } 539 #endif 540 525 541 pcSlice->setLastIDR(m_iLastIDR); 526 542 pcSlice->setSliceIdx(0); … … 797 813 #if REF_IDX_FRAMEWORK 798 814 #if M0457_COL_PICTURE_SIGNALING 799 if ( pcSlice->getSliceType() == B_SLICE && ! pcSlice->getAltColIndicationFlag() )815 if ( pcSlice->getSliceType() == B_SLICE && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) ) 800 816 #else 801 817 if( pcSlice->getSliceType() == B_SLICE ) … … 846 862 #if REF_IDX_MFM 847 863 #if M0457_COL_PICTURE_SIGNALING 848 if( pcSlice->getMFMEnabledFlag() && ! pcSlice->getAltColIndicationFlag() )864 if( pcSlice->getMFMEnabledFlag() && !(pcSlice->getActiveNumILRRefIdx() > 0 && m_pcEncTop->getNumMotionPredRefLayers() > 0) ) 849 865 #else 850 866 if( pcSlice->getSPS()->getMFMEnabledFlag() ) … … 2260 2276 pcPic->getPicYuvRec()->copyToPic(pcPicYuvRecOut); 2261 2277 2278 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2279 pcPicYuvRecOut->setReconstructed(true); 2280 #endif 2281 2262 2282 pcPic->setReconMark ( true ); 2263 2283 m_bFirst = false; -
branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r282 r296 502 502 #else 503 503 rpcSlice->setNumILRRefIdx( rpcSlice->getVPS()->getNumDirectRefLayers( layerId ) ); 504 #endif 504 #endif 505 #if M0457_COL_PICTURE_SIGNALING 506 rpcSlice->setMFMEnabledFlag(m_ppcTEncTop[layerId]->getMFMEnabledFlag()); 507 rpcSlice->setAltColIndicationFlag(rpcSlice->getMFMEnabledFlag()); 508 #endif 505 509 } 506 510
Note: See TracChangeset for help on using the changeset viewer.