Changeset 532 in SHVCSoftware for branches/SHM-4.1-dev/source/App
- Timestamp:
- 2 Jan 2014, 07:21:30 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/App
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/App/TAppDecoder/TAppDecTop.cpp
r531 r532 145 145 // main decoder loop 146 146 Bool openedReconFile[MAX_LAYERS]; // reconstruction file not yet opened. (must be performed after SPS is seen) 147 Bool loopFiltered[MAX_LAYERS]; 148 memset( loopFiltered, false, sizeof( loopFiltered ) ); 149 147 150 for(UInt layer=0; layer<=m_tgtLayerId; layer++) 148 151 { … … 223 226 } 224 227 } 225 if (bNewPicture || !bitstreamFile) 228 229 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 226 230 { 227 231 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 230 234 g_bitDepthC = g_bitDepthCLayer[curLayerId]; 231 235 #endif 232 m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic); 236 if (!loopFiltered[curLayerId] || bitstreamFile) 237 { 238 m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic); 239 } 240 loopFiltered[curLayerId] = (nalu.m_nalUnitType == NAL_UNIT_EOS); 233 241 #if EARLY_REF_PIC_MARKING 234 242 m_acTDecTop[curLayerId].earlyPicMarking(m_iMaxTemporalLayer, m_targetDecLayerIdSet); … … 256 264 xFlushOutput( pcListPic, curLayerId ); 257 265 } 266 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 267 { 268 xFlushOutput( pcListPic, curLayerId ); 269 } 258 270 // write reconstruction to file 259 271 if(bNewPicture) … … 316 328 // main decoder loop 317 329 Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen) 330 Bool loopFiltered = false; 318 331 319 332 #if SYNTAX_OUTPUT … … 384 397 } 385 398 } 386 if (bNewPicture || !bitstreamFile) 387 { 388 m_cTDecTop.executeLoopFilters(poc, pcListPic); 399 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 400 { 401 if (!loopFiltered || bitstreamFile) 402 { 403 m_cTDecTop.executeLoopFilters(poc, pcListPic); 404 } 405 loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS); 389 406 } 390 407 … … 408 425 xFlushOutput( pcListPic ); 409 426 } 427 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 428 { 429 xFlushOutput( pcListPic ); 430 } 410 431 // write reconstruction to file 411 432 if(bNewPicture) … … 506 527 507 528 /** \param pcListPic list of pictures to be written to file 508 \todo DYN_REF_FREE should be revised509 */529 \todo DYN_REF_FREE should be revised 530 */ 510 531 #if SVC_EXTENSION 511 532 Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt layerId, UInt tId ) -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r531 r532 791 791 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 792 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 793 794 ("SAOLcuBasedOptimization", m_saoLcuBasedOptimization, true, "0: SAO picture-based optimization, 1: SAO LCU-based optimization ") 795 #endif 794 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") 795 797 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" … … 845 847 ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC") 846 848 #endif 847 #if RATE_CONTROL_LAMBDA_DOMAIN848 849 #if RC_SHVC_HARMONIZATION 849 850 ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d") … … 857 858 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 858 859 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bitrate" ) 859 #if M0036_RC_IMPROVEMENT860 860 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 861 #else862 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" )863 #endif864 861 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: LCU level RC; false: picture level RC" ) 865 862 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use LCU level separate R-lambda model" ) 866 863 ( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" ) 867 864 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 868 #endif869 #else870 ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")871 ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate")872 ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit")873 865 #endif 874 866 … … 2200 2192 } 2201 2193 2202 #if RATE_CONTROL_LAMBDA_DOMAIN2203 2194 #if RC_SHVC_HARMONIZATION 2204 2195 for ( Int layer=0; layer<m_numLayers; layer++ ) … … 2229 2220 } 2230 2221 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 2231 }2232 #endif2233 #else2234 if(m_enableRateCtrl)2235 {2236 Int numLCUInWidth = (m_iSourceWidth / m_uiMaxCUWidth) + (( m_iSourceWidth % m_uiMaxCUWidth ) ? 1 : 0);2237 Int numLCUInHeight = (m_iSourceHeight / m_uiMaxCUHeight)+ (( m_iSourceHeight % m_uiMaxCUHeight) ? 1 : 0);2238 Int numLCUInPic = numLCUInWidth * numLCUInHeight;2239 2240 xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" );2241 2242 m_iMaxDeltaQP = MAX_DELTA_QP;2243 m_iMaxCuDQPDepth = MAX_CUDQP_DEPTH;2244 2222 } 2245 2223 #endif … … 2521 2499 printf("Cross-layer sample alignment : %d\n", m_phaseAlignFlag); 2522 2500 #endif 2523 #if RATE_CONTROL_LAMBDA_DOMAIN2524 2501 #if !RC_SHVC_HARMONIZATION 2525 2502 printf("RateControl : %d\n", m_RCEnableRateControl ); … … 2534 2511 } 2535 2512 #endif 2536 #else 2537 printf("RateControl : %d\n", m_enableRateCtrl); 2538 if(m_enableRateCtrl) 2539 { 2540 printf("TargetBitrate : %d\n", m_targetBitrate); 2541 printf("NumLCUInUnit : %d\n", m_numLCUInUnit); 2542 } 2543 #endif 2513 2544 2514 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 2545 2515 printf("\n"); … … 2582 2552 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 2583 2553 #endif 2554 #if !HM_CLEANUP_SAO 2584 2555 printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0)); 2585 2556 #endif 2586 2557 printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 ); 2587 2558 printf("WPP:%d ", (Int)m_useWeightedPred); -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r531 r532 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 -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r531 r532 470 470 471 471 m_acTEncTop[layer].setSaoLcuBoundary (m_saoLcuBoundary); 472 #if !HM_CLEANUP_SAO 472 473 m_acTEncTop[layer].setSaoLcuBasedOptimization (m_saoLcuBasedOptimization); 474 #endif 473 475 m_acTEncTop[layer].setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 474 476 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); … … 546 548 m_acTEncTop[layer].setScalingListFile ( m_scalingListFile ); 547 549 m_acTEncTop[layer].setSignHideFlag(m_signHideFlag); 548 #if RATE_CONTROL_LAMBDA_DOMAIN549 550 #if RC_SHVC_HARMONIZATION 550 551 m_acTEncTop[layer].setUseRateCtrl (m_acLayerCfg[layer].getRCEnableRateControl()); … … 563 564 m_acTEncTop[layer].setInitialQP ( m_RCInitialQP ); 564 565 m_acTEncTop[layer].setForceIntraQP ( m_RCForceIntraQP ); 565 #endif566 #else567 m_acTEncTop[layer].setUseRateCtrl ( m_enableRateCtrl);568 m_acTEncTop[layer].setTargetBitrate ( m_targetBitrate);569 m_acTEncTop[layer].setNumLCUInUnit ( m_numLCUInUnit);570 566 #endif 571 567 m_acTEncTop[layer].setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); … … 788 784 789 785 m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary); 786 #if !HM_CLEANUP_SAO 790 787 m_cTEncTop.setSaoLcuBasedOptimization (m_saoLcuBasedOptimization); 788 #endif 791 789 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 792 790 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); … … 856 854 m_cTEncTop.setScalingListFile ( m_scalingListFile ); 857 855 m_cTEncTop.setSignHideFlag(m_signHideFlag); 858 #if RATE_CONTROL_LAMBDA_DOMAIN859 856 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); 860 857 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); … … 864 861 m_cTEncTop.setInitialQP ( m_RCInitialQP ); 865 862 m_cTEncTop.setForceIntraQP ( m_RCForceIntraQP ); 866 #else867 m_cTEncTop.setUseRateCtrl ( m_enableRateCtrl);868 m_cTEncTop.setTargetBitrate ( m_targetBitrate);869 m_cTEncTop.setNumLCUInUnit ( m_numLCUInUnit);870 #endif871 863 m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); 872 864 m_cTEncTop.setCUTransquantBypassFlagValue(m_CUTransquantBypassFlagValue); … … 2131 2123 case NAL_UNIT_CODED_SLICE_TRAIL_R: 2132 2124 case NAL_UNIT_CODED_SLICE_TRAIL_N: 2133 case NAL_UNIT_CODED_SLICE_T LA_R:2125 case NAL_UNIT_CODED_SLICE_TSA_R: 2134 2126 case NAL_UNIT_CODED_SLICE_TSA_N: 2135 2127 case NAL_UNIT_CODED_SLICE_STSA_R:
Note: See TracChangeset for help on using the changeset viewer.