Changeset 310 in SHVCSoftware for trunk/source/App
- Timestamp:
- 22 Jul 2013, 21:40:00 (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-2.1-dev (added) merged: 193-196,202,204,210-212,214-216,224,226-228,233-251,258,282-309
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
-
trunk/source/App/TAppDecoder/decmain.cpp
r191 r310 56 56 // print information 57 57 fprintf( stdout, "\n" ); 58 #if SVC_EXTENSION 58 59 fprintf( stdout, "SHM software: Decoder Version [%s]", NV_VERSION ); 60 #else 61 fprintf( stdout, "HM software: Decoder Version [%s]", NV_VERSION ); 62 #endif 59 63 fprintf( stdout, NVM_ONOS ); 60 64 fprintf( stdout, NVM_COMPILEDBY ); -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r191 r310 79 79 { 80 80 m_acLayerCfg[layer].setAppEncCfg(this); 81 } 81 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 82 m_ilSampleOnlyPred[layer] = 0; 83 #endif 84 } 85 memset( m_scalabilityMask, 0, sizeof(m_scalabilityMask) ); 82 86 } 83 87 #else … … 92 96 { 93 97 m_aidQP = NULL; 94 #if J0149_TONE_MAPPING_SEI95 98 m_startOfCodedInterval = NULL; 96 99 m_codedPivotValue = NULL; 97 100 m_targetPivotValue = NULL; 98 #endif99 101 } 100 102 #endif … … 110 112 delete[] m_aidQP; 111 113 } 112 #if J0149_TONE_MAPPING_SEI113 114 if ( m_startOfCodedInterval ) 114 115 { … … 126 127 m_targetPivotValue = NULL; 127 128 } 128 #endif129 129 free(m_pchInputFile); 130 130 #endif … … 145 145 { 146 146 #if VPS_EXTN_DIRECT_REF_LAYERS 147 #if M0457_PREDICTION_INDICATIONS 147 148 for(Int layer = 0; layer < MAX_LAYERS; layer++) 148 149 { 150 if( m_acLayerCfg[layer].m_numSamplePredRefLayers > 0 ) 151 { 152 delete [] m_acLayerCfg[layer].m_samplePredRefLayerIds; 153 } 154 } 155 for(Int layer = 0; layer < MAX_LAYERS; layer++) 156 { 157 if( m_acLayerCfg[layer].m_numMotionPredRefLayers > 0 ) 158 { 159 delete [] m_acLayerCfg[layer].m_motionPredRefLayerIds; 160 } 161 } 162 #else 163 for(Int layer = 0; layer < MAX_LAYERS; layer++) 164 { 149 165 if( m_acLayerCfg[layer].m_numDirectRefLayers > 0 ) 150 166 { 151 167 delete [] m_acLayerCfg[layer].m_refLayerIds; 168 } 169 } 170 #endif 171 for(Int layer = 0; layer < MAX_LAYERS; layer++) 172 { 173 if( m_acLayerCfg[layer].m_numActiveRefLayers > 0 ) 174 { 175 delete [] m_acLayerCfg[layer].m_predLayerIds; 152 176 } 153 177 } … … 298 322 } 299 323 300 #if SIGNAL_BITRATE_PICRATE_IN_VPS301 Void readBoolString(const string inpString, const Int numEntries, Bool* &memberArray, const char *elementName);302 Void readIntString(const string inpString, const Int numEntries, Int* &memberArray, const char *elementName);303 #endif304 324 // ==================================================================================================================== 305 325 // Public member functions … … 327 347 Int* cfg_conformanceMode [MAX_LAYERS]; 328 348 #if VPS_EXTN_DIRECT_REF_LAYERS 349 #if M0457_PREDICTION_INDICATIONS 350 Int* cfg_numSamplePredRefLayers [MAX_LAYERS]; 351 string cfg_samplePredRefLayerIds [MAX_LAYERS]; 352 string* cfg_samplePredRefLayerIdsPtr[MAX_LAYERS]; 353 Int* cfg_numMotionPredRefLayers [MAX_LAYERS]; 354 string cfg_motionPredRefLayerIds [MAX_LAYERS]; 355 string* cfg_motionPredRefLayerIdsPtr[MAX_LAYERS]; 356 #else 329 357 Int* cfg_numDirectRefLayers [MAX_LAYERS]; 330 string cfg_refLayerIds [MAX_LAYERS]; 331 string* cfg_refLayerIdsPtr [MAX_LAYERS]; 358 string cfg_refLayerIds [MAX_LAYERS]; 359 string* cfg_refLayerIdsPtr [MAX_LAYERS]; 360 #endif 361 Int* cfg_numActiveRefLayers [MAX_LAYERS]; 362 string cfg_predLayerIds [MAX_LAYERS]; 363 string* cfg_predLayerIdsPtr [MAX_LAYERS]; 332 364 #endif 333 365 #if SCALED_REF_LAYER_OFFSETS 334 Int* cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 335 Int* cfg_scaledRefLayerTopOffset [MAX_LAYERS]; 336 Int* cfg_scaledRefLayerRightOffset [MAX_LAYERS]; 337 Int* cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 366 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 367 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; 368 string cfg_scaledRefLayerRightOffset [MAX_LAYERS]; 369 string cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 370 Int* cfg_numScaledRefLayerOffsets[MAX_LAYERS]; 371 372 string* cfg_scaledRefLayerLeftOffsetPtr [MAX_LAYERS]; 373 string* cfg_scaledRefLayerTopOffsetPtr [MAX_LAYERS]; 374 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 375 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 376 #endif 377 #if RC_SHVC_HARMONIZATION 378 Bool* cfg_RCEnableRateControl [MAX_LAYERS]; 379 Int* cfg_RCTargetBitRate [MAX_LAYERS]; 380 Bool* cfg_RCKeepHierarchicalBit[MAX_LAYERS]; 381 Bool* cfg_RCLCULevelRC [MAX_LAYERS]; 382 Bool* cfg_RCUseLCUSeparateModel[MAX_LAYERS]; 383 Int* cfg_RCInitialQP [MAX_LAYERS]; 384 Bool* cfg_RCForceIntraQP [MAX_LAYERS]; 338 385 #endif 339 386 for(UInt layer = 0; layer < MAX_LAYERS; layer++) … … 348 395 cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode; 349 396 #if VPS_EXTN_DIRECT_REF_LAYERS 397 #if M0457_PREDICTION_INDICATIONS 398 cfg_numSamplePredRefLayers [layer] = &m_acLayerCfg[layer].m_numSamplePredRefLayers; 399 cfg_samplePredRefLayerIdsPtr[layer] = &cfg_samplePredRefLayerIds[layer]; 400 cfg_numMotionPredRefLayers [layer] = &m_acLayerCfg[layer].m_numMotionPredRefLayers; 401 cfg_motionPredRefLayerIdsPtr[layer] = &cfg_motionPredRefLayerIds[layer]; 402 #else 350 403 cfg_numDirectRefLayers [layer] = &m_acLayerCfg[layer].m_numDirectRefLayers; 351 404 cfg_refLayerIdsPtr [layer] = &cfg_refLayerIds[layer]; 352 405 #endif 406 cfg_numActiveRefLayers [layer] = &m_acLayerCfg[layer].m_numActiveRefLayers; 407 cfg_predLayerIdsPtr [layer] = &cfg_predLayerIds[layer]; 408 #endif 353 409 #if SCALED_REF_LAYER_OFFSETS 354 cfg_scaledRefLayerLeftOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerLeftOffset; 355 cfg_scaledRefLayerTopOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerTopOffset; 356 cfg_scaledRefLayerRightOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerRightOffset; 357 cfg_scaledRefLayerBottomOffset[layer] = &m_acLayerCfg[layer].m_scaledRefLayerBottomOffset; 410 cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets; 411 for(Int i = 0; i < MAX_LAYERS; i++) 412 { 413 cfg_scaledRefLayerLeftOffsetPtr [layer] = &cfg_scaledRefLayerLeftOffset[layer] ; 414 cfg_scaledRefLayerTopOffsetPtr [layer] = &cfg_scaledRefLayerTopOffset[layer] ; 415 cfg_scaledRefLayerRightOffsetPtr [layer] = &cfg_scaledRefLayerRightOffset[layer] ; 416 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 417 } 418 #endif 419 #if RC_SHVC_HARMONIZATION 420 cfg_RCEnableRateControl[layer] = &m_acLayerCfg[layer].m_RCEnableRateControl; 421 cfg_RCTargetBitRate[layer] = &m_acLayerCfg[layer].m_RCTargetBitrate; 422 cfg_RCKeepHierarchicalBit[layer] = &m_acLayerCfg[layer].m_RCKeepHierarchicalBit; 423 cfg_RCLCULevelRC[layer] = &m_acLayerCfg[layer].m_RCLCULevelRC; 424 cfg_RCUseLCUSeparateModel[layer] = &m_acLayerCfg[layer].m_RCUseLCUSeparateModel; 425 cfg_RCInitialQP[layer] = &m_acLayerCfg[layer].m_RCInitialQP; 426 cfg_RCForceIntraQP[layer] = &m_acLayerCfg[layer].m_RCForceIntraQP; 358 427 #endif 359 428 } … … 373 442 string cfg_RowHeight; 374 443 string cfg_ScalingListFile; 375 #if J0149_TONE_MAPPING_SEI376 444 string cfg_startOfCodedInterval; 377 445 string cfg_codedPivotValue; 378 446 string cfg_targetPivotValue; 379 #endif380 #if SIGNAL_BITRATE_PICRATE_IN_VPS381 string cfg_bitRateInfoPresentFlag;382 string cfg_picRateInfoPresentFlag;383 string cfg_avgBitRate;384 string cfg_maxBitRate;385 string cfg_avgPicRate;386 string cfg_constantPicRateIdc;387 #endif388 447 po::Options opts; 389 448 opts.addOptions() … … 401 460 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, ( double )1.0, MAX_TLAYER, "Lambda modifier for temporal layer %d") 402 461 #if VPS_EXTN_DIRECT_REF_LAYERS 462 #if M0457_PREDICTION_INDICATIONS 463 ("NumSamplePredRefLayers%d",cfg_numSamplePredRefLayers, -1, MAX_LAYERS, "Number of sample prediction reference layers") 464 ("SamplePredRefLayerIds%d", cfg_samplePredRefLayerIdsPtr, string(""), MAX_LAYERS, "sample pred reference layer IDs") 465 ("NumMotionPredRefLayers%d",cfg_numMotionPredRefLayers, -1, MAX_LAYERS, "Number of motion prediction reference layers") 466 ("MotionPredRefLayerIds%d", cfg_motionPredRefLayerIdsPtr, string(""), MAX_LAYERS, "motion pred reference layer IDs") 467 #else 403 468 ("NumDirectRefLayers%d", cfg_numDirectRefLayers, -1, MAX_LAYERS, "Number of direct reference layers") 404 469 ("RefLayerIds%d", cfg_refLayerIdsPtr, string(""), MAX_LAYERS, "direct reference layer IDs") 405 470 #endif 471 ("NumActiveRefLayers%d", cfg_numActiveRefLayers, -1, MAX_LAYERS, "Number of active reference layers") 472 ("PredLayerIds%d", cfg_predLayerIdsPtr, string(""), MAX_LAYERS, "inter-layer prediction layer IDs") 473 #endif 406 474 ("NumLayers", m_numLayers, 1, "Number of layers to code") 407 475 ("ConformanceMode%d", cfg_conformanceMode,0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 408 409 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 410 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file") 411 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)") 412 ("InternalBitDepth", m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)" 476 ("ScalabilityMask0", m_scalabilityMask[0], 0, "scalability_mask[0] (multiview)") 477 ("ScalabilityMask1", m_scalabilityMask[1], 1, "scalability_mask[1] (scalable)" ) 478 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 479 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file") 480 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)") 481 ("InternalBitDepth", m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)" 413 482 "If different to InputBitDepth, source data will be converted") 414 ("InputBitDepthC", m_inputBitDepthC, 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")415 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")416 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")483 ("InputBitDepthC", m_inputBitDepthC, 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)") 484 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 485 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 417 486 #if SCALED_REF_LAYER_OFFSETS 418 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffset, 0, MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 487 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 488 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 419 489 " top-left luma sample of the EL picture, in units of two luma samples") 420 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffset , 0, MAX_LAYERS, "Vertical offset of top-left luma sample of scaled base layer picture with respect to"490 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of top-left luma sample of scaled base layer picture with respect to" 421 491 " top-left luma sample of the EL picture, in units of two luma samples") 422 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffset , 0, MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to"492 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to" 423 493 " bottom-right luma sample of the EL picture, in units of two luma samples") 424 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffset ,0, MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"494 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 425 495 " bottom-right luma sample of the EL picture, in units of two luma samples") 426 496 #endif … … 435 505 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") 436 506 #endif 507 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 508 ("IlSampleOnlyPred%d", m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices") 509 #endif 437 510 #else 438 511 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") … … 465 538 ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level") 466 539 467 #if L0046_CONSTRAINT_FLAGS468 540 ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive") 469 541 ("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced") 470 542 ("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") 471 543 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 472 #endif473 544 474 545 // Unit definition parameters … … 494 565 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 495 566 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 496 #if !L0034_COMBINED_LIST_CLEANUP497 ("ListCombination,-lc", m_bUseLComb, true, "Combined reference list for uni-prediction estimation in B-slices")498 #endif499 567 // motion options 500 568 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") … … 542 610 ("RDOQ", m_useRDOQ, true ) 543 611 ("RDOQTS", m_useRDOQTS, true ) 544 #if L0232_RD_PENALTY545 612 ("RDpenalty", m_rdPenalty, 0, "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disbaled 1:RD-penalty 2:maximum RD-penalty") 546 #endif547 613 // Entropy coding parameters 548 614 ("SBACRD", m_bUseSBACRD, true, "SBAC based RD estimation") … … 554 620 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 555 621 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false ) 556 #if L0386_DB_METRIC557 622 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false ) 558 #endif559 623 560 624 // Coding tools … … 616 680 ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting") 617 681 ("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting") 682 #if FAST_INTRA_SHVC 683 ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC") 684 #endif 618 685 #if RATE_CONTROL_LAMBDA_DOMAIN 686 #if RC_SHVC_HARMONIZATION 687 ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d") 688 ("TargetBitrate%d", cfg_RCTargetBitRate, 0, MAX_LAYERS, "Rate control: target bitrate for layer %d") 689 ("KeepHierarchicalBit%d", cfg_RCKeepHierarchicalBit, false, MAX_LAYERS, "Rate control: keep hierarchical bit allocation for layer %d") 690 ("LCULevelRateControl%d", cfg_RCLCULevelRC, true, MAX_LAYERS, "Rate control: LCU level RC") 691 ("RCLCUSeparateModel%d", cfg_RCUseLCUSeparateModel, true, MAX_LAYERS, "Rate control: Use LCU level separate R-lambda model") 692 ("InitialQP%d", cfg_RCInitialQP, 0, MAX_LAYERS, "Rate control: initial QP") 693 ("RCForceIntraQP%d", cfg_RCForceIntraQP, false, MAX_LAYERS, "Rate control: force intra QP to be equal to initial QP") 694 #else 619 695 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 620 696 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bitrate" ) 697 #if M0036_RC_IMPROVEMENT 698 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 699 #else 621 700 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" ) 701 #endif 622 702 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: LCU level RC; false: picture level RC" ) 623 703 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use LCU level separate R-lambda model" ) 624 704 ( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" ) 625 705 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 706 #endif 626 707 #else 627 708 ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off") … … 671 752 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 672 753 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 673 #if J0149_TONE_MAPPING_SEI674 754 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 675 755 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") … … 702 782 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 703 783 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 704 #endif705 784 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 706 785 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" … … 723 802 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 724 803 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 725 #if L0208_SOP_DESCRIPTION_SEI 804 #if M0043_LAYERS_PRESENT_SEI 805 ("SEILayersPresent", m_layersPresentSEIEnabled, 0, "Control generation of layers present SEI message") 806 #endif 726 807 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 727 #endif728 #if K0180_SCALABLE_NESTING_SEI729 808 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 730 #endif 731 #if SIGNAL_BITRATE_PICRATE_IN_VPS 732 ("BitRatePicRateMaxTLayers", m_bitRatePicRateMaxTLayers, 0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file") 733 ("BitRateInfoPresent", cfg_bitRateInfoPresentFlag, string(""), "Control signalling of bit rate information of avg. bit rate and max. bit rate in VPS\n" 734 "\t0: Do not sent bit rate info\n" 735 "\tN (N > 0): Send bit rate info for N sub-layers. N should equal maxTempLayers.") 736 ("PicRateInfoPresent", cfg_picRateInfoPresentFlag, string(""), "Control signalling of picture rate information of avg. bit rate and max. bit rate in VPS\n" 737 "\t0: Do not sent picture rate info\n" 738 "\tN (N > 0): Send picture rate info for N sub-layers. N should equal maxTempLayers.") 739 ("AvgBitRate", cfg_avgBitRate, string(""), "List of avg. bit rates for the different sub-layers; include non-negative number even if corresponding flag is 0") 740 ("MaxBitRate", cfg_maxBitRate, string(""), "List of max. bit rates for the different sub-layers; include non-negative number even if corresponding flag is 0") 741 ("AvgPicRate", cfg_avgPicRate, string(""), "List of avg. picture rates for the different sub-layers; include non-negative number even if corresponding flag is 0") 742 ("ConstantPicRateIdc", cfg_constantPicRateIdc, string(""), "List of constant picture rate IDCs; include non-negative number even if corresponding flag is 0") 809 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 810 ("AdaptiveResolutionChange", m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)") 743 811 #endif 744 812 ; … … 843 911 m_pRowHeight = NULL; 844 912 } 913 #if SCALED_REF_LAYER_OFFSETS 914 for(Int layer = 0; layer < MAX_LAYERS; layer++) 915 { 916 // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified 917 if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets) 918 { 919 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") || 920 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") || 921 strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "") || 922 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") 923 ); 924 } 925 926 Int *tempArray = NULL; // Contain the value 927 // Left offset // 928 if(strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "")) 929 { 930 cfgStringToArray( &tempArray, cfg_scaledRefLayerLeftOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "LeftOffset"); 931 if(tempArray) 932 { 933 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 934 { 935 m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i] = tempArray[i]; 936 } 937 delete [] tempArray; tempArray = NULL; 938 } 939 } 940 941 // Top offset // 942 if(strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "")) 943 { 944 cfgStringToArray( &tempArray, cfg_scaledRefLayerTopOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "TopOffset"); 945 if(tempArray) 946 { 947 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 948 { 949 m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i] = tempArray[i]; 950 } 951 delete [] tempArray; tempArray = NULL; 952 } 953 } 954 955 // Right offset // 956 if(strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "")) 957 { 958 cfgStringToArray( &tempArray, cfg_scaledRefLayerRightOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "RightOffset"); 959 if(tempArray) 960 { 961 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 962 { 963 m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i] = tempArray[i]; 964 } 965 delete [] tempArray; tempArray = NULL; 966 } 967 } 968 969 // Bottom offset // 970 if(strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(), "")) 971 { 972 cfgStringToArray( &tempArray, cfg_scaledRefLayerBottomOffset[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "BottomOffset"); 973 if(tempArray) 974 { 975 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 976 { 977 m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i] = tempArray[i]; 978 } 979 delete [] tempArray; tempArray = NULL; 980 } 981 } 982 } 983 #endif 845 984 #if VPS_EXTN_DIRECT_REF_LAYERS 985 #if M0457_PREDICTION_INDICATIONS 986 for(Int layer = 0; layer < MAX_LAYERS; layer++) 987 { 988 Char* pSamplePredRefLayerIds = cfg_samplePredRefLayerIds[layer].empty() ? NULL: strdup(cfg_samplePredRefLayerIds[layer].c_str()); 989 if( m_acLayerCfg[layer].m_numSamplePredRefLayers > 0 ) 990 { 991 char *samplePredRefLayerId; 992 int i=0; 993 m_acLayerCfg[layer].m_samplePredRefLayerIds = new Int[m_acLayerCfg[layer].m_numSamplePredRefLayers]; 994 samplePredRefLayerId = strtok(pSamplePredRefLayerIds, " ,-"); 995 while(samplePredRefLayerId != NULL) 996 { 997 if( i >= m_acLayerCfg[layer].m_numSamplePredRefLayers ) 998 { 999 printf( "NumSamplePredRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1000 exit( EXIT_FAILURE ); 1001 } 1002 *( m_acLayerCfg[layer].m_samplePredRefLayerIds + i ) = atoi( samplePredRefLayerId ); 1003 samplePredRefLayerId = strtok(NULL, " ,-"); 1004 i++; 1005 } 1006 if( i < m_acLayerCfg[layer].m_numSamplePredRefLayers ) 1007 { 1008 printf( "NumSamplePredRefLayers: The width of some columns is not defined.\n" ); 1009 exit( EXIT_FAILURE ); 1010 } 1011 } 1012 else 1013 { 1014 m_acLayerCfg[layer].m_samplePredRefLayerIds = NULL; 1015 } 1016 } 1017 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1018 { 1019 Char* pMotionPredRefLayerIds = cfg_motionPredRefLayerIds[layer].empty() ? NULL: strdup(cfg_motionPredRefLayerIds[layer].c_str()); 1020 if( m_acLayerCfg[layer].m_numMotionPredRefLayers > 0 ) 1021 { 1022 char *motionPredRefLayerId; 1023 int i=0; 1024 m_acLayerCfg[layer].m_motionPredRefLayerIds = new Int[m_acLayerCfg[layer].m_numMotionPredRefLayers]; 1025 motionPredRefLayerId = strtok(pMotionPredRefLayerIds, " ,-"); 1026 while(motionPredRefLayerId != NULL) 1027 { 1028 if( i >= m_acLayerCfg[layer].m_numMotionPredRefLayers ) 1029 { 1030 printf( "NumMotionPredRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1031 exit( EXIT_FAILURE ); 1032 } 1033 *( m_acLayerCfg[layer].m_motionPredRefLayerIds + i ) = atoi( motionPredRefLayerId ); 1034 motionPredRefLayerId = strtok(NULL, " ,-"); 1035 i++; 1036 } 1037 if( i < m_acLayerCfg[layer].m_numMotionPredRefLayers ) 1038 { 1039 printf( "NumMotionPredRefLayers: The width of some columns is not defined.\n" ); 1040 exit( EXIT_FAILURE ); 1041 } 1042 } 1043 else 1044 { 1045 m_acLayerCfg[layer].m_motionPredRefLayerIds = NULL; 1046 } 1047 } 1048 #else 846 1049 for(Int layer = 0; layer < MAX_LAYERS; layer++) 847 1050 { … … 857 1060 if( i >= m_acLayerCfg[layer].m_numDirectRefLayers ) 858 1061 { 859 printf( " The number of columns whose width are defined is larger than the allowed number of columns.\n" );1062 printf( "NumDirectRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 860 1063 exit( EXIT_FAILURE ); 861 1064 } … … 866 1069 if( i < m_acLayerCfg[layer].m_numDirectRefLayers ) 867 1070 { 868 printf( " The width of some columns is not defined.\n" );1071 printf( "NumDirectRefLayers: The width of some columns is not defined.\n" ); 869 1072 exit( EXIT_FAILURE ); 870 1073 } … … 876 1079 } 877 1080 #endif 878 #if SIGNAL_BITRATE_PICRATE_IN_VPS 879 readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" ); 880 readIntString (cfg_avgBitRate, m_bitRatePicRateMaxTLayers, m_avgBitRate, "avg. bit rate" ); 881 readIntString (cfg_maxBitRate, m_bitRatePicRateMaxTLayers, m_maxBitRate, "max. bit rate" ); 882 readBoolString(cfg_picRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_picRateInfoPresentFlag, "bit rate info. present flag" ); 883 readIntString (cfg_avgPicRate, m_bitRatePicRateMaxTLayers, m_avgPicRate, "avg. pic rate" ); 884 readIntString (cfg_constantPicRateIdc, m_bitRatePicRateMaxTLayers, m_constantPicRateIdc, "constant pic rate Idc" ); 1081 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1082 { 1083 Char* pPredLayerIds = cfg_predLayerIds[layer].empty() ? NULL: strdup(cfg_predLayerIds[layer].c_str()); 1084 if( m_acLayerCfg[layer].m_numActiveRefLayers > 0 ) 1085 { 1086 char *refLayerId; 1087 int i=0; 1088 m_acLayerCfg[layer].m_predLayerIds = new Int[m_acLayerCfg[layer].m_numActiveRefLayers]; 1089 refLayerId = strtok(pPredLayerIds, " ,-"); 1090 while(refLayerId != NULL) 1091 { 1092 if( i >= m_acLayerCfg[layer].m_numActiveRefLayers ) 1093 { 1094 printf( "NumActiveRefLayers: The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1095 exit( EXIT_FAILURE ); 1096 } 1097 *( m_acLayerCfg[layer].m_predLayerIds + i ) = atoi( refLayerId ); 1098 refLayerId = strtok(NULL, " ,-"); 1099 i++; 1100 } 1101 if( i < m_acLayerCfg[layer].m_numActiveRefLayers ) 1102 { 1103 printf( "NumActiveRefLayers: The width of some columns is not defined.\n" ); 1104 exit( EXIT_FAILURE ); 1105 } 1106 } 1107 else 1108 { 1109 m_acLayerCfg[layer].m_predLayerIds = NULL; 1110 } 1111 } 885 1112 #endif 886 1113 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); … … 992 1219 m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 993 1220 #endif 994 #if J0149_TONE_MAPPING_SEI995 1221 if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag ) 996 1222 { … … 1051 1277 } 1052 1278 } 1053 #endif1054 1279 // check validity of input parameters 1055 1280 xCheckParameter(); … … 1063 1288 return true; 1064 1289 } 1065 #if SIGNAL_BITRATE_PICRATE_IN_VPS1066 Void readBoolString(const string inpString, const Int numEntries, Bool* &memberArray, const char *elementName)1067 {1068 Char* inpArray = inpString.empty() ? NULL : strdup(inpString.c_str());1069 Int i = 0;1070 if(numEntries)1071 {1072 Char* tempArray = strtok(inpArray, " ,-");1073 memberArray = new Bool[numEntries];1074 while( tempArray != NULL )1075 {1076 if( i >= numEntries )1077 {1078 printf( "The number of %s defined is larger than the allowed number\n", elementName );1079 exit( EXIT_FAILURE );1080 }1081 assert( (atoi(tempArray) == 0) || (atoi(tempArray) == 1) );1082 *( memberArray + i ) = atoi(tempArray);1083 tempArray = strtok(NULL, " ,-");1084 i++;1085 }1086 if( i < numEntries )1087 {1088 printf( "Some %s are not defined\n", elementName );1089 exit( EXIT_FAILURE );1090 }1091 }1092 else1093 {1094 memberArray = NULL;1095 }1096 }1097 1098 Void readIntString(const string inpString, const Int numEntries, Int* &memberArray, const char *elementName)1099 {1100 Char* inpArray = inpString.empty() ? NULL : strdup(inpString.c_str());1101 Int i = 0;1102 if(numEntries)1103 {1104 Char* tempArray = strtok(inpArray, " ,-");1105 memberArray = new Int[numEntries];1106 while( tempArray != NULL )1107 {1108 if( i >= numEntries )1109 {1110 printf( "The number of %s defined is larger than the allowed number\n", elementName );1111 exit( EXIT_FAILURE );1112 }1113 *( memberArray + i ) = atoi(tempArray);1114 tempArray = strtok(NULL, " ,-");1115 i++;1116 }1117 if( i < numEntries )1118 {1119 printf( "Some %s are not defined\n", elementName );1120 exit( EXIT_FAILURE );1121 }1122 }1123 else1124 {1125 memberArray = NULL;1126 }1127 }1128 #endif1129 1290 // ==================================================================================================================== 1130 1291 // Private member functions … … 1142 1303 fprintf(stderr, "** decoder requires this option to be enabled. **\n"); 1143 1304 fprintf(stderr, "******************************************************************\n"); 1305 } 1306 if( m_profile==Profile::NONE ) 1307 { 1308 fprintf(stderr, "***************************************************************************\n"); 1309 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n"); 1310 fprintf(stderr, "***************************************************************************\n"); 1311 } 1312 if( m_level==Level::NONE ) 1313 { 1314 fprintf(stderr, "***************************************************************************\n"); 1315 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set! **\n"); 1316 fprintf(stderr, "***************************************************************************\n"); 1144 1317 } 1145 1318 … … 1162 1335 xConfirmPara( m_iQP < -6 * (m_internalBitDepthY - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 1163 1336 #endif 1164 xConfirmPara( m_loopFilterBetaOffsetDiv2 < - 13 || m_loopFilterBetaOffsetDiv2 > 13, "Loop Filter Beta Offset div. 2 exceeds supported range (-13 to 13)");1165 xConfirmPara( m_loopFilterTcOffsetDiv2 < - 13 || m_loopFilterTcOffsetDiv2 > 13, "Loop Filter Tc Offset div. 2 exceeds supported range (-13 to 13)");1337 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)"); 1338 xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6, "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)"); 1166 1339 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" ); 1167 1340 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); … … 1324 1497 } 1325 1498 } 1326 #endif 1327 1328 #if SVC_EXTENSION 1499 1329 1500 // verify layer configuration parameters 1330 1501 for(UInt layer=0; layer<m_numLayers; layer++) … … 1551 1722 { 1552 1723 m_numReorderPics[i] = 0; 1553 #if L0323_DPB1554 1724 m_maxDecPicBuffering[i] = 1; 1555 #else1556 m_maxDecPicBuffering[i] = 0;1557 #endif1558 1725 } 1559 1726 for(Int i=0; i<m_iGOPSize; i++) 1560 1727 { 1561 #if L0323_DPB1562 1728 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1563 #else 1564 if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1565 #endif 1566 { 1567 #if L0323_DPB 1729 { 1568 1730 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 1569 #else 1570 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics; 1571 #endif 1572 } 1731 } 1732 1733 #if SVC_EXTENSION 1734 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] += 1; // it should be updated if more than 1 resampling picture is used 1735 #endif 1736 1573 1737 Int highestDecodingNumberWithLowerPOC = 0; 1574 1738 for(Int j=0; j<m_iGOPSize; j++) … … 1600 1764 m_numReorderPics[i+1] = m_numReorderPics[i]; 1601 1765 } 1602 #if L0323_DPB1603 1766 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1604 1767 if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1) … … 1606 1769 m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1; 1607 1770 } 1608 #else1609 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive1610 if(m_numReorderPics[i] > m_maxDecPicBuffering[i])1611 {1612 m_maxDecPicBuffering[i] = m_numReorderPics[i];1613 }1614 #endif1615 1771 // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer 1616 1772 if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i]) … … 1621 1777 1622 1778 1623 #if L0323_DPB1624 1779 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1625 1780 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1) … … 1627 1782 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1; 1628 1783 } 1629 #else1630 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive1631 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])1632 {1633 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];1634 }1635 #endif1636 1784 1637 1785 #if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers … … 1717 1865 } 1718 1866 #endif 1719 #if !L0034_COMBINED_LIST_CLEANUP1720 xConfirmPara( m_bUseLComb==false && m_numReorderPics[MAX_TLAYER-1]!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" ); // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1.1721 #endif1722 1867 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); 1723 1868 #if !SVC_EXTENSION … … 1728 1873 xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n"); 1729 1874 1730 #if J0149_TONE_MAPPING_SEI1731 1875 if (m_toneMappingInfoSEIEnabled) 1732 1876 { … … 1739 1883 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue"); 1740 1884 } 1741 #endif1742 1885 1743 1886 #if RATE_CONTROL_LAMBDA_DOMAIN 1887 #if RC_SHVC_HARMONIZATION 1888 for ( Int layer=0; layer<m_numLayers; layer++ ) 1889 { 1890 if ( m_acLayerCfg[layer].m_RCEnableRateControl ) 1891 { 1892 if ( m_acLayerCfg[layer].m_RCForceIntraQP ) 1893 { 1894 if ( m_acLayerCfg[layer].m_RCInitialQP == 0 ) 1895 { 1896 printf( "\nInitial QP for rate control is not specified. Reset not to use force intra QP!" ); 1897 m_acLayerCfg[layer].m_RCForceIntraQP = false; 1898 } 1899 } 1900 } 1901 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 1902 } 1903 #else 1744 1904 if ( m_RCEnableRateControl ) 1745 1905 { … … 1754 1914 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 1755 1915 } 1916 #endif 1756 1917 #else 1757 1918 if(m_enableRateCtrl) … … 1771 1932 1772 1933 xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); 1773 #if L0444_FPA_TYPE1774 1934 if (m_framePackingSEIEnabled) 1775 1935 { 1776 1936 xConfirmPara(m_framePackingSEIType < 3 || m_framePackingSEIType > 5 , "SEIFramePackingType must be in rage 3 to 5"); 1777 1937 } 1778 #endif1779 1938 #if VPS_EXTN_DIRECT_REF_LAYERS 1939 #if M0457_PREDICTION_INDICATIONS 1940 xConfirmPara( (m_acLayerCfg[0].m_numSamplePredRefLayers != 0) && (m_acLayerCfg[0].m_numSamplePredRefLayers != -1), "Layer 0 cannot have any reference layers" ); 1941 // NOTE: m_numSamplePredRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 1942 for(Int layer = 1; layer < MAX_LAYERS; layer++) 1943 { 1944 xConfirmPara(m_acLayerCfg[layer].m_numSamplePredRefLayers > layer, "Cannot reference more layers than before current layer"); 1945 for(Int i = 0; i < m_acLayerCfg[layer].m_numSamplePredRefLayers; i++) 1946 { 1947 xConfirmPara(m_acLayerCfg[layer].m_samplePredRefLayerIds[i] > layer, "Cannot reference higher layers"); 1948 xConfirmPara(m_acLayerCfg[layer].m_samplePredRefLayerIds[i] == layer, "Cannot reference the current layer itself"); 1949 } 1950 } 1951 xConfirmPara( (m_acLayerCfg[0].m_numMotionPredRefLayers != 0) && (m_acLayerCfg[0].m_numMotionPredRefLayers != -1), "Layer 0 cannot have any reference layers" ); 1952 // NOTE: m_numMotionPredRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 1953 for(Int layer = 1; layer < MAX_LAYERS; layer++) 1954 { 1955 xConfirmPara(m_acLayerCfg[layer].m_numMotionPredRefLayers > layer, "Cannot reference more layers than before current layer"); 1956 for(Int i = 0; i < m_acLayerCfg[layer].m_numMotionPredRefLayers; i++) 1957 { 1958 xConfirmPara(m_acLayerCfg[layer].m_motionPredRefLayerIds[i] > layer, "Cannot reference higher layers"); 1959 xConfirmPara(m_acLayerCfg[layer].m_motionPredRefLayerIds[i] == layer, "Cannot reference the current layer itself"); 1960 } 1961 } 1962 #else 1780 1963 xConfirmPara( (m_acLayerCfg[0].m_numDirectRefLayers != 0) && (m_acLayerCfg[0].m_numDirectRefLayers != -1), "Layer 0 cannot have any reference layers" ); 1781 1964 // NOTE: m_numDirectRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference … … 1788 1971 xConfirmPara(m_acLayerCfg[layer].m_refLayerIds[i] == layer, "Cannot reference the current layer itself"); 1789 1972 } 1973 } 1974 #endif 1975 xConfirmPara( (m_acLayerCfg[0].m_numActiveRefLayers != 0) && (m_acLayerCfg[0].m_numActiveRefLayers != -1), "Layer 0 cannot have any active reference layers" ); 1976 // NOTE: m_numActiveRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 1977 for(Int layer = 1; layer < MAX_LAYERS; layer++) 1978 { 1979 #if M0457_PREDICTION_INDICATIONS 1980 Bool predEnabledFlag[MAX_LAYERS]; 1981 for (Int refLayer = 0; refLayer < layer; refLayer++) 1982 { 1983 predEnabledFlag[refLayer] = false; 1984 } 1985 for(Int i = 0; i < m_acLayerCfg[layer].m_numSamplePredRefLayers; i++) 1986 { 1987 predEnabledFlag[m_acLayerCfg[layer].m_samplePredRefLayerIds[i]] = true; 1988 } 1989 for(Int i = 0; i < m_acLayerCfg[layer].m_numMotionPredRefLayers; i++) 1990 { 1991 predEnabledFlag[m_acLayerCfg[layer].m_motionPredRefLayerIds[i]] = true; 1992 } 1993 Int numDirectRefLayers = 0; 1994 for (Int refLayer = 0; refLayer < layer; refLayer++) 1995 { 1996 if (predEnabledFlag[refLayer] == true) numDirectRefLayers++; 1997 } 1998 xConfirmPara(m_acLayerCfg[layer].m_numActiveRefLayers > numDirectRefLayers, "Cannot reference more layers than NumDirectRefLayers"); 1999 for(Int i = 0; i < m_acLayerCfg[layer].m_numActiveRefLayers; i++) 2000 { 2001 xConfirmPara(m_acLayerCfg[layer].m_predLayerIds[i] >= numDirectRefLayers, "Cannot reference higher layers"); 2002 } 2003 #else 2004 xConfirmPara(m_acLayerCfg[layer].m_numActiveRefLayers > m_acLayerCfg[layer].m_numDirectRefLayers, "Cannot reference more layers than NumDirectRefLayers"); 2005 for(Int i = 0; i < m_acLayerCfg[layer].m_numActiveRefLayers; i++) 2006 { 2007 xConfirmPara(m_acLayerCfg[layer].m_predLayerIds[i] >= m_acLayerCfg[layer].m_numDirectRefLayers, "Cannot reference higher layers"); 2008 } 2009 #endif 2010 } 2011 #endif 2012 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2013 if (m_adaptiveResolutionChange > 0) 2014 { 2015 xConfirmPara(m_numLayers != 2, "Adaptive resolution change works with 2 layers only"); 2016 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"); 1790 2017 } 1791 2018 #endif … … 1825 2052 printf("\n"); 1826 2053 #if SVC_EXTENSION 1827 printf("Total number of layers : %d\n", m_numLayers ); 2054 printf("Total number of layers : %d\n", m_numLayers ); 2055 printf("Multiview : %d\n", m_scalabilityMask[0] ); 2056 printf("Scalable : %d\n", m_scalabilityMask[1] ); 2057 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 2058 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange ); 2059 #endif 1828 2060 for(UInt layer=0; layer<m_numLayers; layer++) 1829 2061 { … … 1869 2101 printf("PCM sample bit depth : (Y:%d, C:%d)\n", g_uiPCMBitDepthLuma, g_uiPCMBitDepthChroma ); 1870 2102 #if RATE_CONTROL_LAMBDA_DOMAIN 2103 #if !RC_SHVC_HARMONIZATION 1871 2104 printf("RateControl : %d\n", m_RCEnableRateControl ); 1872 2105 if(m_RCEnableRateControl) … … 1879 2112 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 1880 2113 } 2114 #endif 1881 2115 #else 1882 2116 printf("RateControl : %d\n", m_enableRateCtrl); … … 1896 2130 printf("RDQ:%d ", m_useRDOQ ); 1897 2131 printf("RDQTS:%d ", m_useRDOQTS ); 1898 #if L0232_RD_PENALTY1899 2132 printf("RDpenalty:%d ", m_rdPenalty ); 1900 #endif1901 2133 printf("SQP:%d ", m_uiDeltaQpRD ); 1902 2134 printf("ASR:%d ", m_bUseASR ); 1903 #if !L0034_COMBINED_LIST_CLEANUP1904 printf("LComb:%d ", m_bUseLComb );1905 #endif1906 2135 printf("FEN:%d ", m_bUseFastEnc ); 1907 2136 printf("ECU:%d ", m_bUseEarlyCU ); … … 1909 2138 printf("CFM:%d ", m_bUseCbfFastMode ); 1910 2139 printf("ESD:%d ", m_useEarlySkipDetection ); 2140 #if FAST_INTRA_SHVC 2141 printf("FIS:%d ", m_useFastIntraScalable ); 2142 #endif 1911 2143 printf("RQT:%d ", 1 ); 1912 2144 printf("TransformSkip:%d ", m_useTransformSkip ); … … 1979 2211 } 1980 2212 2213 #if SCALED_REF_LAYER_OFFSETS 2214 Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString) 2215 { 2216 Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str()); 2217 if( numEntries > 0 ) 2218 { 2219 Char *arrayEntry; 2220 Int i = 0; 2221 *arr = new Int[numEntries]; 2222 2223 arrayEntry = strtok( tempChar, " ,"); 2224 while(arrayEntry != NULL) 2225 { 2226 if( i >= numEntries ) 2227 { 2228 printf( "%s: The number of entries specified is larger than the allowed number.\n", logString ); 2229 exit( EXIT_FAILURE ); 2230 } 2231 *( *arr + i ) = atoi( arrayEntry ); 2232 arrayEntry = strtok(NULL, " ,"); 2233 i++; 2234 } 2235 if( i < numEntries ) 2236 { 2237 printf( "%s: Some entries are not specified.\n", logString ); 2238 exit( EXIT_FAILURE ); 2239 } 2240 } 2241 else 2242 { 2243 *arr = NULL; 2244 } 2245 } 2246 #endif 1981 2247 //! \} -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r191 r310 61 61 TAppEncLayerCfg m_acLayerCfg [MAX_LAYERS]; 62 62 Int m_numLayers; ///< number of layers 63 63 Int m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; ///< scalability_mask 64 64 Char* m_pBitstreamFile; ///< output bitstream file 65 65 Double m_adLambdaModifier[ MAX_TLAYER ]; ///< Lambda modifier array for each temporal layer … … 72 72 #if AVC_SYNTAX 73 73 Char* m_BLSyntaxFile; ///< input syntax file 74 #endif 75 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 76 Int m_ilSampleOnlyPred[ MAX_LAYERS ]; 74 77 #endif 75 78 #else … … 96 99 Level::Tier m_levelTier; 97 100 Level::Name m_level; 98 #if L0046_CONSTRAINT_FLAGS99 101 Bool m_progressiveSourceFlag; 100 102 Bool m_interlacedSourceFlag; 101 103 Bool m_nonPackedConstraintFlag; 102 104 Bool m_frameOnlyConstraintFlag; 103 #endif104 105 105 106 // coding structure … … 112 113 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 113 114 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 114 #if L0323_DPB115 115 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 116 #else117 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of reference pictures needed for decoding118 #endif119 #if !L0034_COMBINED_LIST_CLEANUP120 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)121 #endif122 116 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 123 117 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping … … 181 175 Int m_loopFilterTcOffsetDiv2; ///< tc offset for deblocking filter 182 176 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 183 #if L0386_DB_METRIC184 177 Bool m_DeblockingFilterMetric; ///< blockiness metric in encoder 185 #endif186 178 187 179 // coding tools (PCM) … … 197 189 Bool m_useRDOQ; ///< flag for using RD optimized quantization 198 190 Bool m_useRDOQTS; ///< flag for using RD optimized quantization for transform skip 199 #if L0232_RD_PENALTY200 191 Int m_rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty) 201 #endif202 192 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 203 193 Int m_iSearchRange; ///< ME search range … … 208 198 Bool m_bUseCbfFastMode; ///< flag for using Cbf Fast PU Mode Decision 209 199 Bool m_useEarlySkipDetection; ///< flag for using Early SKIP Detection 200 #if FAST_INTRA_SHVC 201 Bool m_useFastIntraScalable; ///< flag for using Fast Intra Decision for Scalable HEVC 202 #endif 210 203 Int m_sliceMode; ///< 0: no slice limits, 1 : max number of CTBs per slice, 2: max number of bytes per slice, 211 204 ///< 3: max number of tiles per slice … … 235 228 Int m_bufferingPeriodSEIEnabled; 236 229 Int m_pictureTimingSEIEnabled; 237 #if J0149_TONE_MAPPING_SEI238 230 Bool m_toneMappingInfoSEIEnabled; 239 231 Int m_toneMapId; … … 261 253 Int* m_codedPivotValue; 262 254 Int* m_targetPivotValue; 263 #endif264 255 Int m_framePackingSEIEnabled; 265 256 Int m_framePackingSEIType; … … 271 262 Int m_gradualDecodingRefreshInfoEnabled; 272 263 Int m_decodingUnitInfoSEIEnabled; 273 #if L0208_SOP_DESCRIPTION_SEI 264 #if M0043_LAYERS_PRESENT_SEI 265 Int m_layersPresentSEIEnabled; 266 #endif 274 267 Int m_SOPDescriptionSEIEnabled; 275 #endif276 #if K0180_SCALABLE_NESTING_SEI277 268 Int m_scalableNestingSEIEnabled; 278 #endif279 269 // weighted prediction 280 270 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices … … 287 277 Int m_signHideFlag; 288 278 #if RATE_CONTROL_LAMBDA_DOMAIN 279 #if !RC_SHVC_HARMONIZATION 289 280 Bool m_RCEnableRateControl; ///< enable rate control or not 290 281 Int m_RCTargetBitrate; ///< target bitrate when rate control is enabled 282 #if M0036_RC_IMPROVEMENT 283 Int m_RCKeepHierarchicalBit; ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation 284 #else 291 285 Bool m_RCKeepHierarchicalBit; ///< whether keeping hierarchical bit allocation structure or not 286 #endif 292 287 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control 293 288 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level 294 289 Int m_RCInitialQP; ///< inital QP for rate control 295 290 Bool m_RCForceIntraQP; ///< force all intra picture to use initial QP or not 291 #endif 296 292 #else 297 293 Bool m_enableRateCtrl; ///< Flag for using rate control algorithm … … 352 348 Void xPrintParameter (); ///< print configuration values 353 349 Void xPrintUsage (); ///< print usage 354 #if SIGNAL_BITRATE_PICRATE_IN_VPS 355 Int m_bitRatePicRateMaxTLayers; ///< Indicates max. number of sub-layers for which bit rate is signalled. 356 Bool* m_bitRateInfoPresentFlag; ///< Indicates whether bit rate information is signalled 357 Bool* m_picRateInfoPresentFlag; ///< Indicates whether pic rate information is signalled 358 Int* m_avgBitRate; ///< Indicates avg. bit rate information for various sub-layers 359 Int* m_maxBitRate; ///< Indicates max. bit rate information for various sub-layers 360 Int* m_avgPicRate; ///< Indicates avg. picture rate information for various sub-layers 361 Int* m_constantPicRateIdc; ///< Indicates constant picture rate idc for various sub-layers 350 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 351 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame 362 352 #endif 363 353 public: … … 385 375 Char* getBLSyntaxFile() { return m_BLSyntaxFile; } 386 376 #endif 377 #if SCALED_REF_LAYER_OFFSETS 378 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString); 379 #endif 387 380 #endif 388 381 };// END CLASS DEFINITION TAppEncCfg -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r191 r310 35 35 m_confLeft = m_confRight = m_confTop = m_confBottom = 0; 36 36 m_aiPad[1] = m_aiPad[0] = 0; 37 #if SCALED_REF_LAYER_OFFSETS 38 m_numScaledRefLayerOffsets = 0; 39 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); 40 ::memset(m_scaledRefLayerTopOffset, 0, sizeof(m_scaledRefLayerTopOffset)); 41 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 42 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 43 #endif 37 44 } 38 45 … … 134 141 printf("QP : %5.2f\n", m_fQP ); 135 142 printf("Intra period : %d\n", m_iIntraPeriod ); 143 #if RC_SHVC_HARMONIZATION 144 printf("RateControl : %d\n", m_RCEnableRateControl ); 145 if(m_RCEnableRateControl) 146 { 147 printf("TargetBitrate : %d\n", m_RCTargetBitrate ); 148 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit ); 149 printf("LCULevelRC : %d\n", m_RCLCULevelRC ); 150 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel ); 151 printf("InitialQP : %d\n", m_RCInitialQP ); 152 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 153 } 154 #endif 136 155 printf("WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_cAppEncCfg->getWaveFrontSynchro(), m_iWaveFrontSubstreams); 137 156 } -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r191 r310 43 43 Double m_fQP; ///< QP value of key-picture (floating point) 44 44 #if VPS_EXTN_DIRECT_REF_LAYERS 45 #if M0457_PREDICTION_INDICATIONS 46 Int *m_samplePredRefLayerIds; 47 Int m_numSamplePredRefLayers; 48 Int *m_motionPredRefLayerIds; 49 Int m_numMotionPredRefLayers; 50 #else 45 51 Int *m_refLayerIds; 46 52 Int m_numDirectRefLayers; 47 53 #endif 54 Int *m_predLayerIds; 55 Int m_numActiveRefLayers; 56 #endif 57 58 #if RC_SHVC_HARMONIZATION 59 Bool m_RCEnableRateControl; ///< enable rate control or not 60 Int m_RCTargetBitrate; ///< target bitrate when rate control is enabled 61 Bool m_RCKeepHierarchicalBit; ///< whether keeping hierarchical bit allocation structure or not 62 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control 63 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level 64 Int m_RCInitialQP; ///< inital QP for rate control 65 Bool m_RCForceIntraQP; ///< force all intra picture to use initial QP or not 66 #endif 67 48 68 #if SVC_EXTENSION 49 69 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). … … 55 75 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 56 76 #if SCALED_REF_LAYER_OFFSETS 57 Int m_scaledRefLayerLeftOffset; 58 Int m_scaledRefLayerTopOffset; 59 Int m_scaledRefLayerRightOffset; 60 Int m_scaledRefLayerBottomOffset; 77 Int m_numScaledRefLayerOffsets ; 78 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; 79 Int m_scaledRefLayerTopOffset [MAX_LAYERS]; 80 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 81 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 61 82 #endif 62 83 public: … … 94 115 Int* getdQPs() {return m_aidQP; } 95 116 #if VPS_EXTN_DIRECT_REF_LAYERS 117 #if M0457_PREDICTION_INDICATIONS 118 Int getNumSamplePredRefLayers() {return m_numSamplePredRefLayers; } 119 Int* getSamplePredRefLayerIds() {return m_samplePredRefLayerIds; } 120 Int getSamplePredRefLayerId(Int i) {return m_samplePredRefLayerIds[i]; } 121 Int getNumMotionPredRefLayers() {return m_numMotionPredRefLayers; } 122 Int* getMotionPredRefLayerIds() {return m_motionPredRefLayerIds; } 123 Int getMotionPredRefLayerId(Int i) {return m_motionPredRefLayerIds[i]; } 124 #else 96 125 Int getNumDirectRefLayers() {return m_numDirectRefLayers;} 97 126 Int* getRefLayerIds() {return m_refLayerIds; } 98 127 Int getRefLayerId(Int i) {return m_refLayerIds[i]; } 128 #endif 129 130 Int getNumActiveRefLayers() {return m_numActiveRefLayers;} 131 Int* getPredLayerIds() {return m_predLayerIds; } 132 Int getPredLayerId(Int i) {return m_predLayerIds[i]; } 133 #endif 134 #if RC_SHVC_HARMONIZATION 135 Bool getRCEnableRateControl() {return m_RCEnableRateControl; } 136 Int getRCTargetBitrate() {return m_RCTargetBitrate; } 137 Bool getRCKeepHierarchicalBit() {return m_RCKeepHierarchicalBit; } 138 Bool getRCLCULevelRC() {return m_RCLCULevelRC; } 139 Bool getRCUseLCUSeparateModel() {return m_RCUseLCUSeparateModel; } 140 Int getRCInitialQP() {return m_RCInitialQP; } 141 Bool getRCForceIntraQP() {return m_RCForceIntraQP; } 99 142 #endif 100 143 }; // END CLASS DEFINITION TAppEncLayerCfg -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r191 r310 104 104 m_acTEncTop[layer].setProfile(m_profile); 105 105 m_acTEncTop[layer].setLevel(m_levelTier, m_level); 106 #if L0046_CONSTRAINT_FLAGS107 106 m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlag); 108 107 m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlag); 109 108 m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag); 110 109 m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); 111 #endif112 110 113 111 #if REF_IDX_MFM 114 112 #if AVC_BASE 113 #if M0457_PREDICTION_INDICATIONS 114 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers()); 115 #else 115 116 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_avcBaseLayerFlag ? AVC_SYNTAX : true )); 117 #endif 118 #else 119 #if M0457_PREDICTION_INDICATIONS 120 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) ); 116 121 #else 117 122 m_acTEncTop[layer].setMFMEnabledFlag(layer == 0 ? false : true); 123 #endif 124 #endif 125 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG 126 m_acTEncTop[layer].setIlSampleOnlyPred( layer == 0 ? 0 : m_ilSampleOnlyPred[layer] ); 118 127 #endif 119 128 #endif … … 147 156 if(layer) 148 157 { 158 #if M0457_PREDICTION_INDICATIONS 159 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 160 { 161 m_acTEncTop[layer].setSamplePredEnabledFlag(i, false); 162 m_acTEncTop[layer].setMotionPredEnabledFlag(i, false); 163 } 164 if(m_acLayerCfg[layer].getNumSamplePredRefLayers() == -1) 165 { 166 // Not included in the configuration file; assume that each layer depends on previous layer 167 m_acTEncTop[layer].setNumSamplePredRefLayers (1); // One sample pred ref. layer 168 m_acTEncTop[layer].setSamplePredRefLayerId (0, layer - 1); // Previous layer 169 m_acTEncTop[layer].setSamplePredEnabledFlag (layer - 1, true); 170 } 171 else 172 { 173 m_acTEncTop[layer].setNumSamplePredRefLayers ( m_acLayerCfg[layer].getNumSamplePredRefLayers() ); 174 for(Int i = 0; i < m_acTEncTop[layer].getNumSamplePredRefLayers(); i++) 175 { 176 m_acTEncTop[layer].setSamplePredRefLayerId ( i, m_acLayerCfg[layer].getSamplePredRefLayerId(i)); 177 m_acTEncTop[layer].setSamplePredEnabledFlag (m_acLayerCfg[layer].getSamplePredRefLayerId(i), true); 178 } 179 } 180 if(m_acLayerCfg[layer].getNumMotionPredRefLayers() == -1) 181 { 182 // Not included in the configuration file; assume that each layer depends on previous layer 183 m_acTEncTop[layer].setNumMotionPredRefLayers (1); // One motion pred ref. layer 184 m_acTEncTop[layer].setMotionPredRefLayerId (0, layer - 1); // Previous layer 185 m_acTEncTop[layer].setMotionPredEnabledFlag (layer - 1, true); 186 } 187 else 188 { 189 m_acTEncTop[layer].setNumMotionPredRefLayers ( m_acLayerCfg[layer].getNumMotionPredRefLayers() ); 190 for(Int i = 0; i < m_acTEncTop[layer].getNumMotionPredRefLayers(); i++) 191 { 192 m_acTEncTop[layer].setMotionPredRefLayerId ( i, m_acLayerCfg[layer].getMotionPredRefLayerId(i)); 193 m_acTEncTop[layer].setMotionPredEnabledFlag (m_acLayerCfg[layer].getSamplePredRefLayerId(i), true); 194 } 195 } 196 Int numDirectRefLayers = 0; 197 for (Int i = 0; i < layer; i++) 198 { 199 if (m_acTEncTop[layer].getSamplePredEnabledFlag(i) || m_acTEncTop[layer].getMotionPredEnabledFlag(i)) 200 { 201 m_acTEncTop[layer].setRefLayerId(numDirectRefLayers, i); 202 numDirectRefLayers++; 203 } 204 } 205 m_acTEncTop[layer].setNumDirectRefLayers(numDirectRefLayers); 206 #else 149 207 if(m_acLayerCfg[layer].getNumDirectRefLayers() == -1) 150 208 { … … 159 217 { 160 218 m_acTEncTop[layer].setRefLayerId ( i, m_acLayerCfg[layer].getRefLayerId(i)); 161 } 219 } 220 } 221 #endif 222 if(m_acLayerCfg[layer].getNumActiveRefLayers() == -1) 223 { 224 #if M0457_PREDICTION_INDICATIONS 225 m_acTEncTop[layer].setNumActiveRefLayers( m_acTEncTop[layer].getNumDirectRefLayers() ); 226 #else 227 m_acTEncTop[layer].setNumActiveRefLayers( m_acLayerCfg[layer].getNumDirectRefLayers() ); 228 #endif 229 for( Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++ ) 230 { 231 m_acTEncTop[layer].setPredLayerId(i, i); 232 } 233 } 234 else 235 { 236 m_acTEncTop[layer].setNumActiveRefLayers ( m_acLayerCfg[layer].getNumActiveRefLayers() ); 237 for(Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++) 238 { 239 m_acTEncTop[layer].setPredLayerId ( i, m_acLayerCfg[layer].getPredLayerId(i)); 240 } 162 241 } 163 242 } … … 171 250 m_acTEncTop[layer].setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 172 251 m_acTEncTop[layer].setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 173 #if L0386_DB_METRIC174 252 m_acTEncTop[layer].setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 175 #endif176 253 177 254 //====== Motion search ======== … … 207 284 m_acTEncTop[layer].setUseHADME ( m_bUseHADME ); 208 285 m_acTEncTop[layer].setUseLossless ( m_useLossless ); 209 #if !L0034_COMBINED_LIST_CLEANUP210 m_cTEncTop.setUseLComb ( m_bUseLComb );211 #endif212 286 m_acTEncTop[layer].setdQPs ( m_acLayerCfg[layer].getdQPs() ); 213 287 m_acTEncTop[layer].setUseRDOQ ( m_useRDOQ ); 214 288 m_acTEncTop[layer].setUseRDOQTS ( m_useRDOQTS ); 215 #if L0232_RD_PENALTY216 289 m_acTEncTop[layer].setRDpenalty ( m_rdPenalty ); 217 #endif218 290 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 219 291 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); … … 225 297 m_acTEncTop[layer].setUseCbfFastMode ( m_bUseCbfFastMode ); 226 298 m_acTEncTop[layer].setUseEarlySkipDetection ( m_useEarlySkipDetection ); 299 #if FAST_INTRA_SHVC 300 m_acTEncTop[layer].setUseFastIntraScalable ( m_useFastIntraScalable ); 301 #endif 227 302 228 303 m_acTEncTop[layer].setUseTransformSkip ( m_useTransformSkip ); … … 279 354 m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 280 355 m_acTEncTop[layer].setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 281 #if J0149_TONE_MAPPING_SEI282 356 m_acTEncTop[layer].setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 283 357 m_acTEncTop[layer].setTMISEIToneMapId ( m_toneMapId ); … … 305 379 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 306 380 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 307 #endif308 381 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 309 382 m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 315 388 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 316 389 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 317 #if L0208_SOP_DESCRIPTION_SEI 390 #if M0043_LAYERS_PRESENT_SEI 391 m_acTEncTop[layer].setLayersPresentSEIEnabled( m_layersPresentSEIEnabled ); 392 #endif 318 393 m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 319 #endif320 #if K0180_SCALABLE_NESTING_SEI321 394 m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 322 #endif323 395 m_acTEncTop[layer].setUniformSpacingIdr ( m_iUniformSpacingIdr ); 324 396 m_acTEncTop[layer].setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 343 415 m_acTEncTop[layer].setSignHideFlag(m_signHideFlag); 344 416 #if RATE_CONTROL_LAMBDA_DOMAIN 417 #if RC_SHVC_HARMONIZATION 418 m_acTEncTop[layer].setUseRateCtrl (m_acLayerCfg[layer].getRCEnableRateControl()); 419 m_acTEncTop[layer].setTargetBitrate (m_acLayerCfg[layer].getRCTargetBitrate()); 420 m_acTEncTop[layer].setKeepHierBit (m_acLayerCfg[layer].getRCKeepHierarchicalBit()); 421 m_acTEncTop[layer].setLCULevelRC (m_acLayerCfg[layer].getRCLCULevelRC()); 422 m_acTEncTop[layer].setUseLCUSeparateModel (m_acLayerCfg[layer].getRCUseLCUSeparateModel()); 423 m_acTEncTop[layer].setInitialQP (m_acLayerCfg[layer].getRCInitialQP()); 424 m_acTEncTop[layer].setForceIntraQP (m_acLayerCfg[layer].getRCForceIntraQP()); 425 #else 345 426 m_acTEncTop[layer].setUseRateCtrl ( m_RCEnableRateControl ); 346 427 m_acTEncTop[layer].setTargetBitrate ( m_RCTargetBitrate ); … … 350 431 m_acTEncTop[layer].setInitialQP ( m_RCInitialQP ); 351 432 m_acTEncTop[layer].setForceIntraQP ( m_RCForceIntraQP ); 433 #endif 352 434 #else 353 435 m_acTEncTop[layer].setUseRateCtrl ( m_enableRateCtrl); … … 389 471 m_acTEncTop[layer].setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal ); 390 472 m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 391 #if SIGNAL_BITRATE_PICRATE_IN_VPS392 TComBitRatePicRateInfo *bitRatePicRateInfo = m_cTEncTop[layer].getVPS()->getBitratePicrateInfo();393 // The number of bit rate/pic rate have to equal to number of sub-layers.394 if(m_bitRatePicRateMaxTLayers)395 {396 assert(m_bitRatePicRateMaxTLayers == m_cTEncTop[layer].getVPS()->getMaxTLayers());397 }398 for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)399 {400 bitRatePicRateInfo->setBitRateInfoPresentFlag( i, m_bitRateInfoPresentFlag[i] );401 if( bitRatePicRateInfo->getBitRateInfoPresentFlag(i) )402 {403 bitRatePicRateInfo->setAvgBitRate(i, m_avgBitRate[i]);404 bitRatePicRateInfo->setMaxBitRate(i, m_maxBitRate[i]);405 }406 }407 for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)408 {409 bitRatePicRateInfo->setPicRateInfoPresentFlag( i, m_picRateInfoPresentFlag[i] );410 if( bitRatePicRateInfo->getPicRateInfoPresentFlag(i) )411 {412 bitRatePicRateInfo->setAvgPicRate (i, m_avgPicRate[i]);413 bitRatePicRateInfo->setConstantPicRateIdc(i, m_constantPicRateIdc[i]);414 }415 }416 #endif417 473 #if REF_IDX_FRAMEWORK 418 474 m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled); … … 421 477 if( layer > 0 ) 422 478 { 423 m_acTEncTop[layer].getScaledRefLayerWindow().setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset, 424 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset, 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset); 425 } 479 m_acTEncTop[layer].setNumScaledRefLayerOffsets( m_acLayerCfg[layer].m_numScaledRefLayerOffsets ); 480 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 481 { 482 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 483 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 484 } 485 } 486 #endif 487 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 488 m_acTEncTop[layer].setAdaptiveResolutionChange( m_adaptiveResolutionChange ); 426 489 #endif 427 490 } … … 447 510 m_cTEncTop.setProfile(m_profile); 448 511 m_cTEncTop.setLevel(m_levelTier, m_level); 449 #if L0046_CONSTRAINT_FLAGS450 512 m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag); 451 513 m_cTEncTop.setInterlacedSourceFlag(m_interlacedSourceFlag); 452 514 m_cTEncTop.setNonPackedConstraintFlag(m_nonPackedConstraintFlag); 453 515 m_cTEncTop.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); 454 #endif455 516 456 517 m_cTEncTop.setFrameRate ( m_iFrameRate ); … … 491 552 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 492 553 m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 493 #if L0386_DB_METRIC494 554 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 495 #endif496 555 497 556 //====== Motion search ======== … … 527 586 m_cTEncTop.setUseHADME ( m_bUseHADME ); 528 587 m_cTEncTop.setUseLossless ( m_useLossless ); 529 #if !L0034_COMBINED_LIST_CLEANUP530 m_cTEncTop.setUseLComb ( m_bUseLComb );531 #endif532 588 m_cTEncTop.setdQPs ( m_aidQP ); 533 589 m_cTEncTop.setUseRDOQ ( m_useRDOQ ); 534 590 m_cTEncTop.setUseRDOQTS ( m_useRDOQTS ); 535 #if L0232_RD_PENALTY536 591 m_cTEncTop.setRDpenalty ( m_rdPenalty ); 537 #endif538 592 m_cTEncTop.setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 539 593 m_cTEncTop.setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); … … 545 599 m_cTEncTop.setUseCbfFastMode ( m_bUseCbfFastMode ); 546 600 m_cTEncTop.setUseEarlySkipDetection ( m_useEarlySkipDetection ); 601 #if FAST_INTRA_SHVC 602 m_cTEncTop.setUseFastIntraScalable ( m_useFastIntraScalable ); 603 #endif 547 604 548 605 m_cTEncTop.setUseTransformSkip ( m_useTransformSkip ); … … 599 656 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 600 657 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 601 #if J0149_TONE_MAPPING_SEI602 658 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 603 659 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); … … 625 681 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 626 682 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 627 #endif628 683 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 629 684 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 635 690 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 636 691 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 637 #if L0208_SOP_DESCRIPTION_SEI 692 #if M0043_LAYERS_PRESENT_SEI 693 m_cTEncTop.setLayersPresentSEIEnabled( m_layersPresentSEIEnabled ); 694 #endif 638 695 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 639 #endif640 #if K0180_SCALABLE_NESTING_SEI641 696 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 642 #endif643 697 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 644 698 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 709 763 m_cTEncTop.setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal ); 710 764 m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 711 #if SIGNAL_BITRATE_PICRATE_IN_VPS712 TComBitRatePicRateInfo *bitRatePicRateInfo = m_cTEncTop.getVPS()->getBitratePicrateInfo();713 // The number of bit rate/pic rate have to equal to number of sub-layers.714 if(m_bitRatePicRateMaxTLayers)715 {716 assert(m_bitRatePicRateMaxTLayers == m_cTEncTop.getVPS()->getMaxTLayers());717 }718 for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)719 {720 bitRatePicRateInfo->setBitRateInfoPresentFlag( i, m_bitRateInfoPresentFlag[i] );721 if( bitRatePicRateInfo->getBitRateInfoPresentFlag(i) )722 {723 bitRatePicRateInfo->setAvgBitRate(i, m_avgBitRate[i]);724 bitRatePicRateInfo->setMaxBitRate(i, m_maxBitRate[i]);725 }726 }727 for(Int i = 0; i < m_bitRatePicRateMaxTLayers; i++)728 {729 bitRatePicRateInfo->setPicRateInfoPresentFlag( i, m_picRateInfoPresentFlag[i] );730 if( bitRatePicRateInfo->getPicRateInfoPresentFlag(i) )731 {732 bitRatePicRateInfo->setAvgPicRate (i, m_avgPicRate[i]);733 bitRatePicRateInfo->setConstantPicRateIdc(i, m_constantPicRateIdc[i]);734 }735 }736 #endif737 765 } 738 766 #endif … … 828 856 if(m_numLayers > 1) 829 857 { 830 vps->setScalabilityMask(1, true); // Only turn on spatial/SNR scalability 831 vps->setNumScalabilityTypes(1); 858 Int scalabilityTypes = 0; 859 for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++) 860 { 861 vps->setScalabilityMask(i, m_scalabilityMask[i]); 862 scalabilityTypes += m_scalabilityMask[i]; 863 } 864 assert( scalabilityTypes == 1 ); 865 vps->setNumScalabilityTypes(scalabilityTypes); 832 866 } 833 867 else … … 861 895 // Target output layer 862 896 #if VPS_PROFILE_OUTPUT_LAYERS 863 vps->setNumOutputLayerSets(2); // 2 including the default base-layer set. 864 vps->setNumProfileTierLevel(2); // 1 for the enhancement layer 865 vps->setProfileLevelTierIdx(1, 1); 897 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 898 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 866 899 vps->setDefaultOneTargetOutputLayerFlag(true); 867 Int lsIdx = 1; 868 vps->setOutputLayerSetIdx(1, lsIdx); // Because only one layer set 900 for(i = 1; i < vps->getNumLayerSets(); i++) 901 { 902 vps->setProfileLevelTierIdx(i, i); 903 vps->setOutputLayerSetIdx(i, i); 904 } 869 905 #else 870 906 vps->setNumOutputLayerSets(1); … … 872 908 vps->setOutputLayerSetIdx(0, lsIdx); // Because only one layer set 873 909 #endif 874 // Include the highest layer as output layer 875 for(UInt layer=0; layer <= vps->getMaxLayerId() ; layer++) 876 { 877 if(vps->getLayerIdIncludedFlag(lsIdx, layer)) 878 { 879 vps->setOutputLayerFlag(lsIdx, layer, layer == (vps->getMaxLayerId())); 910 for(Int lsIdx = 1; lsIdx < vps->getNumLayerSets(); lsIdx++) 911 { 912 // Include the highest layer as output layer 913 for(UInt layer=0; layer <= vps->getMaxLayerId() ; layer++) 914 { 915 if(vps->getLayerIdIncludedFlag(lsIdx, layer)) 916 { 917 vps->setOutputLayerFlag(lsIdx, layer, layer == (vps->getMaxLayerId())); 918 } 880 919 } 881 920 } … … 883 922 #if VPS_EXTN_DIRECT_REF_LAYERS 884 923 // Direct reference layers 924 UInt maxDirectRefLayers = 0; 885 925 for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 886 926 { 887 927 vps->setNumDirectRefLayers( layerCtr, m_acTEncTop[layerCtr].getNumDirectRefLayers() ); 928 maxDirectRefLayers = max<UInt>( maxDirectRefLayers, vps->getNumDirectRefLayers( layerCtr ) ); 929 888 930 for(i = 0; i < vps->getNumDirectRefLayers(layerCtr); i++) 889 931 { … … 900 942 vps->setDirectDependencyFlag( layerCtr, vps->getLayerIdInVps(m_acTEncTop[layerCtr].getRefLayerId(i)), true); 901 943 } 944 #if M0457_PREDICTION_INDICATIONS 945 vps->setDirectDepTypeLen(2); // sample and motion types are encoded 946 for(Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++) 947 { 948 if (vps->getDirectDependencyFlag( layerCtr, refLayerCtr)) 949 { 950 assert(m_acTEncTop[layerCtr].getSamplePredEnabledFlag(refLayerCtr) || m_acTEncTop[layerCtr].getMotionPredEnabledFlag(refLayerCtr)); 951 vps->setDirectDependencyType( layerCtr, refLayerCtr, ((m_acTEncTop[layerCtr].getSamplePredEnabledFlag(refLayerCtr) ? 1 : 0) | 952 (m_acTEncTop[layerCtr].getMotionPredEnabledFlag(refLayerCtr) ? 2 : 0)) - 1); 953 } 954 else 955 { 956 vps->setDirectDependencyType( layerCtr, refLayerCtr, 0 ); 957 } 958 } 959 #endif 902 960 } 903 961 #endif 904 962 #if JCTVC_M0458_INTERLAYER_RPS_SIG 905 vps->setMaxOneActiveRefLayerFlag( true);963 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 906 964 #endif 965 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 966 vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false); 967 #endif 907 968 #else 908 969 m_cTEncTop.init(); … … 1014 1075 } 1015 1076 1077 #if RC_SHVC_HARMONIZATION 1078 for(UInt layer=0; layer<m_numLayers; layer++) 1079 { 1080 if ( m_acTEncTop[layer].getUseRateCtrl() ) 1081 { 1082 (m_acTEncTop[layer].getRateCtrl())->initRCGOP(m_acTEncTop[layer].getNumPicRcvd()); 1083 } 1084 } 1085 #endif 1086 1087 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1088 if (m_adaptiveResolutionChange) 1089 { 1090 for(UInt layer = 0; layer < m_numLayers; layer++) 1091 { 1092 TComList<TComPicYuv*>::iterator iterPicYuvRec; 1093 for (iterPicYuvRec = m_acListPicYuvRec[layer].begin(); iterPicYuvRec != m_acListPicYuvRec[layer].end(); iterPicYuvRec++) 1094 { 1095 TComPicYuv* recPic = *(iterPicYuvRec); 1096 recPic->setReconstructed(false); 1097 } 1098 } 1099 } 1100 #endif 1101 1016 1102 // loop through frames in one GOP 1017 1103 for ( UInt iPicIdInGOP=0; iPicIdInGOP < (bFirstFrame? 1:m_iGOPSize); iPicIdInGOP++ ) … … 1024 1110 } 1025 1111 } 1112 1113 #if RC_SHVC_HARMONIZATION 1114 for(UInt layer=0; layer<m_numLayers; layer++) 1115 { 1116 if ( m_acTEncTop[layer].getUseRateCtrl() ) 1117 { 1118 (m_acTEncTop[layer].getRateCtrl())->destroyRCGOP(); 1119 } 1120 } 1121 #endif 1026 1122 1027 1123 iTotalNumEncoded = 0; … … 1270 1366 { 1271 1367 TComPicYuv* pcPicYuvRec = *(iterPicYuvRec++); 1368 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1369 if (!m_acLayerCfg[layer].getReconFile().empty() && pcPicYuvRec->isReconstructed()) 1370 #else 1272 1371 if (!m_acLayerCfg[layer].getReconFile().empty()) 1372 #endif 1273 1373 { 1274 1374 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfLeft(), m_acLayerCfg[layer].getConfRight(), … … 1284 1384 list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin(); 1285 1385 1386 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1387 for ( i = 0; i < iNumEncoded && iterBitstream != accessUnits.end(); i++ ) 1388 #else 1286 1389 for ( i = 0; i < iNumEncoded; i++ ) 1390 #endif 1287 1391 { 1288 1392 const AccessUnit& au = *(iterBitstream++); -
trunk/source/App/TAppEncoder/encmain.cpp
r191 r310 57 57 // print information 58 58 fprintf( stdout, "\n" ); 59 #if SVC_EXTENSION 59 60 fprintf( stdout, "SHM software: Encoder Version [%s]", NV_VERSION ); 61 #else 62 fprintf( stdout, "HM software: Encoder Version [%s]", NV_VERSION ); 63 #endif 60 64 fprintf( stdout, NVM_ONOS ); 61 65 fprintf( stdout, NVM_COMPILEDBY );
Note: See TracChangeset for help on using the changeset viewer.