Changeset 644 in SHVCSoftware for trunk/source/Lib/TLibCommon/TComSlice.cpp
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-5.1-dev (added) merged: 599-600,602-643
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev/source merged: 601 /branches/SHM-5.1-dev/source (added) merged: 600,602-643
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibCommon/TComSlice.cpp
r597 r644 111 111 , m_bCrossLayerBLAFlag ( false ) 112 112 #endif 113 #if NO_OUTPUT_OF_PRIOR_PICS 114 , m_noOutputOfPriorPicsFlag ( false ) 115 , m_noRaslOutputFlag ( false ) 116 , m_handleCraAsBlaFlag ( false ) 117 #endif 118 #if POC_RESET_IDC_SIGNALLING 119 , m_pocResetIdc ( 0 ) 120 , m_pocResetPeriodId ( 0 ) 121 , m_fullPocResetFlag ( false ) 122 , m_pocLsbVal ( 0 ) 123 , m_pocMsbVal ( 0 ) 124 , m_pocMsbValRequiredFlag ( false ) 125 , m_pocMsbValPresentFlag ( false ) 126 #endif 113 127 #endif //SVC_EXTENSION 114 128 { … … 120 134 m_interLayerPredEnabledFlag = 0; 121 135 ::memset( m_interLayerPredLayerIdc, 0, sizeof(m_interLayerPredLayerIdc) ); 136 #if P0312_VERT_PHASE_ADJ 137 ::memset( m_vertPhasePositionFlag, 0, sizeof(m_vertPhasePositionFlag) ); 138 #endif 122 139 #endif //SVC_EXTENSION 123 140 … … 194 211 || getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; 195 212 } 213 #if NO_OUTPUT_OF_PRIOR_PICS 214 Bool TComSlice::getBlaPicFlag () 215 { 216 return getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 217 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 218 || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP; 219 } 220 Bool TComSlice::getCraPicFlag () 221 { 222 return getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA; 223 } 224 #endif 196 225 197 226 /** … … 848 877 849 878 #if SVC_EXTENSION 850 if( m_eSliceType == I_SLICE || ( m_ pcSPS->getLayerId()&&879 if( m_eSliceType == I_SLICE || ( m_layerId && 851 880 (m_eNalUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP) && 852 881 (m_eNalUnitType <= NAL_UNIT_CODED_SLICE_CRA) ) ) … … 872 901 { 873 902 numRpsCurrTempList += m_activeNumILRRefIdx; 874 }903 } 875 904 #endif 876 905 … … 1105 1134 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; 1106 1135 memcpy( m_interLayerPredLayerIdc, pSrc->m_interLayerPredLayerIdc, sizeof( m_interLayerPredLayerIdc ) ); 1136 #if P0312_VERT_PHASE_ADJ 1137 memcpy( m_vertPhasePositionFlag, pSrc->m_vertPhasePositionFlag, sizeof( m_vertPhasePositionFlag ) ); 1138 #endif 1107 1139 #endif 1108 1140 m_pcSPS = pSrc->m_pcSPS; … … 1389 1421 Int i, isReference; 1390 1422 1423 #if !ALIGNED_BUMPING 1391 1424 checkLeadingPictureRestrictions(rcListPic); 1425 #endif 1392 1426 1393 1427 // loop through all pictures in the reference picture buffer … … 2071 2105 m_crossLayerIrapAlignFlag = true; 2072 2106 #endif 2107 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG 2108 m_crossLayerAlignedIdrOnlyFlag = false; 2109 #endif 2073 2110 #if N0120_MAX_TID_REF_PRESENT_FLAG 2074 2111 m_maxTidRefPresentFlag = true; … … 2455 2492 return -1; // Layer not found 2456 2493 } 2494 #if O0164_MULTI_LAYER_HRD 2495 Void TComVPS::setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ) 2496 { 2497 if( !getVpsVuiBspHrdPresentFlag() ) 2498 { 2499 return; 2500 } 2501 2502 TComHRD *hrd = getBspHrd(hrdIdx); 2503 2504 Bool rateCnt = ( bitRate > 0 ); 2505 hrd->setNalHrdParametersPresentFlag( rateCnt ); 2506 hrd->setVclHrdParametersPresentFlag( rateCnt ); 2507 2508 hrd->setSubPicCpbParamsPresentFlag( ( numDU > 1 ) ); 2509 2510 if( hrd->getSubPicCpbParamsPresentFlag() ) 2511 { 2512 hrd->setTickDivisorMinus2( 100 - 2 ); // 2513 hrd->setDuCpbRemovalDelayLengthMinus1( 7 ); // 8-bit precision ( plus 1 for last DU in AU ) 2514 hrd->setSubPicCpbParamsInPicTimingSEIFlag( true ); 2515 hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 ); // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay 2516 } 2517 else 2518 { 2519 hrd->setSubPicCpbParamsInPicTimingSEIFlag( false ); 2520 } 2521 2522 hrd->setBitRateScale( 4 ); // in units of 2~( 6 + 4 ) = 1,024 bps 2523 hrd->setCpbSizeScale( 6 ); // in units of 2~( 4 + 4 ) = 1,024 bit 2524 hrd->setDuCpbSizeScale( 6 ); // in units of 2~( 4 + 4 ) = 1,024 bit 2525 2526 hrd->setInitialCpbRemovalDelayLengthMinus1(15); // assuming 0.5 sec, log2( 90,000 * 0.5 ) = 16-bit 2527 if( randomAccess ) 2528 { 2529 hrd->setCpbRemovalDelayLengthMinus1(5); // 32 = 2^5 (plus 1) 2530 hrd->setDpbOutputDelayLengthMinus1 (5); // 32 + 3 = 2^6 2531 } 2532 else 2533 { 2534 hrd->setCpbRemovalDelayLengthMinus1(9); // max. 2^10 2535 hrd->setDpbOutputDelayLengthMinus1 (9); // max. 2^10 2536 } 2537 2538 /* 2539 Note: only the case of "vps_max_temporal_layers_minus1 = 0" is supported. 2540 */ 2541 Int i, j; 2542 UInt birateValue, cpbSizeValue; 2543 UInt ducpbSizeValue; 2544 UInt duBitRateValue = 0; 2545 2546 for( i = 0; i < MAX_TLAYER; i ++ ) 2547 { 2548 hrd->setFixedPicRateFlag( i, 1 ); 2549 hrd->setPicDurationInTcMinus1( i, 0 ); 2550 hrd->setLowDelayHrdFlag( i, 0 ); 2551 hrd->setCpbCntMinus1( i, 0 ); 2552 2553 birateValue = bitRate; 2554 cpbSizeValue = bitRate; // 1 second 2555 ducpbSizeValue = bitRate/numDU; 2556 duBitRateValue = bitRate; 2557 for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ ) 2558 { 2559 hrd->setBitRateValueMinus1( i, j, 0, ( birateValue - 1 ) ); 2560 hrd->setCpbSizeValueMinus1( i, j, 0, ( cpbSizeValue - 1 ) ); 2561 hrd->setDuCpbSizeValueMinus1( i, j, 0, ( ducpbSizeValue - 1 ) ); 2562 hrd->setCbrFlag( i, j, 0, ( j == 0 ) ); 2563 2564 hrd->setBitRateValueMinus1( i, j, 1, ( birateValue - 1) ); 2565 hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) ); 2566 hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) ); 2567 hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) ); 2568 hrd->setCbrFlag( i, j, 1, ( j == 0 ) ); 2569 } 2570 } 2571 } 2572 #endif 2457 2573 // RepFormat Assignment operator 2458 2574 RepFormat& RepFormat::operator= (const RepFormat &other) … … 2548 2664 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2549 2665 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2666 2667 #if P0312_VERT_PHASE_ADJ 2668 ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag)); 2669 #endif 2550 2670 } 2551 2671 … … 2736 2856 , m_scalingListRefLayerId ( 0 ) 2737 2857 #endif 2858 #if POC_RESET_IDC 2859 , m_pocResetInfoPresentFlag (false) 2860 #endif 2738 2861 { 2739 2862 m_scalingList = new TComScalingList; … … 3405 3528 //set reference picture POC of each ILP reference 3406 3529 Int thePoc = ilpPic[refLayerIdc]->getPOC(); 3407 assert(thePoc >= 0);3408 3530 assert(thePoc == pcRefPicBL->getPOC()); 3409 3531
Note: See TracChangeset for help on using the changeset viewer.