Changeset 524 in SHVCSoftware
- Timestamp:
- 19 Dec 2013, 17:46:32 (11 years ago)
- Location:
- branches/SHM-4.1-dev
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/cfg/layers.cfg
r523 r524 5 5 ScalabilityMask3 : 0 # Auxiliary pictures 6 6 AdaptiveResolutionChange : 0 # Resolution change frame (0: disable) 7 SkipPictureAtArcSwitch : 0 # Code higher layer picture as skip at ARC switching (0: disable (default), 1: enable) 7 8 MaxTidRefPresentFlag : 1 # max_tid_ref_present_flag (0=not present, 1=present(default)) 8 9 CrossLayerIrapAlignFlag : 1 # Align IRAP across layers -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r522 r524 968 968 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 969 969 ("AdaptiveResolutionChange", m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)") 970 #endif 971 #if HIGHER_LAYER_IRAP_SKIP_FLAG 972 ("SkipPictureAtArcSwitch", m_skipPictureAtArcSwitch, false, "Code the higher layer picture in ARC up-switching as a skip picture. (0: disable)") 970 973 #endif 971 974 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI … … 2324 2327 } 2325 2328 #endif 2329 #if HIGHER_LAYER_IRAP_SKIP_FLAG 2330 if (m_adaptiveResolutionChange > 0) 2331 { 2332 xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change."); 2333 } 2334 if (m_skipPictureAtArcSwitch) 2335 { 2336 xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)"); 2337 } 2338 #endif 2326 2339 #if N0120_MAX_TID_REF_CFG 2327 2340 for (UInt layer=0; layer < MAX_LAYERS-1; layer++) … … 2426 2439 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2427 2440 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange ); 2441 #endif 2442 #if HIGHER_LAYER_IRAP_SKIP_FLAG 2443 printf("Skip picture at ARC switch : %d\n", m_skipPictureAtArcSwitch ); 2428 2444 #endif 2429 2445 #if N0147_IRAP_ALIGN_FLAG -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r522 r524 377 377 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame 378 378 #endif 379 #if HIGHER_LAYER_IRAP_SKIP_FLAG 380 Bool m_skipPictureAtArcSwitch; ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture 381 #endif 379 382 #if REPN_FORMAT_IN_VPS 380 383 RepFormatCfg m_repFormatCfg[16]; ///< Rep_format structures -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r522 r524 170 170 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY() ); // Need modification to change for each layer 171 171 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC() ); // Need modification to change for each layer 172 #endif 173 #if HIGHER_LAYER_IRAP_SKIP_FLAG 174 m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch( m_skipPictureAtArcSwitch ); 172 175 #endif 173 176 } … … 1361 1364 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1362 1365 vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false); 1366 #endif 1367 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1368 vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch); 1363 1369 #endif 1364 1370 #if !VPS_EXTN_OFFSET_CALC -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r520 r524 601 601 Bool m_singleLayerForNonIrapFlag; 602 602 #endif 603 #if HIGHER_LAYER_IRAP_SKIP_FLAG 604 Bool m_higherLayerIrapSkipFlag; 605 #endif 603 606 #if TILE_BOUNDARY_ALIGNED_FLAG 604 607 Bool m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; … … 863 866 Bool getSingleLayerForNonIrapFlag() { return m_singleLayerForNonIrapFlag; } 864 867 Void setSingleLayerForNonIrapFlag(Bool x) { m_singleLayerForNonIrapFlag = x; } 868 #endif 869 #if HIGHER_LAYER_IRAP_SKIP_FLAG 870 Bool getHigherLayerIrapSkipFlag() { return m_higherLayerIrapSkipFlag; } 871 Void setHigherLayerIrapSkipFlag(Bool x) { m_higherLayerIrapSkipFlag = x; } 865 872 #endif 866 873 #if TILE_BOUNDARY_ALIGNED_FLAG -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r521 r524 99 99 #define N0160_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling 100 100 #define VPS_VUI_BITRATE_PICRATE 1 ///< JCTVC-N0085: Signal bit rate and picture in VPS VUI 101 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 102 #define HIGHER_LAYER_IRAP_SKIP_FLAG 1 ///< JCTVC-O0199: Indication that higher layer IRAP picture uses skip blocks only 103 #endif 101 104 #endif //VPS_VUI 102 105 -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r516 r524 1471 1471 READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false); 1472 1472 #endif 1473 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1474 READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false); 1475 #endif 1473 1476 1474 1477 READ_FLAG( uiCode, "vps_vui_present_flag" ); -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCu.cpp
r494 r524 317 317 } 318 318 319 #if HIGHER_LAYER_IRAP_SKIP_FLAG 320 if (pcCU->getSlice()->getVPS()->getHigherLayerIrapSkipFlag() && pcCU->getSlice()->getVPS()->getSingleLayerForNonIrapFlag() && pcCU->getLayerId() > 0) 321 { 322 Bool lowerLayerExist = false; 323 for(int i=0;i<pcCU->getLayerId();i++) 324 { 325 if(pcCU->getSlice()->getBaseColPic(pcCU->getSlice()->getInterLayerPredLayerIdc(i))) 326 { 327 lowerLayerExist = true; 328 } 329 } 330 if(lowerLayerExist) 331 { 332 assert(pcCU->isSkipped(uiAbsPartIdx)); 333 } 334 } 335 #endif 336 319 337 if( pcCU->isSkipped(uiAbsPartIdx) ) 320 338 { -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r516 r524 1149 1149 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); 1150 1150 #endif 1151 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1152 WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" ); 1153 #endif 1151 1154 1152 1155 #if !VPS_VUI -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCfg.h
r512 r524 395 395 #if O0153_ALT_OUTPUT_LAYER_FLAG 396 396 Bool m_altOutputLayerFlag; 397 #endif 398 #if HIGHER_LAYER_IRAP_SKIP_FLAG 399 Int m_skipPictureAtArcSwitch; 397 400 #endif 398 401 #endif … … 937 940 Int getAdaptiveResolutionChange() { return m_adaptiveResolutionChange; } 938 941 #endif 942 #if HIGHER_LAYER_IRAP_SKIP_FLAG 943 Void setSkipPictureAtArcSwitch(Int x) { m_skipPictureAtArcSwitch = x; } 944 Int getSkipPictureAtArcSwitch() { return m_skipPictureAtArcSwitch; } 945 #endif 939 946 #if AUXILIARY_PICTURES 940 947 Void setChromaFormatIDC(ChromaFormat x) { m_chromaFormatIDC = x; } -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.cpp
r494 r524 460 460 if(!bSliceEnd && !bSliceStart && bInsidePicture ) 461 461 { 462 #if HIGHER_LAYER_IRAP_SKIP_FLAG 463 if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange()) 464 { 465 rpcTempCU->initEstData( uiDepth, iBaseQP ); 466 467 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode, true ); 468 } 469 else 470 { 471 #endif 462 472 #if (ENCODER_FAST_MODE) 463 473 Bool testInter = true; … … 779 789 bSubBranch = true; 780 790 } 791 #if HIGHER_LAYER_IRAP_SKIP_FLAG 792 } 793 #endif 781 794 } 782 795 else if(!(bSliceEnd && bInsidePicture)) … … 1143 1156 1144 1157 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); 1158 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1159 if (m_pcEncCfg->getSkipPictureAtArcSwitch() && m_pcEncCfg->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncCfg->getAdaptiveResolutionChange()) 1160 { 1161 pcCU->setSkipFlagSubParts(true, uiAbsPartIdx, uiDepth); 1162 } 1163 #endif 1145 1164 // If slice start is within this cu... 1146 1165 Bool bSliceStart = pcSlice->getSliceSegmentCurStartCUAddr() > pcPic->getPicSym()->getInverseCUOrderMap(pcCU->getAddr())*pcCU->getPic()->getNumPartInCU()+uiAbsPartIdx && … … 1353 1372 * \returns Void 1354 1373 */ 1374 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1375 Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode, Bool bUseSkip ) 1376 #else 1355 1377 Void TEncCu::xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode ) 1378 #endif 1356 1379 { 1357 1380 assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE ); … … 1387 1410 } 1388 1411 1412 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1413 for( UInt uiNoResidual = bUseSkip?1:0; uiNoResidual < iteration; ++uiNoResidual ) 1414 #else 1389 1415 for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual ) 1416 #endif 1390 1417 { 1391 1418 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCu.h
r494 r524 146 146 Int xComputeQP ( TComDataCU* pcCU, UInt uiDepth ); 147 147 Void xCheckBestMode ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt uiDepth ); 148 148 #if HIGHER_LAYER_IRAP_SKIP_FLAG 149 Void xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode, Bool bUseSkip=false); 150 #else 149 151 Void xCheckRDCostMerge2Nx2N( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool *earlyDetectionSkipMode); 152 #endif 150 153 151 154 #if AMP_MRG -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r514 r524 2280 2280 // set entropy coder for RD 2281 2281 m_pcEntropyCoder->setEntropyCoder ( m_pcSbacCoder, pcSlice ); 2282 #if HIGHER_LAYER_IRAP_SKIP_FLAG 2283 if ( pcSlice->getSPS()->getUseSAO() && !( m_pcEncTop->getSkipPictureAtArcSwitch() && m_pcEncTop->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncTop->getAdaptiveResolutionChange()) ) 2284 #else 2282 2285 if ( pcSlice->getSPS()->getUseSAO() ) 2286 #endif 2283 2287 { 2284 2288 m_pcEntropyCoder->resetEntropy(); … … 2303 2307 #endif 2304 2308 processingState = ENCODE_SLICE; 2305 2309 #if HIGHER_LAYER_IRAP_SKIP_FLAG 2310 if ( ( m_pcEncTop->getSkipPictureAtArcSwitch() && m_pcEncTop->getAdaptiveResolutionChange() > 0 && pcSlice->getLayerId() == 1 && pcSlice->getPOC() == m_pcEncTop->getAdaptiveResolutionChange()) ) 2311 { 2312 pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[0]=0; 2313 pcSlice->getPic()->getPicSym()->getSaoParam()->bSaoFlag[1]=0; 2314 } 2315 #endif 2306 2316 for(Int s=0; s< uiNumSlices; s++) 2307 2317 { -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r508 r524 517 517 rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() ); 518 518 rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() ); 519 #if HIGHER_LAYER_IRAP_SKIP_FLAG 520 if (m_pcCfg->getSkipPictureAtArcSwitch() && m_pcCfg->getAdaptiveResolutionChange() > 0 && rpcSlice->getLayerId() == 1 && rpcSlice->getPOC() == m_pcCfg->getAdaptiveResolutionChange()) 521 { 522 rpcSlice->setMaxNumMergeCand ( 1 ); 523 } 524 #endif 519 525 xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() ); 520 526
Note: See TracChangeset for help on using the changeset viewer.