Changeset 540 in SHVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 9 Jan 2014, 05:04:17 (11 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev (added) merged: 501-539 /trunk merged: 499
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev/source (added) merged: 502-522,524-533,535,537-539
- Property svn:mergeinfo changed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r494 r540 399 399 string* cfg_predLayerIdsPtr [MAX_LAYERS]; 400 400 #endif 401 #if O0098_SCALED_REF_LAYER_ID 402 string cfg_scaledRefLayerId [MAX_LAYERS]; 403 #endif 401 404 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 402 405 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; … … 405 408 Int* cfg_numScaledRefLayerOffsets[MAX_LAYERS]; 406 409 410 #if O0098_SCALED_REF_LAYER_ID 411 string* cfg_scaledRefLayerIdPtr [MAX_LAYERS]; 412 #endif 407 413 string* cfg_scaledRefLayerLeftOffsetPtr [MAX_LAYERS]; 408 414 string* cfg_scaledRefLayerTopOffsetPtr [MAX_LAYERS]; … … 471 477 for(Int i = 0; i < MAX_LAYERS; i++) 472 478 { 479 #if O0098_SCALED_REF_LAYER_ID 480 cfg_scaledRefLayerIdPtr [layer] = &cfg_scaledRefLayerId[layer] ; 481 #endif 473 482 cfg_scaledRefLayerLeftOffsetPtr [layer] = &cfg_scaledRefLayerLeftOffset[layer] ; 474 483 cfg_scaledRefLayerTopOffsetPtr [layer] = &cfg_scaledRefLayerTopOffset[layer] ; … … 582 591 #endif 583 592 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 593 #if O0098_SCALED_REF_LAYER_ID 594 ("ScaledRefLayerId%d", cfg_scaledRefLayerIdPtr, string(""), MAX_LAYERS, "Layer ID of scaled base layer picture") 595 #endif 584 596 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 585 597 " top-left luma sample of the EL picture, in units of two luma samples") … … 602 614 ("MaxTidRefPresentFlag", m_maxTidRefPresentFlag, true, "max_tid_ref_present_flag (0: not present, 1: present(default)) " ) 603 615 ("MaxTidIlRefPicsPlus1%d", cfg_maxTidIlRefPicsPlus1, 1, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction") 604 #endif 616 #endif 617 #if O0223_PICTURE_TYPES_ALIGN_FLAG 618 ("CrossLayerPictureTypeAlignFlag", m_crossLayerPictureTypeAlignFlag, true, "align picture type across layers" ) 619 #endif 620 #if N0147_IRAP_ALIGN_FLAG 621 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 622 #endif 605 623 #if AVC_BASE 606 624 ("AvcBase,-avc", m_avcBaseLayerFlag, 0, "avc_base_layer_flag") … … 773 791 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 774 792 ("SAOLcuBoundary", m_saoLcuBoundary, false, "0: right/bottom LCU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas") 793 #if !HM_CLEANUP_SAO 775 794 ("SAOLcuBasedOptimization", m_saoLcuBasedOptimization, true, "0: SAO picture-based optimization, 1: SAO LCU-based optimization ") 795 #endif 776 796 ("SliceMode", m_sliceMode, 0, "0: Disable all Recon slice limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 777 797 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" … … 827 847 ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC") 828 848 #endif 829 #if RATE_CONTROL_LAMBDA_DOMAIN830 849 #if RC_SHVC_HARMONIZATION 831 850 ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d") … … 839 858 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 840 859 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bitrate" ) 841 #if M0036_RC_IMPROVEMENT842 860 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 843 #else844 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" )845 #endif846 861 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: LCU level RC; false: picture level RC" ) 847 862 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use LCU level separate R-lambda model" ) 848 863 ( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" ) 849 864 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 850 #endif851 #else852 ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")853 ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate")854 ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit")855 865 #endif 856 866 … … 954 964 ("AdaptiveResolutionChange", m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)") 955 965 #endif 966 #if HIGHER_LAYER_IRAP_SKIP_FLAG 967 ("SkipPictureAtArcSwitch", m_skipPictureAtArcSwitch, false, "Code the higher layer picture in ARC up-switching as a skip picture. (0: disable)") 968 #endif 956 969 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 957 970 ("SEIInterLayerConstrainedTileSets", m_interLayerConstrainedTileSetsSEIEnabled, false, "Control generation of inter layer constrained tile sets SEI message") 958 971 ("IlNumSetsInMessage", m_ilNumSetsInMessage, 0u, "Number of inter layer constrained tile sets") 959 972 ("TileSetsArray", cfg_tileSets, string(""), "Array containing tile sets params (TopLeftTileIndex, BottonRightTileIndex and ilcIdc for each set) ") 973 #endif 974 #if O0153_ALT_OUTPUT_LAYER_FLAG 975 ("AltOutputLayerFlag", m_altOutputLayerFlag, false, "Specifies the value of alt_output_layer_flag in VPS extension") 976 #endif 977 #if O0149_CROSS_LAYER_BLA_FLAG 978 ("CrossLayerBLAFlag", m_crossLayerBLAFlag, false, "Specifies the value of cross_layer_bla_flag in VPS") 960 979 #endif 961 980 ; … … 1086 1105 if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets) 1087 1106 { 1107 #if O0098_SCALED_REF_LAYER_ID 1108 assert( strcmp(cfg_scaledRefLayerId[layer].c_str(), "")); 1109 #endif 1088 1110 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || 1089 1111 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") || … … 1094 1116 1095 1117 Int *tempArray = NULL; // Contain the value 1118 1119 #if O0098_SCALED_REF_LAYER_ID 1120 // ID // 1121 if(strcmp(cfg_scaledRefLayerId[layer].c_str(), "")) 1122 { 1123 cfgStringToArray( &tempArray, cfg_scaledRefLayerId[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "ScaledRefLayerId"); 1124 if(tempArray) 1125 { 1126 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 1127 { 1128 m_acLayerCfg[layer].m_scaledRefLayerId[i] = tempArray[i]; 1129 } 1130 delete [] tempArray; tempArray = NULL; 1131 } 1132 } 1133 #endif 1134 1096 1135 // Left offset // 1097 1136 if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "")) … … 2153 2192 } 2154 2193 2155 #if RATE_CONTROL_LAMBDA_DOMAIN2156 2194 #if RC_SHVC_HARMONIZATION 2157 2195 for ( Int layer=0; layer<m_numLayers; layer++ ) … … 2184 2222 } 2185 2223 #endif 2186 #else2187 if(m_enableRateCtrl)2188 {2189 Int numLCUInWidth = (m_iSourceWidth / m_uiMaxCUWidth) + (( m_iSourceWidth % m_uiMaxCUWidth ) ? 1 : 0);2190 Int numLCUInHeight = (m_iSourceHeight / m_uiMaxCUHeight)+ (( m_iSourceHeight % m_uiMaxCUHeight) ? 1 : 0);2191 Int numLCUInPic = numLCUInWidth * numLCUInHeight;2192 2193 xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" );2194 2195 m_iMaxDeltaQP = MAX_DELTA_QP;2196 m_iMaxCuDQPDepth = MAX_CUDQP_DEPTH;2197 }2198 #endif2199 2224 2200 2225 xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagValue, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0"); … … 2284 2309 xConfirmPara(m_numLayers != 2, "Adaptive resolution change works with 2 layers only"); 2285 2310 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"); 2311 } 2312 #endif 2313 #if HIGHER_LAYER_IRAP_SKIP_FLAG 2314 if (m_adaptiveResolutionChange > 0) 2315 { 2316 xConfirmPara(m_crossLayerIrapAlignFlag != 0, "Cross layer IRAP alignment must be disabled when using adaptive resolution change."); 2317 } 2318 if (m_skipPictureAtArcSwitch) 2319 { 2320 xConfirmPara(m_adaptiveResolutionChange <= 0, "Skip picture at ARC switching only works when Adaptive Resolution Change is active (AdaptiveResolutionChange > 0)"); 2286 2321 } 2287 2322 #endif … … 2379 2414 printf("Multiview : %d\n", m_scalabilityMask[1] ); 2380 2415 printf("Scalable : %d\n", m_scalabilityMask[2] ); 2416 #if AVC_BASE 2417 printf("Base layer : %s\n", m_avcBaseLayerFlag ? "AVC" : "HEVC"); 2418 #endif 2381 2419 #if AUXILIARY_PICTURES 2382 2420 printf("Auxiliary pictures : %d\n", m_scalabilityMask[3] ); … … 2388 2426 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2389 2427 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange ); 2428 #endif 2429 #if HIGHER_LAYER_IRAP_SKIP_FLAG 2430 printf("Skip picture at ARC switch : %d\n", m_skipPictureAtArcSwitch ); 2431 #endif 2432 #if O0223_PICTURE_TYPES_ALIGN_FLAG 2433 printf("Align picture type : %d\n", m_crossLayerPictureTypeAlignFlag ); 2434 #endif 2435 #if N0147_IRAP_ALIGN_FLAG 2436 printf("Cross layer IRAP alignment : %d\n", m_crossLayerIrapAlignFlag ); 2390 2437 #endif 2391 2438 for(UInt layer=0; layer<m_numLayers; layer++) … … 2453 2500 #endif 2454 2501 #if O0215_PHASE_ALIGNMENT 2455 printf("cross-layer sample alignment : %d\n", m_phaseAlignFlag); 2456 #endif 2457 #if RATE_CONTROL_LAMBDA_DOMAIN 2502 printf("Cross-layer sample alignment : %d\n", m_phaseAlignFlag); 2503 #endif 2458 2504 #if !RC_SHVC_HARMONIZATION 2459 2505 printf("RateControl : %d\n", m_RCEnableRateControl ); … … 2468 2514 } 2469 2515 #endif 2470 #else 2471 printf("RateControl : %d\n", m_enableRateCtrl); 2472 if(m_enableRateCtrl) 2473 { 2474 printf("TargetBitrate : %d\n", m_targetBitrate); 2475 printf("NumLCUInUnit : %d\n", m_numLCUInUnit); 2476 } 2477 #endif 2516 2478 2517 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 2479 2518 printf("\n"); … … 2516 2555 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 2517 2556 #endif 2557 #if !HM_CLEANUP_SAO 2518 2558 printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0)); 2519 2559 #endif 2520 2560 printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 ); 2521 2561 printf("WPP:%d ", (Int)m_useWeightedPred); … … 2535 2575 #if SVC_EXTENSION 2536 2576 printf("RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 ); 2537 #if AVC_BASE2538 printf("AvcBase:%d ", m_avcBaseLayerFlag ? 1 : 0);2539 #else2540 printf("AvcBase:%d ", 0);2541 #endif2542 2577 printf("EL_RAP_SliceType: %d ", m_elRapSliceBEnabled); 2543 2578 printf("REF_IDX_ME_ZEROMV: %d ", REF_IDX_ME_ZEROMV); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r494 r540 187 187 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture 188 188 Bool m_saoLcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas 189 #if !HM_CLEANUP_SAO 189 190 Bool m_saoLcuBasedOptimization; ///< SAO LCU-based optimization 191 #endif 190 192 // coding tools (loop filter) 191 193 Bool m_bLoopFilterDisable; ///< flag for using deblocking filter … … 295 297 Int m_TMVPModeId; 296 298 Int m_signHideFlag; 297 #if RATE_CONTROL_LAMBDA_DOMAIN298 299 #if !RC_SHVC_HARMONIZATION 299 300 Bool m_RCEnableRateControl; ///< enable rate control or not 300 301 Int m_RCTargetBitrate; ///< target bitrate when rate control is enabled 301 #if M0036_RC_IMPROVEMENT302 302 Int m_RCKeepHierarchicalBit; ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation 303 #else304 Bool m_RCKeepHierarchicalBit; ///< whether keeping hierarchical bit allocation structure or not305 #endif306 303 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control 307 304 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level 308 305 Int m_RCInitialQP; ///< inital QP for rate control 309 306 Bool m_RCForceIntraQP; ///< force all intra picture to use initial QP or not 310 #endif311 #else312 Bool m_enableRateCtrl; ///< Flag for using rate control algorithm313 Int m_targetBitrate; ///< target bitrate314 Int m_numLCUInUnit; ///< Total number of LCUs in a frame should be completely divided by the NumLCUInUnit315 307 #endif 316 308 Int m_useScalingListId; ///< using quantization matrix … … 358 350 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 359 351 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 352 #if O0153_ALT_OUTPUT_LAYER_FLAG 353 Bool m_altOutputLayerFlag; ///< Specifies the value of alt_output_laye_flag in VPS extension 354 #endif 360 355 361 356 #if SVC_EXTENSION … … 373 368 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 374 369 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame 370 #endif 371 #if HIGHER_LAYER_IRAP_SKIP_FLAG 372 Bool m_skipPictureAtArcSwitch; ///< Indicates that when ARC up-switching is performed the higher layer picture is a skip picture 375 373 #endif 376 374 #if REPN_FORMAT_IN_VPS … … 386 384 #endif 387 385 #if O0215_PHASE_ALIGNMENT 388 bool m_phaseAlignFlag; 386 Bool m_phaseAlignFlag; 387 #endif 388 #if O0223_PICTURE_TYPES_ALIGN_FLAG 389 Bool m_crossLayerPictureTypeAlignFlag; 390 #endif 391 #if N0147_IRAP_ALIGN_FLAG 392 Bool m_crossLayerIrapAlignFlag; 393 #endif 394 #if O0149_CROSS_LAYER_BLA_FLAG 395 bool m_crossLayerBLAFlag; 389 396 #endif 390 397 public: -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r494 r540 53 53 m_aiPad[1] = m_aiPad[0] = 0; 54 54 m_numScaledRefLayerOffsets = 0; 55 #if O0098_SCALED_REF_LAYER_ID 56 ::memset(m_scaledRefLayerId, 0, sizeof(m_scaledRefLayerId)); 57 #endif 55 58 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); 56 59 ::memset(m_scaledRefLayerTopOffset, 0, sizeof(m_scaledRefLayerTopOffset)); -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r494 r540 95 95 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 96 96 Int m_numScaledRefLayerOffsets ; 97 #if O0098_SCALED_REF_LAYER_ID 98 Int m_scaledRefLayerId [MAX_LAYERS]; 99 #endif 97 100 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; 98 101 Int m_scaledRefLayerTopOffset [MAX_LAYERS]; -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r498 r540 90 90 vps->setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); 91 91 } 92 92 93 #if REPN_FORMAT_IN_VPS 93 94 vps->setRepFormatIdxPresentFlag( true ); // Could be disabled to optimize in some cases. … … 148 149 { 149 150 RepFormat *repFormat = vps->getVpsRepFormat( idx ); 151 #if REPN_FORMAT_CONTROL_FLAG 152 repFormat->setChromaAndBitDepthVpsPresentFlag( true ); 153 if (idx==0) 154 { 155 assert(repFormat->getChromaAndBitDepthVpsPresentFlag() == true); 156 } 157 #endif 150 158 repFormat->setPicWidthVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceWidth() ); 151 159 repFormat->setPicHeightVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceHeight() ); … … 162 170 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY() ); // Need modification to change for each layer 163 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 ); 164 175 #endif 165 176 } … … 459 470 460 471 m_acTEncTop[layer].setSaoLcuBoundary (m_saoLcuBoundary); 472 #if !HM_CLEANUP_SAO 461 473 m_acTEncTop[layer].setSaoLcuBasedOptimization (m_saoLcuBasedOptimization); 474 #endif 462 475 m_acTEncTop[layer].setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 463 476 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); … … 535 548 m_acTEncTop[layer].setScalingListFile ( m_scalingListFile ); 536 549 m_acTEncTop[layer].setSignHideFlag(m_signHideFlag); 537 #if RATE_CONTROL_LAMBDA_DOMAIN538 550 #if RC_SHVC_HARMONIZATION 539 551 m_acTEncTop[layer].setUseRateCtrl (m_acLayerCfg[layer].getRCEnableRateControl()); … … 552 564 m_acTEncTop[layer].setInitialQP ( m_RCInitialQP ); 553 565 m_acTEncTop[layer].setForceIntraQP ( m_RCForceIntraQP ); 554 #endif555 #else556 m_acTEncTop[layer].setUseRateCtrl ( m_enableRateCtrl);557 m_acTEncTop[layer].setTargetBitrate ( m_targetBitrate);558 m_acTEncTop[layer].setNumLCUInUnit ( m_numLCUInUnit);559 566 #endif 560 567 m_acTEncTop[layer].setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); … … 598 605 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 599 606 { 607 #if O0098_SCALED_REF_LAYER_ID 608 m_acTEncTop[layer].setScaledRefLayerId(i, m_acLayerCfg[layer].m_scaledRefLayerId[i]); 609 #endif 600 610 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 601 611 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); … … 607 617 #if AUXILIARY_PICTURES 608 618 m_acTEncTop[layer].setChromaFormatIDC( m_acLayerCfg[layer].m_chromaFormatIDC ); 619 #endif 620 #if O0153_ALT_OUTPUT_LAYER_FLAG 621 m_acTEncTop[layer].setAltOuputLayerFlag( m_altOutputLayerFlag ); 622 #endif 623 #if O0149_CROSS_LAYER_BLA_FLAG 624 m_acTEncTop[layer].setCrossLayerBLAFlag( m_crossLayerBLAFlag ); 609 625 #endif 610 626 } … … 768 784 769 785 m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary); 786 #if !HM_CLEANUP_SAO 770 787 m_cTEncTop.setSaoLcuBasedOptimization (m_saoLcuBasedOptimization); 788 #endif 771 789 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 772 790 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); … … 836 854 m_cTEncTop.setScalingListFile ( m_scalingListFile ); 837 855 m_cTEncTop.setSignHideFlag(m_signHideFlag); 838 #if RATE_CONTROL_LAMBDA_DOMAIN839 856 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); 840 857 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); … … 844 861 m_cTEncTop.setInitialQP ( m_RCInitialQP ); 845 862 m_cTEncTop.setForceIntraQP ( m_RCForceIntraQP ); 846 #else847 m_cTEncTop.setUseRateCtrl ( m_enableRateCtrl);848 m_cTEncTop.setTargetBitrate ( m_targetBitrate);849 m_cTEncTop.setNumLCUInUnit ( m_numLCUInUnit);850 #endif851 863 m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); 852 864 m_cTEncTop.setCUTransquantBypassFlagValue(m_CUTransquantBypassFlagValue); … … 1087 1099 #endif 1088 1100 #endif 1101 #if VPS_TSLAYERS 1102 vps->setMaxTSLayersPresentFlag(true); 1103 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 1104 { 1105 vps->setMaxTSLayersMinus1(i, vps->getMaxTLayers()-1); 1106 } 1107 #endif 1089 1108 #if N0120_MAX_TID_REF_PRESENT_FLAG 1090 1109 #if N0120_MAX_TID_REF_CFG … … 1171 1190 } 1172 1191 #endif 1192 #if VPS_DPB_SIZE_TABLE 1193 // The Layer ID List variables can be derived here. 1194 #if DERIVE_LAYER_ID_LIST_VARIABLES 1195 vps->deriveLayerIdListVariables(); 1196 #endif 1197 vps->deriveNumberOfSubDpbs(); 1198 // Initialize dpb_size_table() for all ouput layer sets in the VPS extension 1199 for(i = 1; i < vps->getNumOutputLayerSets(); i++) 1200 { 1201 Int layerSetId = vps->getOutputLayerSetIdx(i); 1202 1203 // For each output layer set, set the DPB size for each layer and the reorder/latency value the maximum for all layers 1204 Bool checkFlagOuter = false; // Used to calculate sub_layer_flag_info_present_flag 1205 Bool checkFlagInner[MAX_TLAYER]; // Used to calculate sub_layer_dpb_info_present_flag 1206 1207 for(Int j = 0; j < vps->getMaxTLayers(); j++) 1208 { 1209 1210 Int maxNumReorderPics = -1; 1211 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) 1212 { 1213 Int layerId = vps->getLayerSetLayerIdList(layerSetId, k); // k-th layer in the output layer set 1214 vps->setMaxVpsDecPicBufferingMinus1( i, k, j, m_acTEncTop[layerId].getMaxDecPicBuffering(j) - 1 ); 1215 maxNumReorderPics = std::max( maxNumReorderPics, m_acTEncTop[layerId].getNumReorderPics(j)); 1216 } 1217 vps->setMaxVpsNumReorderPics(i, j, maxNumReorderPics); 1218 1219 if( j == 0 ) // checkFlagInner[0] is always 1 1220 { 1221 checkFlagInner[j] = true; // Always signal sub-layer DPB information for the first sub-layer 1222 } 1223 else 1224 { 1225 checkFlagInner[j] = false; // Initialize to be false. If the values of the current sub-layers matches with the earlier sub-layer, 1226 // then will be continue to be false - i.e. the j-th sub-layer DPB info is not signaled 1227 checkFlagInner[j] |= ( maxNumReorderPics != vps->getMaxVpsNumReorderPics(i, j - 1) ); 1228 for(Int k = 0; k < vps->getNumSubDpbs(i) && !checkFlagInner[j]; k++) // If checkFlagInner[j] is true, break and signal the values 1229 { 1230 checkFlagInner[j] |= ( vps->getMaxVpsDecPicBufferingMinus1(i, k, j - 1) != vps->getMaxVpsDecPicBufferingMinus1(i, k, j) ); 1231 } 1232 } 1233 // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer 1234 vps->setSubLayerDpbInfoPresentFlag( i, j, checkFlagInner[j] ); 1235 } 1236 for(Int j = 1; j < vps->getMaxTLayers(); j++) // Check if DPB info of any of non-zero sub-layers is signaled. If so set flag to one 1237 { 1238 if( vps->getSubLayerDpbInfoPresentFlag(i, j) ) 1239 { 1240 checkFlagOuter = true; 1241 break; 1242 } 1243 } 1244 vps->setSubLayerFlagInfoPresentFlag( i, checkFlagOuter ); 1245 } 1246 #endif 1173 1247 #if VPS_EXTN_DIRECT_REF_LAYERS 1174 1248 // Direct reference layers 1175 1249 UInt maxDirectRefLayers = 0; 1250 #if O0096_DEFAULT_DEPENDENCY_TYPE 1251 Bool isDefaultDirectDependencyTypeSet = false; 1252 #endif 1176 1253 for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1177 1254 { … … 1202 1279 vps->setDirectDependencyType( layerCtr, refLayerCtr, ((m_acTEncTop[layerCtr].getSamplePredEnabledFlag(refLayerCtr) ? 1 : 0) | 1203 1280 (m_acTEncTop[layerCtr].getMotionPredEnabledFlag(refLayerCtr) ? 2 : 0)) - 1); 1281 #if O0096_DEFAULT_DEPENDENCY_TYPE 1282 if (!isDefaultDirectDependencyTypeSet) 1283 { 1284 vps->setDefaultDirectDependecyTypeFlag(1); 1285 vps->setDefaultDirectDependecyType(vps->getDirectDependencyType(layerCtr, refLayerCtr)); 1286 isDefaultDirectDependencyTypeSet = true; 1287 } 1288 else if (vps->getDirectDependencyType(layerCtr, refLayerCtr) != vps->getDefaultDirectDependencyType()) 1289 { 1290 vps->setDefaultDirectDependecyTypeFlag(0); 1291 } 1292 #endif 1204 1293 } 1205 1294 else … … 1210 1299 #endif 1211 1300 } 1212 #if IL_SL_SIGNALLING_N0371 1213 for(i = 1; i < vps->getMaxLayers(); i++) 1214 { 1215 for(Int j = 0; j < i; j++) 1216 { 1217 vps->setScalingListLayerDependency( i, j, vps->checkLayerDependency( i,j ) ); 1301 1302 #if O0092_0094_DEPENDENCY_CONSTRAINT 1303 for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1304 { 1305 vps->setNumRefLayers(vps->getLayerIdInNuh(layerCtr)); // identify the number of direct and indirect reference layers of current layer and set recursiveRefLayersFlags 1306 } 1307 if(vps->getMaxLayers() > MAX_REF_LAYERS) 1308 { 1309 for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1310 { 1311 assert( vps->getNumRefLayers(vps->getLayerIdInNuh(layerCtr)) <= MAX_REF_LAYERS); 1218 1312 } 1219 1313 } … … 1232 1326 } 1233 1327 #endif 1328 #if O0223_PICTURE_TYPES_ALIGN_FLAG 1329 vps->setCrossLayerPictureTypeAlignFlag( m_crossLayerPictureTypeAlignFlag ); 1330 #endif 1234 1331 #if N0147_IRAP_ALIGN_FLAG 1235 vps->setCrossLayerIrapAlignFlag( true);1332 vps->setCrossLayerIrapAlignFlag( m_crossLayerIrapAlignFlag ); 1236 1333 for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1237 1334 { … … 1256 1353 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1257 1354 vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false); 1355 #endif 1356 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1357 vps->setHigherLayerIrapSkipFlag(m_skipPictureAtArcSwitch); 1258 1358 #endif 1259 1359 #if !VPS_EXTN_OFFSET_CALC … … 1266 1366 #if O0215_PHASE_ALIGNMENT 1267 1367 vps->setPhaseAlignFlag( m_phaseAlignFlag ); 1368 #endif 1369 1370 #if O0153_ALT_OUTPUT_LAYER_FLAG 1371 vps->setAltOuputLayerFlag( m_altOutputLayerFlag ); 1268 1372 #endif 1269 1373 … … 2022 2126 case NAL_UNIT_CODED_SLICE_TRAIL_R: 2023 2127 case NAL_UNIT_CODED_SLICE_TRAIL_N: 2024 case NAL_UNIT_CODED_SLICE_T LA_R:2128 case NAL_UNIT_CODED_SLICE_TSA_R: 2025 2129 case NAL_UNIT_CODED_SLICE_TSA_N: 2026 2130 case NAL_UNIT_CODED_SLICE_STSA_R:
Note: See TracChangeset for help on using the changeset viewer.