Changeset 872 in 3DVCSoftware for trunk/source/App
- Timestamp:
- 27 Mar 2014, 10:11:29 (11 years ago)
- Location:
- trunk/source/App
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecCfg.cpp
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/TAppDecoder/TAppDecCfg.h
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 140 140 AOF( m_pScaleOffsetFile ); 141 141 } 142 #if !FIX_CAM_PARS_COLLECTOR 142 143 m_cCamParsCollector.init( m_pScaleOffsetFile ); 144 #endif 143 145 #endif 144 146 InputByteStream bytestream(bitstreamFile); … … 165 167 Bool firstSlice = true; 166 168 #endif 167 169 Bool loopFiltered = false; 170 168 171 while (!!bitstreamFile) 169 172 { … … 206 209 read(nalu, nalUnit); 207 210 #if H_MV 211 #if H_MV_FIX_VPS_LAYER_ID_NOT_EQUAL_ZERO 212 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) 213 || !isNaluWithinTargetDecLayerIdSet(&nalu) 214 || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 215 || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0) 216 #if H_MV_HLS_7_MISC_P0130_EOS 217 || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0) 218 #endif 219 ) 220 #else 208 221 if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 ) 222 #endif 209 223 { 210 224 bNewPicture = false; … … 234 248 } 235 249 250 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 251 if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() ) 252 { 253 fprintf(stderr, "\ntarget output layer set index must be in the range of 0 to %d, inclusive \n", vps->getNumOutputLayerSets() - 1 ); 254 exit(EXIT_FAILURE); 255 } 256 #endif 236 257 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 237 258 } 259 260 #if FIX_CAM_PARS_COLLECTOR 261 #if H_3D 262 if (nalu.m_nalUnitType == NAL_UNIT_VPS ) 263 { 264 265 m_cCamParsCollector.init( m_pScaleOffsetFile, m_tDecTop[decIdx]->getPrefetchedVPS() ); 266 } 267 #endif 268 #endif 238 269 bNewPicture = ( newSliceDiffLayer || newSliceDiffPoc ) && !sliceSkippedFlag; 239 270 if ( nalu.isSlice() && firstSlice && !sliceSkippedFlag ) … … 278 309 bitstreamFile.seekg(location-streamoff(3)); 279 310 bytestream.reset(); 311 #if H_MV_ENC_DEC_TRAC 280 312 #if ENC_DEC_TRACE 281 #if H_MV_ENC_DEC_TRAC282 313 const Bool resetCounter = false; 283 314 if ( resetCounter ) … … 287 318 else 288 319 { 289 g_disableHLSTrace = true; // Trancing of second parsing of SH is not carried out 290 } 291 #else 292 g_nSymbolCounter = symCount; 293 #endif 294 #endif 295 } 296 } 297 } 298 if (bNewPicture || !bitstreamFile) 299 { 300 #if H_MV 301 assert( decIdxLastPic != -1 ); 302 m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet ); 303 #else 304 m_cTDecTop.executeLoopFilters(poc, pcListPic); 305 #endif 320 g_disableHLSTrace = true; // Tracing of second parsing of SH is not carried out 321 } 322 #endif 323 #endif 324 } 325 } 326 } 327 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS ) 328 { 329 if (!loopFiltered || bitstreamFile) 330 { 331 #if H_MV 332 assert( decIdxLastPic != -1 ); 333 m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet ); 334 #else 335 m_cTDecTop.executeLoopFilters(poc, pcListPic); 336 #endif 337 } 338 loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS); 306 339 } 307 340 #if H_3D … … 351 384 #endif 352 385 } 386 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 387 { 388 #if H_MV 389 xFlushOutput( pcListPic, decIdxLastPic ); 390 #else 391 xFlushOutput( pcListPic ); 392 #endif 393 } 353 394 // write reconstruction to file 354 395 if(bNewPicture) … … 462 503 #endif 463 504 { 505 506 if (pcListPic->empty()) 507 { 508 return; 509 } 510 464 511 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 465 512 Int numPicsNotYetDisplayed = 0; … … 647 694 #endif 648 695 { 649 if(!pcListPic )696 if(!pcListPic || pcListPic->empty()) 650 697 { 651 698 return; -
trunk/source/App/TAppDecoder/TAppDecTop.h
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/TAppDecoder/decmain.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 388 388 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 389 389 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 390 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 391 ("DefaultTargetOutputLayerIdc" , m_defaultTargetOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 392 #else 390 393 ("DefaultOneTargetOutputLayerFlag" , m_defaultOneTargetOutputLayerIdc , 0, "Output highest layer of layer sets by default") 394 #endif 391 395 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 396 397 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 398 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 399 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 400 #else 392 401 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(1,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "LayerIds of additional output layers") 402 #endif 393 403 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 394 404 … … 444 454 ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs") 445 455 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs") 456 #if H_MV 446 457 // Coding structure parameters 447 #if H_MV448 458 ("IntraPeriod,-ip", m_iIntraPeriod,std::vector<Int>(1,-1), "Intra period in frames, (-1: only first frame), per layer") 449 459 #else 460 // Coding structure paramters 450 461 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 451 462 #endif … … 492 503 ("RDOQTS", m_useRDOQTS, true ) 493 504 ("RDpenalty", m_rdPenalty, 0, "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disbaled 1:RD-penalty 2:maximum RD-penalty") 494 // Entropy coding parameters495 ("SBACRD", m_bUseSBACRD, true, "SBAC based RD estimation")496 505 497 506 // Deblocking filter parameters … … 539 548 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 540 549 ("SAOLcuBoundary", m_saoLcuBoundary, false, "0: right/bottom LCU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas") 541 ("SAOLcuBasedOptimization", m_saoLcuBasedOptimization, true, "0: SAO picture-based optimization, 1: SAO LCU-based optimization ")542 550 ("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") 543 551 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" … … 559 567 ("PCMInputBitDepthFlag", m_bPCMInputBitDepthFlag, true) 560 568 ("PCMFilterDisableFlag", m_bPCMFilterDisableFlag, false) 561 562 ("LosslessCuEnabled", m_useLossless, false)563 569 564 570 ("WeightedPredP,-wpP", m_useWeightedPred, false, "Use weighted prediction in P slices") … … 590 596 ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting") 591 597 ("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting") 592 #if RATE_CONTROL_LAMBDA_DOMAIN593 598 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 594 599 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bitrate" ) 595 #if M0036_RC_IMPROVEMENT596 600 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 597 #else598 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, false, "Rate control: keep hierarchical bit allocation in rate control algorithm" )599 #endif600 601 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: LCU level RC; false: picture level RC" ) 601 602 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use LCU level separate R-lambda model" ) … … 610 611 ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off") 611 612 #endif 612 #else613 ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")614 ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate")615 ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit")616 617 #if KWU_RC_VIEWRC_E0227618 ("ViewWiseTargetBits, -vtbr" , m_viewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting")619 ("TargetBitAssign, -ta", m_viewWiseRateCtrl, false, "View-wise rate control on/off")620 #endif621 #if KWU_RC_MADPRED_E0227622 ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off")623 #endif624 #endif625 626 613 #if H_MV 627 614 628 615 // DBP Size 616 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE 629 617 ("SubLayerFlagInfoPresentFlag", m_subLayerFlagInfoPresentFlag , false , "SubLayerFlagInfoPresentFlag") 618 #endif 630 619 // VPS VUI 631 620 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 632 621 ("CrossLayerPicTypeAlignedFlag", m_crossLayerPicTypeAlignedFlag, false , "CrossLayerPicTypeAlignedFlag") // Could actually be derived by the encoder 633 622 ("CrossLayerIrapAlignedFlag" , m_crossLayerIrapAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 623 #if H_MV_HLS_7_MISC_P0068_21 624 ("AllLayersIdrAlignedFlag" , m_allLayersIdrAlignedFlag , false , "CrossLayerIrapAlignedFlag ") // Could actually be derived by the encoder 625 #endif 634 626 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 635 627 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") … … 653 645 654 646 ("TransquantBypassEnableFlag", m_TransquantBypassEnableFlag, false, "transquant_bypass_enable_flag indicator in PPS") 655 ("CUTransquantBypassFlag Value", m_CUTransquantBypassFlagValue, false, "Fixed cu_transquant_bypass_flag value, when transquant_bypass_enable_flag is enabled")647 ("CUTransquantBypassFlagForce", m_CUTransquantBypassFlagForce, false, "Force transquant bypass mode, when transquant_bypass_enable_flag is enabled") 656 648 ("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case") 657 649 ("StrongIntraSmoothing,-sis", m_useStrongIntraSmoothing, true, "Enable strong intra smoothing for 32x32 blocks") … … 745 737 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 746 738 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 739 #if H_MV_HLS_7_SEI_P0204_26 740 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 741 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled") 742 ("SEISubBitstreamSubBitstreamMode", m_sbPropSubBitstreamMode, std::vector< Int >(1,0) ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)") 743 ("SEISubBitstreamOutputLayerSetIdxToVps", m_sbPropOutputLayerSetIdxToVps, std::vector< Int >(1,0) ,"Specifies output layer set index of the i-th sub-bitstream ") 744 ("SEISubBitstreamHighestSublayerId", m_sbPropHighestSublayerId, std::vector< Int >(1,0) ,"Specifies highest TemporalId of the i-th sub-bitstream") 745 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 746 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 747 #endif 747 748 #if H_3D 748 749 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 1431 1432 } 1432 1433 1434 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1435 xConfirmPara( m_defaultTargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 1436 1437 if( m_defaultTargetOutputLayerIdc != 2 ) 1438 { 1439 Bool anyDefaultOutputFlag = false; 1440 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1441 { 1442 anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 ); 1443 } 1444 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" ); 1445 } 1446 else 1447 { 1448 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1449 { 1450 for (Int i = 0; i < m_layerIdsInDefOutputLayerSet[ lsIdx ].size(); i++) 1451 { 1452 Bool inLayerSetFlag = false; 1453 for (Int j = 0; j < m_layerIdsInSets[ lsIdx].size(); j++ ) 1454 { 1455 if ( m_layerIdsInSets[ lsIdx ][ j ] == m_layerIdsInDefOutputLayerSet[ lsIdx ][ i ] ) 1456 { 1457 inLayerSetFlag = true; 1458 break; 1459 } 1460 } 1461 xConfirmPara( !inLayerSetFlag, "All output layers of a output layer set must be included in corresponding layer set."); 1462 } 1463 } 1464 } 1465 #else 1433 1466 xConfirmPara( m_defaultOneTargetOutputLayerIdc < 0 || m_defaultOneTargetOutputLayerIdc > 1, "Default one target output layer idc must be equal to 0 or equal to 1" ); 1467 #endif 1434 1468 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1435 1469 … … 2021 2055 m_maxTempLayer = m_GOPList[i].m_temporalId+1; 2022 2056 } 2023 xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P' , "Slice type must be equal to B or P");2057 xConfirmPara(m_GOPList[i].m_sliceType!='B'&&m_GOPList[i].m_sliceType!='P'&&m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I"); 2024 2058 } 2025 2059 for(Int i=0; i<MAX_TLAYER; i++) … … 2172 2206 } 2173 2207 2174 #if RATE_CONTROL_LAMBDA_DOMAIN2175 2208 if ( m_RCEnableRateControl ) 2176 2209 { … … 2185 2218 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 2186 2219 } 2187 #else2188 if(m_enableRateCtrl)2189 {2190 Int numLCUInWidth = (m_iSourceWidth / m_uiMaxCUWidth) + (( m_iSourceWidth % m_uiMaxCUWidth ) ? 1 : 0);2191 Int numLCUInHeight = (m_iSourceHeight / m_uiMaxCUHeight)+ (( m_iSourceHeight % m_uiMaxCUHeight) ? 1 : 0);2192 Int numLCUInPic = numLCUInWidth * numLCUInHeight;2193 2194 xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" );2195 2196 #if !KWU_FIX_URQ2197 m_iMaxDeltaQP = MAX_DELTA_QP;2198 #endif2199 m_iMaxCuDQPDepth = MAX_CUDQP_DEPTH;2200 }2201 #endif2202 2220 #if H_MV 2203 2221 // VPS VUI … … 2223 2241 #endif 2224 2242 2225 xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlag Value, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0");2243 xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce, "CUTransquantBypassFlagForce cannot be 1 when TransquantBypassEnableFlag is 0"); 2226 2244 2227 2245 xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); … … 2233 2251 #if H_MV 2234 2252 } 2253 } 2254 #endif 2255 #if H_MV_HLS_7_SEI_P0204_26 2256 // Check input parameters for Sub-bitstream property SEI message 2257 if( m_subBistreamPropSEIEnabled ) 2258 { 2259 xConfirmPara( 2260 (this->m_sbPropNumAdditionalSubStreams != m_sbPropAvgBitRate.size() ) 2261 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropHighestSublayerId.size() ) 2262 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropMaxBitRate.size() ) 2263 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropOutputLayerSetIdxToVps.size() ) 2264 || (this->m_sbPropNumAdditionalSubStreams != m_sbPropSubBitstreamMode.size()), "Some parameters of some sub-bitstream not defined"); 2265 2266 for( Int i = 0; i < m_sbPropNumAdditionalSubStreams; i++ ) 2267 { 2268 xConfirmPara( m_sbPropSubBitstreamMode[i] < 0 || m_sbPropSubBitstreamMode[i] > 1, "Mode value should be 0 or 1" ); 2269 xConfirmPara( m_sbPropHighestSublayerId[i] < 0 || m_sbPropHighestSublayerId[i] > MAX_TLAYER-1, "Maximum sub-layer ID out of range" ); 2270 xConfirmPara( m_sbPropOutputLayerSetIdxToVps[i] < 0 || m_sbPropOutputLayerSetIdxToVps[i] >= MAX_VPS_OUTPUTLAYER_SETS, "OutputLayerSetIdxToVps should be within allowed range" ); 2271 } 2235 2272 } 2236 2273 #endif … … 2343 2380 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepthY, m_internalBitDepthC ); 2344 2381 printf("PCM sample bit depth : (Y:%d, C:%d)\n", g_uiPCMBitDepthLuma, g_uiPCMBitDepthChroma ); 2345 #if RATE_CONTROL_LAMBDA_DOMAIN2346 2382 printf("RateControl : %d\n", m_RCEnableRateControl ); 2347 2383 if(m_RCEnableRateControl) … … 2373 2409 #endif 2374 2410 } 2375 #else2376 printf("RateControl : %d\n", m_enableRateCtrl);2377 if(m_enableRateCtrl)2378 {2379 printf("TargetBitrate : %d\n", m_targetBitrate);2380 printf("NumLCUInUnit : %d\n", m_numLCUInUnit);2381 2382 #if KWU_RC_MADPRED_E02272383 printf("Depth based MAD prediction : %d\n", m_depthMADPred);2384 #endif2385 #if KWU_RC_VIEWRC_E02272386 printf("View-wise Rate control : %d\n", m_viewWiseRateCtrl);2387 if(m_viewWiseRateCtrl)2388 {2389 2390 printf("ViewWiseTargetBits : ");2391 for (Int i = 0 ; i < m_iNumberOfViews ; i++)2392 printf("%d ", m_viewTargetBits[i]);2393 printf("\n");2394 }2395 else2396 {2397 printf("TargetBitrate : %d\n", m_targetBitrate );2398 }2399 #endif2400 }2401 #endif2402 2411 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 2403 2412 #if H_3D … … 2429 2438 printf("IBD:%d ", g_bitDepthY > m_inputBitDepthY || g_bitDepthC > m_inputBitDepthC); 2430 2439 printf("HAD:%d ", m_bUseHADME ); 2431 printf("SRD:%d ", m_bUseSBACRD );2432 2440 printf("RDQ:%d ", m_useRDOQ ); 2433 2441 printf("RDQTS:%d ", m_useRDOQTS ); … … 2458 2466 #endif 2459 2467 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 2460 printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0)); 2461 2462 printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 ); 2468 if (m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce) 2469 { 2470 printf("TransQuantBypassEnabled: =1 "); 2471 } 2472 else 2473 { 2474 printf("TransQuantBypassEnabled:%d ", (m_TransquantBypassEnableFlag)? 1:0 ); 2475 } 2463 2476 printf("WPP:%d ", (Int)m_useWeightedPred); 2464 2477 printf("WPB:%d ", (Int)m_useWeightedBiPred); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 89 89 Int m_vpsNumLayerSets; ///< Number of layer sets 90 90 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 92 Int m_defaultTargetOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 93 #else 91 94 Int m_defaultOneTargetOutputLayerIdc; ///< Output highest layer of layer sets by default when equal to 1 95 #endif 92 96 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 93 97 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 98 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 99 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 100 #endif 94 101 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 95 102 … … 99 106 100 107 // DBP Size 108 #if !H_MV_HLS_7_FIX_SET_DPB_SIZE 101 109 Bool m_subLayerFlagInfoPresentFlag; 110 #endif 102 111 103 112 // VPS VUI … … 105 114 Bool m_crossLayerPicTypeAlignedFlag; 106 115 Bool m_crossLayerIrapAlignedFlag; 116 #if H_MV_HLS_7_MISC_P0068_21 117 Bool m_allLayersIdrAlignedFlag; 118 #endif 107 119 Bool m_bitRatePresentVpsFlag; 108 120 Bool m_picRatePresentVpsFlag; … … 259 271 Bool m_bPCMInputBitDepthFlag; ///< 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth. 260 272 261 // coding tool (lossless) 262 Bool m_useLossless; ///< flag for using lossless coding 273 // coding tool (SAO) 263 274 #if H_MV 264 275 std::vector<Bool> m_bUseSAO; … … 268 279 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture 269 280 Bool m_saoLcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas 270 Bool m_saoLcuBasedOptimization; ///< SAO LCU-based optimization271 281 // coding tools (loop filter) 272 282 #if H_MV … … 288 298 289 299 // coding tools (encoder-only parameters) 290 Bool m_bUseSBACRD; ///< flag for using RD optimization based on SBAC291 300 Bool m_bUseASR; ///< flag for using adaptive motion search range 292 301 Bool m_bUseHADME; ///< flag for using HAD in sub-pel ME … … 372 381 Int m_TMVPModeId; 373 382 Int m_signHideFlag; 374 #if RATE_CONTROL_LAMBDA_DOMAIN375 383 Bool m_RCEnableRateControl; ///< enable rate control or not 376 384 Int m_RCTargetBitrate; ///< target bitrate when rate control is enabled 377 #if M0036_RC_IMPROVEMENT378 385 Int m_RCKeepHierarchicalBit; ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation 379 #else380 Bool m_RCKeepHierarchicalBit; ///< whether keeping hierarchical bit allocation structure or not381 #endif382 386 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control 383 387 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level … … 392 396 UInt m_depthMADPred; 393 397 #endif 394 #else395 Bool m_enableRateCtrl; ///< Flag for using rate control algorithm396 Int m_targetBitrate; ///< target bitrate397 Int m_numLCUInUnit; ///< Total number of LCUs in a frame should be completely divided by the NumLCUInUnit398 399 #if KWU_RC_VIEWRC_E0227400 vector<Int> m_viewTargetBits;401 Bool m_viewWiseRateCtrl; ///< Flag for using view-wise rate control402 #endif403 #if KWU_RC_MADPRED_E0227404 UInt m_depthMADPred;405 #endif406 #endif407 398 Int m_useScalingListId; ///< using quantization matrix 408 399 Char* m_scalingListFile; ///< quantization matrix file name 409 400 410 401 Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. 411 Bool m_CUTransquantBypassFlag Value; ///< if transquant_bypass_enable_flag, the fixed value to use for the per-CU cu_transquant_bypass_flag.402 Bool m_CUTransquantBypassFlagForce; ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true. 412 403 413 404 Bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value … … 449 440 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 450 441 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 451 442 #if H_MV_HLS_7_SEI_P0204_26 443 Bool m_subBistreamPropSEIEnabled; 444 Int m_sbPropNumAdditionalSubStreams; 445 std::vector<Int> m_sbPropSubBitstreamMode; 446 std::vector<Int> m_sbPropOutputLayerSetIdxToVps; 447 std::vector<Int> m_sbPropHighestSublayerId; 448 std::vector<Int> m_sbPropAvgBitRate; 449 std::vector<Int> m_sbPropMaxBitRate; 450 #endif 452 451 #if H_3D 453 452 // Camera parameters -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 127 127 xSetRepFormat ( vps ); 128 128 xSetLayerSets ( vps ); 129 #if H_MV_HLS_7_FIX_SET_DPB_SIZE 130 xSetDpbSize ( vps ); 131 #endif 129 132 xSetVPSVUI ( vps ); 130 133 #if H_3D … … 309 312 #endif 310 313 311 Int lowestQP;312 lowestQP = - 6*(g_bitDepthY - 8); // XXX: check313 314 #if H_MV315 if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layerIdInVps] == lowestQP) && (m_useLossless == true))316 #else317 if ((m_iMaxDeltaQP == 0 ) && (m_iQP == lowestQP) && (m_useLossless == true))318 #endif319 {320 m_bUseAdaptiveQP = false;321 }322 314 m_cTEncTop.setUseAdaptiveQP ( m_bUseAdaptiveQP ); 323 315 m_cTEncTop.setQPAdaptationRange ( m_iQPAdaptationRange ); 324 316 325 317 //====== Tool list ======== 326 m_cTEncTop.setUseSBACRD ( m_bUseSBACRD );327 318 m_cTEncTop.setDeltaQpRD ( m_uiDeltaQpRD ); 328 319 m_cTEncTop.setUseASR ( m_bUseASR ); 329 320 m_cTEncTop.setUseHADME ( m_bUseHADME ); 330 m_cTEncTop.setUseLossless ( m_useLossless );331 321 #if H_MV 332 322 m_cTEncTop.setdQPs ( m_aidQP[layerIdInVps] ); … … 396 386 397 387 m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary); 398 m_cTEncTop.setSaoLcuBasedOptimization (m_saoLcuBasedOptimization);399 388 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 400 389 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); … … 440 429 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 441 430 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 431 #if H_MV_HLS_7_SEI_P0204_26 432 m_cTEncTop.setSubBitstreamPropSEIEnabled( m_subBistreamPropSEIEnabled ); 433 if( m_subBistreamPropSEIEnabled ) 434 { 435 m_cTEncTop.setNumAdditionalSubStreams ( m_sbPropNumAdditionalSubStreams ); 436 m_cTEncTop.setSubBitstreamMode ( m_sbPropSubBitstreamMode ); 437 m_cTEncTop.setOutputLayerSetIdxToVps ( m_sbPropOutputLayerSetIdxToVps ); 438 m_cTEncTop.setHighestSublayerId ( m_sbPropHighestSublayerId ); 439 m_cTEncTop.setAvgBitRate ( m_sbPropAvgBitRate ); 440 m_cTEncTop.setMaxBitRate ( m_sbPropMaxBitRate ); 441 } 442 #endif 442 443 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 443 444 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 461 462 m_cTEncTop.setScalingListFile ( m_scalingListFile ); 462 463 m_cTEncTop.setSignHideFlag(m_signHideFlag); 463 #if RATE_CONTROL_LAMBDA_DOMAIN464 464 #if KWU_RC_VIEWRC_E0227 || KWU_RC_MADPRED_E0227 465 465 if(!m_cTEncTop.getIsDepth()) //only for texture … … 482 482 m_cTEncTop.setInitialQP ( m_RCInitialQP ); 483 483 m_cTEncTop.setForceIntraQP ( m_RCForceIntraQP ); 484 485 484 #if KWU_RC_MADPRED_E0227 486 485 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth()) 487 486 { 488 487 m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_depthMADPred : 0); 489 490 488 if(m_cTEncTop.getUseDepthMADPred()) 491 489 { … … 498 496 { 499 497 m_cTEncTop.setUseViewWiseRateCtrl(m_viewWiseRateCtrl); 500 501 498 if(m_iNumberOfViews == 1) 502 499 { … … 552 549 } 553 550 #endif 554 #else555 #if KWU_RC_VIEWRC_E0227 || KWU_RC_MADPRED_E0227556 if(!m_cTEncTop.getIsDepth()) //only for texture557 {558 m_cTEncTop.setUseRateCtrl ( m_enableRateCtrl );559 m_cTEncTop.setTargetBitrate ( m_targetBitrate );560 m_cTEncTop.setNumLCUInUnit ( m_numLCUInUnit);561 }562 else563 {564 m_cTEncTop.setUseRateCtrl ( 0 );565 }566 #else567 m_cTEncTop.setUseRateCtrl ( m_enableRateCtrl );568 m_cTEncTop.setTargetBitrate ( m_targetBitrate );569 m_cTEncTop.setNumLCUInUnit ( m_numLCUInUnit);570 #endif571 572 573 #if KWU_RC_MADPRED_E0227574 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())575 {576 m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_depthMADPred : 0);577 578 if(m_cTEncTop.getUseDepthMADPred())579 {580 m_cTEncTop.setCamParam(&m_cCameraData);581 }582 }583 #endif584 585 #if KWU_RC_VIEWRC_E0227586 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())587 {588 m_cTEncTop.setUseViewWiseRateCtrl(m_viewWiseRateCtrl);589 if(m_iNumberOfViews == 1)590 {591 if(m_viewWiseRateCtrl)592 {593 m_cTEncTop.setTargetBitrate(m_viewTargetBits[layerIdInVps>>1]);594 }595 else596 {597 m_cTEncTop.setTargetBitrate ( m_targetBitrate );598 }599 }600 else601 {602 if(m_viewWiseRateCtrl)603 {604 m_cTEncTop.setTargetBitrate(m_viewTargetBits[layerIdInVps>>1]);605 }606 else607 {608 if(m_iNumberOfViews == 2)609 {610 if(m_cTEncTop.getViewId() == 0)611 {612 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*80)/100 );613 }614 else if(m_cTEncTop.getViewId() == 1)615 {616 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*20)/100 );617 }618 }619 else if(m_iNumberOfViews == 3)620 {621 if(m_cTEncTop.getViewId() == 0)622 {623 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*66)/100 );624 }625 else if(m_cTEncTop.getViewId() == 1)626 {627 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*17)/100 );628 }629 else if(m_cTEncTop.getViewId() == 2)630 {631 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*17)/100 );632 }633 }634 else635 {636 m_cTEncTop.setTargetBitrate ( m_targetBitrate );637 }638 }639 }640 }641 #endif642 #endif643 551 m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); 644 m_cTEncTop.setCUTransquantBypassFlag Value(m_CUTransquantBypassFlagValue);552 m_cTEncTop.setCUTransquantBypassFlagForceValue(m_CUTransquantBypassFlagForce); 645 553 m_cTEncTop.setUseRecalculateQPAccordingToLambda( m_recalculateQPAccordingToLambda ); 646 554 m_cTEncTop.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); … … 932 840 } 933 841 934 #if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_FIX_URQ935 for(Int layer=0; layer < m_numberOfLayers; layer++ )936 {937 if(m_acTEncTopList[layer]->getUseRateCtrl() && !m_acTEncTopList[layer]->getIsDepth())938 {939 m_acTEncTopList[layer]->getRateCtrl()->updateRCGOPStatus();940 }941 }942 #endif943 944 842 gopSize = maxGopSize; 945 843 } … … 1203 1101 rateStatsAccum(au, stats); 1204 1102 } 1205 #endif 1103 #endif 1206 1104 } 1207 1105 } … … 1221 1119 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1222 1120 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1223 case NAL_UNIT_CODED_SLICE_T LA_R:1121 case NAL_UNIT_CODED_SLICE_TSA_R: 1224 1122 case NAL_UNIT_CODED_SLICE_TSA_N: 1225 1123 case NAL_UNIT_CODED_SLICE_STSA_R: … … 1608 1506 } 1609 1507 1508 #if H_MV_HLS_7_FIX_SET_DPB_SIZE 1509 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1510 { 1511 // These settings need to be verified 1512 1513 TComDpbSize* dpbSize = vps.getDpbSize(); 1514 1515 assert ( dpbSize != 0 ); 1516 1517 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1518 { 1519 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1520 Bool subLayerFlagInfoPresentFlag = false; 1521 1522 #if H_MV_HLS_7_HRD_P0156_7 1523 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1524 #else 1525 for( Int j = 0; j <= vps.getMaxTLayers() - 1 ; j++ ) 1526 #endif 1527 { 1528 Bool subLayerDpbInfoPresentFlag = false; 1529 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1530 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1531 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1532 #else 1533 assert( vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ) == targetDecLayerIdList.size() ); 1534 for( Int k = 0; k < vps.getNumSubDpbs( vps.getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1535 #endif 1536 { 1537 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1538 #if H_MV_HLS7_GEN 1539 // TBD. Some derivation based on output layer set might be added here. 1540 #endif 1541 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1542 if ( j > 0 ) 1543 { 1544 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) ); 1545 } 1546 } 1547 1548 Int maxNumReorderPics = MIN_INT; 1549 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ ) 1550 { 1551 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] ); 1552 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1553 } 1554 assert( maxNumReorderPics != MIN_INT ); 1555 1556 dpbSize->setMaxVpsNumReorderPics( i, j, maxNumReorderPics ); 1557 if ( j > 0 ) 1558 { 1559 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsNumReorderPics( i, j ) != dpbSize->getMaxVpsNumReorderPics( i, j - 1 ) ); 1560 } 1561 1562 // To Be Done ! 1563 // dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, xx ); 1564 if ( j > 0 ) 1565 { 1566 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ) != dpbSize->getMaxVpsLatencyIncreasePlus1( i, j - 1 ) ); 1567 } 1568 1569 if( j > 0 ) 1570 { 1571 dpbSize->setSubLayerDpbInfoPresentFlag( i, j, subLayerDpbInfoPresentFlag ); 1572 subLayerFlagInfoPresentFlag = subLayerFlagInfoPresentFlag || subLayerDpbInfoPresentFlag; 1573 } 1574 } 1575 dpbSize->setSubLayerFlagInfoPresentFlag( i, subLayerFlagInfoPresentFlag ); 1576 } 1577 } 1578 #else 1610 1579 Void TAppEncTop::xSetDpbSize ( TComVPS& vps ) 1611 1580 { … … 1620 1589 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1621 1590 dpbSize->setSubLayerFlagInfoPresentFlag( i, m_subLayerFlagInfoPresentFlag ); 1622 1623 1591 if ( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ) 1624 1592 { … … 1663 1631 } 1664 1632 } 1665 1633 #endif 1666 1634 1667 1635 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1669 1637 // Layer sets 1670 1638 vps.setVpsNumLayerSetsMinus1 ( m_vpsNumLayerSets - 1 ); 1639 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1671 1640 vps.setVpsNumberLayerSetsMinus1( vps.getVpsNumLayerSetsMinus1() ); 1641 #endif 1672 1642 1673 1643 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) … … 1686 1656 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1687 1657 // Additional output layer sets + profileLevelTierIdx 1658 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1659 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1660 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1661 vps.initTargetLayerIdLists(); 1662 #else 1688 1663 vps.setDefaultOneTargetOutputLayerIdc ( m_defaultOneTargetOutputLayerIdc ); 1689 1664 vps.setMoreOutputLayerSetsThanDefaultFlag( numAddOuputLayerSets != 0 ); 1690 1665 vps.setNumAddOutputLayerSetsMinus1 ( numAddOuputLayerSets - 1 ); 1691 1692 1693 1666 #endif 1667 1668 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1669 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++) 1670 { 1671 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets; 1672 1673 vps.setOutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1674 1675 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.getLayerSetIdxForOutputLayerSet( olsIdx ) ]; 1676 1677 if (vps.getDefaultTargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1678 { 1679 for ( Int i = 0; i < layerIdList.size(); i++) 1680 { 1681 vps.setOutputLayerFlag( olsIdx, i, ( olsIdx == 0 && i == 0 ) ? vps.inferOutputLayerFlag(olsIdx, i ) : false ); // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred for this case ! 1682 } 1683 1684 std::vector<Int>& outLayerIdList = ( addOutLsIdx >= 0 ) ? m_layerIdsInAddOutputLayerSet[addOutLsIdx] : m_layerIdsInDefOutputLayerSet[olsIdx]; 1685 1686 Bool outputLayerInLayerSetFlag = false; 1687 for (Int j = 0; j < outLayerIdList.size(); j++) 1688 { 1689 for (Int i = 0; i < layerIdList.size(); i++ ) 1690 { 1691 if ( layerIdList[ i ] == outLayerIdList[ j ] ) 1692 { 1693 vps.setOutputLayerFlag( olsIdx, i, true ); 1694 outputLayerInLayerSetFlag = true; 1695 break; 1696 } 1697 } 1698 assert( outputLayerInLayerSetFlag ); // The output layer is not not in the layer set. 1699 } 1700 } 1701 else 1702 { 1703 for ( Int i = 0; i < layerIdList.size(); i++) 1704 { 1705 vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) ); 1706 } 1707 } 1708 1709 vps.deriveTargetLayerIdList( olsIdx ); 1710 1711 if ( olsIdx > 0 ) 1712 { 1713 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 1714 } 1715 1716 vps.setAltOutputLayerFlag( olsIdx , false); 1717 } 1718 #else 1694 1719 for (Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++) 1695 1720 { … … 1729 1754 } 1730 1755 vps.deriveTargetLayerIdLists(); 1756 #endif 1731 1757 } 1732 1758 … … 1735 1761 vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 1736 1762 1763 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1764 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1765 assert( pcVPSVUI ); 1766 #endif 1767 1737 1768 if ( m_vpsVuiPresentFlag ) 1738 1769 { 1770 #if !H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1739 1771 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1740 1772 1741 1773 assert( pcVPSVUI ); 1742 1774 #endif 1743 1775 1744 1776 // All this stuff could actually be derived by the encoder, … … 1747 1779 pcVPSVUI->setCrossLayerPicTypeAlignedFlag( m_crossLayerPicTypeAlignedFlag ); 1748 1780 pcVPSVUI->setCrossLayerIrapAlignedFlag ( m_crossLayerIrapAlignedFlag ); 1749 1781 #if H_MV_HLS_7_MISC_P0068_21 1782 pcVPSVUI->setAllLayersIdrAlignedFlag ( m_allLayersIdrAlignedFlag ); 1783 #endif 1750 1784 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); 1751 1785 pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag ); … … 1753 1787 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1754 1788 { 1789 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1790 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ ) 1791 #else 1755 1792 for( Int i = 0; i <= vps.getVpsNumberLayerSetsMinus1(); i++ ) 1793 #endif 1756 1794 { 1757 1795 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 1871 1909 pcVPSVUI->setVpsVuiBspHrdPresentFlag( false ); // TBD 1872 1910 } 1911 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1912 else 1913 { 1914 pcVPSVUI->setCrossLayerIrapAlignedFlag ( false ); 1915 } 1916 #endif 1873 1917 } 1874 1918 #endif … … 1963 2007 } 1964 2008 #endif 1965 1966 2009 //! \} -
trunk/source/App/TAppEncoder/TAppEncTop.h
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/TAppEncoder/encmain.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/ExtractBitrates.cpp
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/ExtractBitrates.h
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/ExtractBitratesMain.cpp
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.cpp
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiers.h
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/GuessLambdaModifiersMain.cpp
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/RuntimeError.h
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/BitrateTargeting/encode.shl
r56 r872 4 4 # granted under this license. 5 5 # 6 # Copyright (c) 2010-201 2, ITU/ISO/IEC6 # Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 # All rights reserved. 8 8 # -
trunk/source/App/utils/BitrateTargeting/encodeCommand.sh
r56 r872 6 6 # granted under this license. 7 7 # 8 # Copyright (c) 2010-201 2, ITU/ISO/IEC8 # Copyright (c) 2010-2014, ITU/ISO/IEC 9 9 # All rights reserved. 10 10 # -
trunk/source/App/utils/BitrateTargeting/makefile
r56 r872 4 4 # granted under this license. 5 5 # 6 # Copyright (c) 2010-201 2, ITU/ISO/IEC6 # Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 # All rights reserved. 8 8 # -
trunk/source/App/utils/BitrateTargeting/targetBitrates.sh
r56 r872 6 6 # granted under this license. 7 7 # 8 # Copyright (c) 2010-201 2, ITU/ISO/IEC8 # Copyright (c) 2010-2014, ITU/ISO/IEC 9 9 # All rights reserved. 10 10 # -
trunk/source/App/utils/annexBbytecount.cpp
r56 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/App/utils/convert_NtoMbit_YCbCr.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 *
Note: See TracChangeset for help on using the changeset viewer.