Changeset 302 in SHVCSoftware for branches/SHM-2.1-dev/source/Lib/TLibCommon
- Timestamp:
- 28 Jun 2013, 00:40:00 (12 years ago)
- Location:
- branches/SHM-2.1-dev/source/Lib/TLibCommon
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.1-dev/source/Lib/TLibCommon/CommonDef.h
r194 r302 56 56 // ==================================================================================================================== 57 57 58 #if SVC_EXTENSION 58 59 #define NV_VERSION "2.1" ///< Current software version 60 #else 61 #define NV_VERSION "11.0" ///< Current software version 62 #endif 59 63 60 64 // ==================================================================================================================== … … 110 114 #define MAX_NUM_REF_PICS 16 ///< max. number of pictures used for reference 111 115 #define MAX_NUM_REF 16 ///< max. number of entries in picture reference list 112 #if !L0034_COMBINED_LIST_CLEANUP113 #define MAX_NUM_REF_LC MAX_NUM_REF_PICS // TODO: remove this macro definition (leftover from combined list concept)114 #endif115 116 116 117 #define MAX_UINT 0xFFFFFFFFU ///< max. value of unsigned 32-bit integer -
branches/SHM-2.1-dev/source/Lib/TLibCommon/NAL.h
r191 r302 91 91 || m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R; 92 92 } 93 #if L0045_NON_NESTED_SEI_RESTRICTIONS94 93 Bool isSei() 95 94 { … … 102 101 return ( (UInt)m_nalUnitType < 32 ); 103 102 } 104 #endif105 103 }; 106 104 -
branches/SHM-2.1-dev/source/Lib/TLibCommon/SEI.cpp
r189 r302 39 39 #include "SEI.h" 40 40 41 #if J0149_TONE_MAPPING_SEI42 41 //Table D-7 Meaning of camera iso sensitivity indicator and exposure index rating indicator 43 42 Int Table_exp_indicator[32] = {0, 10, 12, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 8000, -1}; 44 #endif45 43 46 44 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType) -
branches/SHM-2.1-dev/source/Lib/TLibCommon/SEI.h
r292 r302 127 127 128 128 SEIActiveParameterSets() 129 #if !L0047_APS_FLAGS130 :numSpsIdsMinus1(0)131 #else132 129 : activeVPSId (0) 133 130 , m_fullRandomAccessFlag (false) 134 131 , m_noParamSetUpdateFlag (false) 135 132 , numSpsIdsMinus1 (0) 136 #endif137 133 {} 138 134 virtual ~SEIActiveParameterSets() {} 139 135 140 136 Int activeVPSId; 141 #if L0047_APS_FLAGS142 137 Bool m_fullRandomAccessFlag; 143 138 Bool m_noParamSetUpdateFlag; 144 #endif145 139 Int numSpsIdsMinus1; 146 140 std::vector<Int> activeSeqParamSetId; … … 153 147 154 148 SEIBufferingPeriod() 155 #if L0044_CPB_DPB_DELAY_OFFSET156 149 : m_bpSeqParameterSetId (0) 157 150 , m_rapCpbParamsPresentFlag (false) … … 164 157 ::memset(m_initialAltCpbRemovalDelayOffset, 0, sizeof(m_initialAltCpbRemovalDelayOffset)); 165 158 } 166 #else167 {}168 #endif169 159 virtual ~SEIBufferingPeriod() {} 170 160 171 161 UInt m_bpSeqParameterSetId; 172 162 Bool m_rapCpbParamsPresentFlag; 173 #if L0044_CPB_DPB_DELAY_OFFSET174 163 Bool m_cpbDelayOffset; 175 164 Bool m_dpbDelayOffset; 176 #endif177 165 UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; 178 166 UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; 179 167 UInt m_initialAltCpbRemovalDelay [MAX_CPB_CNT][2]; 180 168 UInt m_initialAltCpbRemovalDelayOffset[MAX_CPB_CNT][2]; 181 #if L0328_SPLICING182 169 Bool m_concatenationFlag; 183 170 UInt m_auCpbRemovalDelayDelta; 184 #endif185 171 }; 186 172 class SEIPictureTiming : public SEI … … 191 177 SEIPictureTiming() 192 178 : m_picStruct (0) 193 #if L0046_RENAME_PROG_SRC_IDC194 179 , m_sourceScanType (0) 195 #else196 , m_progressiveSourceIdc (0)197 #endif198 180 , m_duplicateFlag (false) 199 #if L0044_DU_DPB_OUTPUT_DELAY_HRD200 181 , m_picDpbOutputDuDelay (0) 201 #endif202 182 , m_numNalusInDuMinus1 (NULL) 203 183 , m_duCpbRemovalDelayMinus1 (NULL) … … 216 196 217 197 UInt m_picStruct; 218 #if L0046_RENAME_PROG_SRC_IDC219 198 UInt m_sourceScanType; 220 #else221 UInt m_progressiveSourceIdc;222 #endif223 199 Bool m_duplicateFlag; 224 200 225 201 UInt m_auCpbRemovalDelay; 226 202 UInt m_picDpbOutputDelay; 227 #if L0044_DU_DPB_OUTPUT_DELAY_HRD228 203 UInt m_picDpbOutputDuDelay; 229 #endif230 204 UInt m_numDecodingUnitsMinus1; 231 205 Bool m_duCommonCpbRemovalDelayFlag; … … 243 217 : m_decodingUnitIdx(0) 244 218 , m_duSptCpbRemovalDelay(0) 245 #if L0044_DU_DPB_OUTPUT_DELAY_HRD246 219 , m_dpbOutputDuDelayPresentFlag(false) 247 220 , m_picSptDpbOutputDuDelay(0) 248 #endif249 221 {} 250 222 virtual ~SEIDecodingUnitInfo() {} 251 223 Int m_decodingUnitIdx; 252 224 Int m_duSptCpbRemovalDelay; 253 #if L0044_DU_DPB_OUTPUT_DELAY_HRD254 225 Bool m_dpbOutputDuDelayPresentFlag; 255 226 Int m_picSptDpbOutputDuDelay; 256 #endif257 227 }; 258 228 … … 293 263 Int m_frame1GridPositionY; 294 264 Int m_arrangementReservedByte; 295 #if L0045_PERSISTENCE_FLAGS296 265 Bool m_arrangementPersistenceFlag; 297 #else298 Int m_arrangementRepetetionPeriod;299 #endif300 266 Bool m_upsampledAspectRatio; 301 267 }; … … 308 274 SEIDisplayOrientation() 309 275 : cancelFlag(true) 310 #if L0045_PERSISTENCE_FLAGS311 276 , persistenceFlag(0) 312 #else313 , repetitionPeriod(1)314 #endif315 277 , extensionFlag(false) 316 278 {} … … 322 284 323 285 UInt anticlockwiseRotation; 324 #if L0045_PERSISTENCE_FLAGS325 286 Bool persistenceFlag; 326 #else327 UInt repetitionPeriod;328 #endif329 287 Bool extensionFlag; 330 288 }; … … 373 331 #endif 374 332 375 #if L0208_SOP_DESCRIPTION_SEI376 333 class SEISOPDescription : public SEI 377 334 { … … 390 347 Int m_sopDescPocDelta[MAX_NUM_PICS_IN_SOP]; 391 348 }; 392 #endif 393 394 #if J0149_TONE_MAPPING_SEI 349 395 350 class SEIToneMappingInfo : public SEI 396 351 { … … 425 380 Int m_extendedWhiteLevelLumaCodeValue; 426 381 }; 427 #endif428 382 429 383 typedef std::list<SEI*> SEIMessages; … … 438 392 Void deleteSEIs (SEIMessages &seiList); 439 393 440 #if K0180_SCALABLE_NESTING_SEI441 394 class SEIScalableNesting : public SEI 442 395 { … … 468 421 SEIMessages m_nestedSEIs; 469 422 }; 470 #endif471 423 472 424 //! \} -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComBitStream.h
r191 r302 193 193 } 194 194 195 Void peekPreviousByte( UInt &byte ) 196 { 197 assert(m_fifo_idx > 0); 198 byte = (*m_fifo)[m_fifo_idx - 1]; 199 } 200 195 201 Void readOutTrailingBits (); 196 202 UChar getHeldBits () { return m_held_bits; } -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComDataCU.cpp
r291 r302 589 589 } 590 590 591 UInt uiTmp = uhWidth*uhHeight;592 593 591 if(getPic()->getPicSym()->getInverseCUOrderMap(getAddr())*m_pcPic->getNumPartInCU()+m_uiAbsIdxInLCU >= getSlice()->getSliceSegmentCurStartCUAddr()) 594 592 { 595 593 m_acCUMvField[0].clearMvField(); 596 594 m_acCUMvField[1].clearMvField(); 597 uiTmp = uhWidth*uhHeight;595 UInt uiTmp = uhWidth*uhHeight; 598 596 599 597 memset( m_pcTrCoeffY, 0, uiTmp * sizeof( *m_pcTrCoeffY ) ); … … 794 792 m_uiCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 795 793 796 UInt uiWidth = g_uiMaxCUWidth >> uiDepth;797 UInt uiHeight = g_uiMaxCUHeight >> uiDepth;798 799 794 m_skipFlag=pcCU->getSkipFlag() + uiPart; 800 795 … … 838 833 m_apcCUColocated[1] = pcCU->getCUColocated(REF_PIC_LIST_1); 839 834 840 UInt uiTmp = uiWidth*uiHeight;841 835 UInt uiMaxCuWidth=pcCU->getSlice()->getSPS()->getMaxCUWidth(); 842 836 UInt uiMaxCuHeight=pcCU->getSlice()->getSPS()->getMaxCUHeight(); … … 850 844 m_pcIPCMSampleY = pcCU->getPCMSampleY() + uiCoffOffset; 851 845 852 uiTmp >>= 2;853 846 uiCoffOffset >>=2; 854 847 m_pcTrCoeffCb=pcCU->getCoeffCb() + uiCoffOffset; … … 1577 1570 return getSlice()->getSliceQp(); 1578 1571 } 1579 else 1580 if ( iLastValidPartIdx >= 0 ) 1572 else if ( iLastValidPartIdx >= 0 ) 1581 1573 { 1582 1574 return getQP( iLastValidPartIdx ); … … 2860 2852 //>> MTK colocated-RightBottom 2861 2853 UInt uiPartIdxRB; 2862 Int uiLCUIdx = getAddr();2863 2854 2864 2855 deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); … … 2869 2860 TComMv cColMv; 2870 2861 Int iRefIdx; 2862 Int uiLCUIdx = -1; 2871 2863 2872 2864 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 2873 2865 { 2874 uiLCUIdx = -1;2875 2866 } 2876 2867 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 2877 2868 { 2878 uiLCUIdx = -1;2879 2869 } 2880 2870 else … … 2889 2879 { 2890 2880 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 2891 uiLCUIdx = -1 ;2892 2881 } 2893 2882 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU … … 2899 2888 { 2900 2889 uiAbsPartAddr = 0; 2901 uiLCUIdx = -1 ;2902 2890 } 2903 2891 } … … 3163 3151 if (!bAdded) 3164 3152 { 3165 bAdded =xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLB, MD_LEFT );3153 xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLB, MD_LEFT ); 3166 3154 } 3167 3155 } … … 3176 3164 if(!bAdded) 3177 3165 { 3178 bAdded =xAddMVPCand( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT);3166 xAddMVPCand( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT); 3179 3167 } 3180 3168 bAdded = bAddedSmvp; … … 3191 3179 if(!bAdded) 3192 3180 { 3193 bAdded =xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT);3181 xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT); 3194 3182 } 3195 3183 } … … 3211 3199 UInt uiAbsPartIdx; 3212 3200 UInt uiAbsPartAddr; 3213 Int uiLCUIdx = getAddr();3214 3201 3215 3202 deriveRightBottomIdx( uiPartIdx, uiPartIdxRB ); … … 3218 3205 //---- co-located RightBottom Temporal Predictor (H) ---// 3219 3206 uiAbsPartIdx = g_auiZscanToRaster[uiPartIdxRB]; 3207 Int uiLCUIdx = -1; 3220 3208 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdx] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 3221 3209 { 3222 uiLCUIdx = -1;3223 3210 } 3224 3211 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdx] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 3225 3212 { 3226 uiLCUIdx = -1;3227 3213 } 3228 3214 else … … 3237 3223 { 3238 3224 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdx + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 3239 uiLCUIdx = -1 ;3240 3225 } 3241 3226 else if ( uiAbsPartIdx / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU … … 3247 3232 { 3248 3233 uiAbsPartAddr = 0; 3249 uiLCUIdx = -1 ;3250 3234 } 3251 3235 } … … 3309 3293 UInt TComDataCU::getIntraSizeIdx(UInt uiAbsPartIdx) 3310 3294 { 3311 UInt uiShift = ( (m_puhTrIdx[uiAbsPartIdx]==0) && (m_pePartSize[uiAbsPartIdx]==SIZE_NxN) ) ? m_puhTrIdx[uiAbsPartIdx]+1 : m_puhTrIdx[uiAbsPartIdx]; 3312 uiShift = ( m_pePartSize[uiAbsPartIdx]==SIZE_NxN ? 1 : 0 ); 3295 UInt uiShift = ( m_pePartSize[uiAbsPartIdx]==SIZE_NxN ? 1 : 0 ); 3313 3296 3314 3297 UChar uiWidth = m_puhWidth[uiAbsPartIdx]>>uiShift; … … 3396 3379 } 3397 3380 3398 #if L0363_MVP_POC3399 3381 if ( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getPOC() == pcTmpCU->getSlice()->getRefPOC( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) )) 3400 #else3401 if ( m_pcSlice->isEqualRef(eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx), iRefIdx) )3402 #endif3403 3382 { 3404 3383 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 3602 3581 } 3603 3582 iCurrPOC = m_pcSlice->getPOC(); 3604 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();3605 3583 iColPOC = pColCU->getSlice()->getPOC(); 3606 3584 -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComLoopFilter.cpp
r191 r302 461 461 if ( ((piRefP0==piRefQ0)&&(piRefP1==piRefQ1)) || ((piRefP0==piRefQ1)&&(piRefP1==piRefQ0)) ) 462 462 { 463 uiBs = 0;464 463 if ( piRefP0 != piRefP1 ) // Different L0 & L1 465 464 { … … 694 693 for ( UInt iIdx = 0; iIdx < uiNumParts; iIdx++ ) 695 694 { 696 ucBs = 0;697 698 695 uiBsAbsIdx = xCalcBsIdx( pcCU, uiAbsZorderIdx, iDir, iEdge, iIdx); 699 696 ucBs = m_aapucBS[iDir][uiBsAbsIdx]; -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComPrediction.cpp
r282 r302 122 122 Pel TComPrediction::predIntraGetPredValDC( Int* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft ) 123 123 { 124 assert(iWidth > 0 && iHeight > 0); 124 125 Int iInd, iSum = 0; 125 126 Pel pDcVal; -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComRdCost.cpp
r191 r302 485 485 } 486 486 487 #if RATE_CONTROL_LAMBDA_DOMAIN 487 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT 488 488 UInt TComRdCost::getSADPart ( Int bitDepth, Pel* pelCur, Int curStride, Pel* pelOrg, Int orgStride, UInt width, UInt height ) 489 489 { -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComRdCost.h
r191 r302 168 168 #if RATE_CONTROL_LAMBDA_DOMAIN 169 169 Double getLambda() { return m_dLambda; } 170 #if M0036_RC_IMPROVEMENT 171 Double getChromaWeight () {return((m_cbDistortionWeight+m_crDistortionWeight)/2.0);} 172 #endif 170 173 #endif 171 174 … … 264 267 #endif 265 268 266 #if RATE_CONTROL_LAMBDA_DOMAIN 269 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT 267 270 UInt getSADPart ( Int bitDepth, Pel* pelCur, Int curStride, Pel* pelOrg, Int orgStride, UInt width, UInt height ); 268 271 #endif -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r300 r302 65 65 , m_deblockingFilterBetaOffsetDiv2 ( 0 ) 66 66 , m_deblockingFilterTcOffsetDiv2 ( 0 ) 67 #if !L0034_COMBINED_LIST_CLEANUP68 , m_bRefPicListModificationFlagLC ( false )69 , m_bRefPicListCombinationFlag ( false )70 #endif71 67 , m_bCheckLDC ( false ) 72 68 , m_iSliceQpDelta ( 0 ) … … 88 84 #else 89 85 , m_dLambda ( 0.0 ) 90 #endif91 #if !L0034_COMBINED_LIST_CLEANUP92 , m_bNoBackPredFlag ( false )93 86 #endif 94 87 , m_uiTLayer ( 0 ) … … 119 112 , m_enableTMVPFlag ( true ) 120 113 { 121 #if L0034_COMBINED_LIST_CLEANUP122 114 m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = 0; 123 #else124 m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = m_aiNumRefIdx[2] = 0;125 #endif126 115 127 116 #if SVC_EXTENSION … … 148 137 initEqualRef(); 149 138 150 #if L0034_COMBINED_LIST_CLEANUP151 139 for ( Int idx = 0; idx < MAX_NUM_REF; idx++ ) 152 140 { 153 141 m_list1IdxToList0Idx[idx] = -1; 154 142 } 155 #else156 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF_LC; iNumCount++)157 {158 m_iRefIdxOfLC[REF_PIC_LIST_0][iNumCount]=-1;159 m_iRefIdxOfLC[REF_PIC_LIST_1][iNumCount]=-1;160 m_eListIdFromIdxOfLC[iNumCount]=0;161 m_iRefIdxFromIdxOfLC[iNumCount]=0;162 m_iRefIdxOfL0FromRefIdxOfL1[iNumCount] = -1;163 m_iRefIdxOfL1FromRefIdxOfL0[iNumCount] = -1;164 }165 #endif166 143 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF; iNumCount++) 167 144 { … … 210 187 m_colRefIdx = 0; 211 188 initEqualRef(); 212 #if !L0034_COMBINED_LIST_CLEANUP213 m_bNoBackPredFlag = false;214 m_bRefPicListCombinationFlag = false;215 m_bRefPicListModificationFlagLC = false;216 #endif217 189 m_bCheckLDC = false; 218 190 m_iSliceQpDeltaCb = 0; 219 191 m_iSliceQpDeltaCr = 0; 220 221 #if !L0034_COMBINED_LIST_CLEANUP222 m_aiNumRefIdx[REF_PIC_LIST_C] = 0;223 #endif224 192 225 193 m_maxNumMergeCand = MRG_MAX_NUM_CANDS; … … 364 332 } 365 333 366 #if L0034_COMBINED_LIST_CLEANUP367 334 Void TComSlice::setList1IdxToList0Idx() 368 335 { … … 381 348 } 382 349 } 383 #else384 Void TComSlice::generateCombinedList()385 {386 if(m_aiNumRefIdx[REF_PIC_LIST_C] > 0)387 {388 m_aiNumRefIdx[REF_PIC_LIST_C]=0;389 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF_LC; iNumCount++)390 {391 m_iRefIdxOfLC[REF_PIC_LIST_0][iNumCount]=-1;392 m_iRefIdxOfLC[REF_PIC_LIST_1][iNumCount]=-1;393 m_eListIdFromIdxOfLC[iNumCount]=0;394 m_iRefIdxFromIdxOfLC[iNumCount]=0;395 m_iRefIdxOfL0FromRefIdxOfL1[iNumCount] = -1;396 m_iRefIdxOfL1FromRefIdxOfL0[iNumCount] = -1;397 }398 399 for (Int iNumRefIdx = 0; iNumRefIdx < MAX_NUM_REF; iNumRefIdx++)400 {401 if(iNumRefIdx < m_aiNumRefIdx[REF_PIC_LIST_0])402 {403 Bool bTempRefIdxInL2 = true;404 for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ )405 {406 if ( m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() )407 {408 m_iRefIdxOfL1FromRefIdxOfL0[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC];409 m_iRefIdxOfL0FromRefIdxOfL1[m_iRefIdxFromIdxOfLC[iRefIdxLC]] = iNumRefIdx;410 bTempRefIdxInL2 = false;411 break;412 }413 }414 415 if(bTempRefIdxInL2 == true)416 {417 m_eListIdFromIdxOfLC[m_aiNumRefIdx[REF_PIC_LIST_C]] = REF_PIC_LIST_0;418 m_iRefIdxFromIdxOfLC[m_aiNumRefIdx[REF_PIC_LIST_C]] = iNumRefIdx;419 m_iRefIdxOfLC[REF_PIC_LIST_0][iNumRefIdx] = m_aiNumRefIdx[REF_PIC_LIST_C]++;420 }421 }422 423 if(iNumRefIdx < m_aiNumRefIdx[REF_PIC_LIST_1])424 {425 Bool bTempRefIdxInL2 = true;426 for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ )427 {428 if ( m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() )429 {430 m_iRefIdxOfL0FromRefIdxOfL1[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC];431 m_iRefIdxOfL1FromRefIdxOfL0[m_iRefIdxFromIdxOfLC[iRefIdxLC]] = iNumRefIdx;432 bTempRefIdxInL2 = false;433 break;434 }435 }436 if(bTempRefIdxInL2 == true)437 {438 m_eListIdFromIdxOfLC[m_aiNumRefIdx[REF_PIC_LIST_C]] = REF_PIC_LIST_1;439 m_iRefIdxFromIdxOfLC[m_aiNumRefIdx[REF_PIC_LIST_C]] = iNumRefIdx;440 m_iRefIdxOfLC[REF_PIC_LIST_1][iNumRefIdx] = m_aiNumRefIdx[REF_PIC_LIST_C]++;441 }442 }443 }444 }445 }446 #endif447 350 448 351 #if FIX1071 352 #if SVC_EXTENSION 449 353 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr, TComPic** ilpPic) 354 #else 355 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) 356 #endif 450 357 #else 451 358 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic ) … … 456 363 #endif 457 364 { 458 if ( m_eSliceType == I_SLICE)365 if (m_eSliceType == I_SLICE) 459 366 { 460 367 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 461 368 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 369 462 370 return; 463 371 } … … 672 580 } 673 581 674 assert(numPocTotalCurr !=0);582 assert(numPocTotalCurr > 0); 675 583 676 584 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); … … 699 607 { 700 608 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 701 } 609 } 610 702 611 #if REF_IDX_FRAMEWORK 703 612 if( m_layerId > 0 ) … … 718 627 } 719 628 #endif 629 assert(cIdx == numPocTotalCurr); 630 720 631 if (m_eSliceType==B_SLICE) 721 632 { … … 732 643 { 733 644 rpsCurrList1[cIdx] = RefPicSetLtCurr[i]; 734 } 645 } 646 735 647 #if REF_IDX_FRAMEWORK 736 648 if( m_layerId > 0 ) … … 751 663 } 752 664 #endif 665 666 assert(cIdx == numPocTotalCurr); 753 667 } 754 668 755 669 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm)); 756 670 757 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[0]-1); rIdx ++) 758 { 759 m_apcRefPicList[0][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? rpsCurrList0[ m_RefPicListModification.getRefPicSetIdxL0(rIdx) ] : rpsCurrList0[rIdx % numPocTotalCurr]; 760 m_bIsUsedAsLongTerm[0][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? (m_RefPicListModification.getRefPicSetIdxL0(rIdx) >= (NumPocStCurr0 + NumPocStCurr1)) 761 : ((rIdx % numPocTotalCurr) >= (NumPocStCurr0 + NumPocStCurr1)); 762 } 763 if ( m_eSliceType == P_SLICE ) 671 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[0]; rIdx ++) 672 { 673 cIdx = m_RefPicListModification.getRefPicListModificationFlagL0() ? m_RefPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPocTotalCurr; 674 assert(cIdx >= 0 && cIdx < numPocTotalCurr); 675 m_apcRefPicList[0][rIdx] = rpsCurrList0[ cIdx ]; 676 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 ); 677 } 678 if ( m_eSliceType != B_SLICE ) 764 679 { 765 680 m_aiNumRefIdx[1] = 0; … … 768 683 else 769 684 { 770 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[1]-1); rIdx ++) 771 { 772 m_apcRefPicList[1][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? rpsCurrList1[ m_RefPicListModification.getRefPicSetIdxL1(rIdx) ] : rpsCurrList1[rIdx % numPocTotalCurr]; 773 m_bIsUsedAsLongTerm[1][rIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? 774 (m_RefPicListModification.getRefPicSetIdxL1(rIdx) >= (NumPocStCurr0 + NumPocStCurr1)): ((rIdx % numPocTotalCurr) >= (NumPocStCurr0 + NumPocStCurr1)); 685 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[1]; rIdx ++) 686 { 687 cIdx = m_RefPicListModification.getRefPicListModificationFlagL1() ? m_RefPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPocTotalCurr; 688 assert(cIdx >= 0 && cIdx < numPocTotalCurr); 689 m_apcRefPicList[1][rIdx] = rpsCurrList1[ cIdx ]; 690 m_bIsUsedAsLongTerm[1][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 ); 775 691 } 776 692 } … … 1071 987 m_deblockingFilterTcOffsetDiv2 = pSrc->m_deblockingFilterTcOffsetDiv2; 1072 988 1073 #if L0034_COMBINED_LIST_CLEANUP1074 989 for (i = 0; i < 2; i++) 1075 #else1076 for (i = 0; i < 3; i++)1077 #endif1078 990 { 1079 991 m_aiNumRefIdx[i] = pSrc->m_aiNumRefIdx[i]; 1080 992 } 1081 993 1082 #if L0034_COMBINED_LIST_CLEANUP1083 994 for (i = 0; i < MAX_NUM_REF; i++) 1084 995 { 1085 996 m_list1IdxToList0Idx[i] = pSrc->m_list1IdxToList0Idx[i]; 1086 997 } 1087 #else1088 for (i = 0; i < 2; i++)1089 {1090 for (j = 0; j < MAX_NUM_REF_LC; j++)1091 {1092 m_iRefIdxOfLC[i][j] = pSrc->m_iRefIdxOfLC[i][j];1093 }1094 }1095 for (i = 0; i < MAX_NUM_REF_LC; i++)1096 {1097 m_eListIdFromIdxOfLC[i] = pSrc->m_eListIdFromIdxOfLC[i];1098 m_iRefIdxFromIdxOfLC[i] = pSrc->m_iRefIdxFromIdxOfLC[i];1099 m_iRefIdxOfL1FromRefIdxOfL0[i] = pSrc->m_iRefIdxOfL1FromRefIdxOfL0[i];1100 m_iRefIdxOfL0FromRefIdxOfL1[i] = pSrc->m_iRefIdxOfL0FromRefIdxOfL1[i];1101 }1102 m_bRefPicListModificationFlagLC = pSrc->m_bRefPicListModificationFlagLC;1103 m_bRefPicListCombinationFlag = pSrc->m_bRefPicListCombinationFlag;1104 #endif1105 998 m_bCheckLDC = pSrc->m_bCheckLDC; 1106 999 m_iSliceQpDelta = pSrc->m_iSliceQpDelta; … … 1164 1057 } 1165 1058 1166 #if !L0034_COMBINED_LIST_CLEANUP1167 m_bNoBackPredFlag = pSrc->m_bNoBackPredFlag;1168 #endif1169 1059 m_uiTLayer = pSrc->m_uiTLayer; 1170 1060 m_bTLayerSwitchingFlag = pSrc->m_bTLayerSwitchingFlag; … … 1471 1361 /** Function for constructing an explicit Reference Picture Set out of the available pictures in a referenced Reference Picture Set 1472 1362 */ 1363 #if FIX1071 1364 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP) 1365 #else 1473 1366 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet) 1367 #endif 1474 1368 { 1475 1369 TComPic* rpcPic; … … 1496 1390 // and should be added to the explicit Reference Picture Set 1497 1391 pcRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i)); 1392 #if FIX1071 1393 pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP)); 1394 #else 1498 1395 pcRPS->setUsed(k, pReferencePictureSet->getUsed(i)); 1396 #endif 1499 1397 if(pcRPS->getDeltaPOC(k) < 0) 1500 1398 { … … 1674 1572 { 1675 1573 m_numReorderPics[i] = 0; 1676 #if L0323_DPB1677 1574 m_uiMaxDecPicBuffering[i] = 1; 1678 #else1679 m_uiMaxDecPicBuffering[i] = 0;1680 #endif1681 1575 m_uiMaxLatencyIncrease[i] = 0; 1682 1576 } … … 1786 1680 , m_pcmLog2MaxSize ( 5) 1787 1681 , m_uiPCMLog2MinSize ( 7) 1788 #if !L0034_COMBINED_LIST_CLEANUP1789 , m_bUseLComb (false)1790 #endif1791 1682 , m_bitDepthY ( 8) 1792 1683 , m_bitDepthC ( 8) … … 1820 1711 { 1821 1712 m_uiMaxLatencyIncrease[i] = 0; 1822 #if L0323_DPB1823 1713 m_uiMaxDecPicBuffering[i] = 1; 1824 #else1825 m_uiMaxDecPicBuffering[i] = 0;1826 #endif1827 1714 m_numReorderPics[i] = 0; 1828 1715 } … … 1862 1749 TComHRD *hrd = vui->getHrdParameters(); 1863 1750 1864 #if L0043_TIMING_INFO1865 1751 TimingInfo *timingInfo = vui->getTimingInfo(); 1866 1752 timingInfo->setTimingInfoPresentFlag( true ); … … 1886 1772 break; 1887 1773 } 1888 #else1889 hrd->setTimingInfoPresentFlag( true );1890 switch( frameRate )1891 {1892 case 24:1893 hrd->setNumUnitsInTick( 1125000 ); hrd->setTimeScale ( 27000000 );1894 break;1895 case 25:1896 hrd->setNumUnitsInTick( 1080000 ); hrd->setTimeScale ( 27000000 );1897 break;1898 case 30:1899 hrd->setNumUnitsInTick( 900900 ); hrd->setTimeScale ( 27000000 );1900 break;1901 case 50:1902 hrd->setNumUnitsInTick( 540000 ); hrd->setTimeScale ( 27000000 );1903 break;1904 case 60:1905 hrd->setNumUnitsInTick( 450450 ); hrd->setTimeScale ( 27000000 );1906 break;1907 default:1908 hrd->setNumUnitsInTick( 1001 ); hrd->setTimeScale ( 60000 );1909 break;1910 }1911 #endif1912 1774 1913 1775 Bool rateCnt = ( bitRate > 0 ); … … 1922 1784 hrd->setDuCpbRemovalDelayLengthMinus1( 7 ); // 8-bit precision ( plus 1 for last DU in AU ) 1923 1785 hrd->setSubPicCpbParamsInPicTimingSEIFlag( true ); 1924 #if L0044_DU_DPB_OUTPUT_DELAY_HRD1925 1786 hrd->setDpbOutputDelayDuLengthMinus1( 5 + 7 ); // With sub-clock tick factor of 100, at least 7 bits to have the same value as AU dpb delay 1926 #endif1927 1787 } 1928 1788 else … … 1953 1813 UInt birateValue, cpbSizeValue; 1954 1814 UInt ducpbSizeValue; 1955 #if L0363_DU_BIT_RATE1956 1815 UInt duBitRateValue = 0; 1957 #endif1958 1816 1959 1817 for( i = 0; i < MAX_TLAYER; i ++ ) … … 1967 1825 cpbSizeValue = bitRate; // 1 second 1968 1826 ducpbSizeValue = bitRate/numDU; 1969 #if L0363_DU_BIT_RATE1970 1827 duBitRateValue = bitRate; 1971 #endif1972 1828 for( j = 0; j < ( hrd->getCpbCntMinus1( i ) + 1 ); j ++ ) 1973 1829 { … … 1980 1836 hrd->setCpbSizeValueMinus1( i, j, 1, ( cpbSizeValue - 1 ) ); 1981 1837 hrd->setDuCpbSizeValueMinus1( i, j, 1, ( ducpbSizeValue - 1 ) ); 1982 #if L0363_DU_BIT_RATE1983 1838 hrd->setDuBitRateValueMinus1( i, j, 1, ( duBitRateValue - 1 ) ); 1984 #endif1985 1839 hrd->setCbrFlag( i, j, 1, ( j == 0 ) ); 1986 1840 } … … 2559 2413 , m_profileIdc (0) 2560 2414 , m_levelIdc (0) 2561 #if L0046_CONSTRAINT_FLAGS2562 2415 , m_progressiveSourceFlag (false) 2563 2416 , m_interlacedSourceFlag (false) 2564 2417 , m_nonPackedConstraintFlag(false) 2565 2418 , m_frameOnlyConstraintFlag(false) 2566 #endif2567 2419 { 2568 2420 ::memset(m_profileCompatibilityFlag, 0, sizeof(m_profileCompatibilityFlag)); … … 2595 2447 // Copy all information related to general profile 2596 2448 this->getGeneralPTL()->copyProfileInfo(ptl->getGeneralPTL()); 2597 }2598 #endif2599 #if SIGNAL_BITRATE_PICRATE_IN_VPS2600 TComBitRatePicRateInfo::TComBitRatePicRateInfo()2601 {2602 ::memset(m_bitRateInfoPresentFlag, 0, sizeof(m_bitRateInfoPresentFlag));2603 ::memset(m_picRateInfoPresentFlag, 0, sizeof(m_picRateInfoPresentFlag));2604 ::memset(m_avgBitRate, 0, sizeof(m_avgBitRate));2605 ::memset(m_maxBitRate, 0, sizeof(m_maxBitRate));2606 ::memset(m_constantPicRateIdc, 0, sizeof(m_constantPicRateIdc));2607 ::memset(m_avgPicRate, 0, sizeof(m_avgPicRate));2608 2449 } 2609 2450 #endif -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h
r300 r302 191 191 Int m_levelIdc; 192 192 193 #if L0046_CONSTRAINT_FLAGS194 193 Bool m_progressiveSourceFlag; 195 194 Bool m_interlacedSourceFlag; 196 195 Bool m_nonPackedConstraintFlag; 197 196 Bool m_frameOnlyConstraintFlag; 198 #endif199 197 200 198 public: … … 216 214 Void setLevelIdc(Int x) { m_levelIdc = x; } 217 215 218 #if L0046_CONSTRAINT_FLAGS219 216 Bool getProgressiveSourceFlag() const { return m_progressiveSourceFlag; } 220 217 Void setProgressiveSourceFlag(Bool b) { m_progressiveSourceFlag = b; } … … 228 225 Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } 229 226 Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } 230 #endif231 227 #if VPS_EXTN_PROFILE_INFO 232 228 Void copyProfileInfo(ProfileTierLevel *ptl); … … 257 253 }; 258 254 /// VPS class 259 260 #if SIGNAL_BITRATE_PICRATE_IN_VPS261 class TComBitRatePicRateInfo262 {263 Bool m_bitRateInfoPresentFlag[MAX_TLAYER];264 Bool m_picRateInfoPresentFlag[MAX_TLAYER];265 Int m_avgBitRate[MAX_TLAYER];266 Int m_maxBitRate[MAX_TLAYER];267 Int m_constantPicRateIdc[MAX_TLAYER];268 Int m_avgPicRate[MAX_TLAYER];269 public:270 TComBitRatePicRateInfo();271 Bool getBitRateInfoPresentFlag(Int i) {return m_bitRateInfoPresentFlag[i];}272 Void setBitRateInfoPresentFlag(Int i, Bool x) {m_bitRateInfoPresentFlag[i] = x;}273 274 Bool getPicRateInfoPresentFlag(Int i) {return m_picRateInfoPresentFlag[i];}275 Void setPicRateInfoPresentFlag(Int i, Bool x) {m_picRateInfoPresentFlag[i] = x;}276 277 Int getAvgBitRate(Int i) {return m_avgBitRate[i];}278 Void setAvgBitRate(Int i, Int x) {m_avgBitRate[i] = x;}279 280 Int getMaxBitRate(Int i) {return m_maxBitRate[i];}281 Void setMaxBitRate(Int i, Int x) {m_maxBitRate[i] = x;}282 283 Int getConstantPicRateIdc(Int i) {return m_constantPicRateIdc[i];}284 Void setConstantPicRateIdc(Int i, Int x) {m_constantPicRateIdc[i] = x;}285 286 Int getAvgPicRate(Int i) {return m_avgPicRate[i];}287 Void setAvgPicRate(Int i, Int x) {m_avgPicRate[i] = x;}288 };289 #endif290 255 291 256 struct HrdSubLayerInfo … … 300 265 UInt ducpbSizeValue [MAX_CPB_CNT][2]; 301 266 UInt cbrFlag [MAX_CPB_CNT][2]; 302 #if L0363_DU_BIT_RATE303 267 UInt duBitRateValue [MAX_CPB_CNT][2]; 304 #endif305 268 }; 306 269 … … 308 271 { 309 272 private: 310 #if !L0043_TIMING_INFO311 Bool m_timingInfoPresentFlag;312 UInt m_numUnitsInTick;313 UInt m_timeScale;314 #endif315 273 Bool m_nalHrdParametersPresentFlag; 316 274 Bool m_vclHrdParametersPresentFlag; … … 319 277 UInt m_duCpbRemovalDelayLengthMinus1; 320 278 Bool m_subPicCpbParamsInPicTimingSEIFlag; 321 #if L0044_DU_DPB_OUTPUT_DELAY_HRD322 279 UInt m_dpbOutputDelayDuLengthMinus1; 323 #endif324 280 UInt m_bitRateScale; 325 281 UInt m_cpbSizeScale; … … 333 289 public: 334 290 TComHRD() 335 #if !L0043_TIMING_INFO336 :m_timingInfoPresentFlag(false)337 ,m_numUnitsInTick(1001)338 ,m_timeScale(60000)339 ,m_nalHrdParametersPresentFlag(0)340 #else341 291 :m_nalHrdParametersPresentFlag(0) 342 #endif343 292 ,m_vclHrdParametersPresentFlag(0) 344 293 ,m_subPicCpbParamsPresentFlag(false) … … 346 295 ,m_duCpbRemovalDelayLengthMinus1(0) 347 296 ,m_subPicCpbParamsInPicTimingSEIFlag(false) 348 #if L0044_DU_DPB_OUTPUT_DELAY_HRD349 297 ,m_dpbOutputDelayDuLengthMinus1(0) 350 #endif351 298 ,m_bitRateScale(0) 352 299 ,m_cpbSizeScale(0) … … 357 304 358 305 virtual ~TComHRD() {} 359 #if !L0043_TIMING_INFO360 Void setTimingInfoPresentFlag ( Bool flag ) { m_timingInfoPresentFlag = flag; }361 Bool getTimingInfoPresentFlag ( ) { return m_timingInfoPresentFlag; }362 363 Void setNumUnitsInTick ( UInt value ) { m_numUnitsInTick = value; }364 UInt getNumUnitsInTick ( ) { return m_numUnitsInTick; }365 366 Void setTimeScale ( UInt value ) { m_timeScale = value; }367 UInt getTimeScale ( ) { return m_timeScale; }368 #endif369 306 370 307 Void setNalHrdParametersPresentFlag ( Bool flag ) { m_nalHrdParametersPresentFlag = flag; } … … 386 323 Bool getSubPicCpbParamsInPicTimingSEIFlag () { return m_subPicCpbParamsInPicTimingSEIFlag; } 387 324 388 #if L0044_DU_DPB_OUTPUT_DELAY_HRD389 325 Void setDpbOutputDelayDuLengthMinus1 (UInt value ) { m_dpbOutputDelayDuLengthMinus1 = value; } 390 326 UInt getDpbOutputDelayDuLengthMinus1 () { return m_dpbOutputDelayDuLengthMinus1; } 391 #endif392 327 393 328 Void setBitRateScale ( UInt value ) { m_bitRateScale = value; } … … 430 365 Void setDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl] = value; } 431 366 UInt getDuCpbSizeValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].ducpbSizeValue[cpbcnt][nalOrVcl]; } 432 #if L0363_DU_BIT_RATE433 367 Void setDuBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl] = value; } 434 368 UInt getDuBitRateValueMinus1 (Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].duBitRateValue[cpbcnt][nalOrVcl]; } 435 #endif436 369 Void setCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl] = value; } 437 370 Bool getCbrFlag ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].cbrFlag[cpbcnt][nalOrVcl]; } … … 439 372 Void setNumDU ( UInt value ) { m_numDU = value; } 440 373 UInt getNumDU ( ) { return m_numDU; } 441 #if L0045_CONDITION_SIGNALLING442 374 Bool getCpbDpbDelaysPresentFlag() { return getNalHrdParametersPresentFlag() || getVclHrdParametersPresentFlag(); } 443 #endif444 375 }; 445 376 446 #if L0043_TIMING_INFO447 377 class TimingInfo 448 378 { … … 475 405 Void setNumTicksPocDiffOneMinus1 (Int x ) { m_numTicksPocDiffOneMinus1 = x; } 476 406 }; 477 #endif478 407 479 408 class TComVPS … … 487 416 UInt m_numReorderPics[MAX_TLAYER]; 488 417 UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; 489 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; 418 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) 490 419 491 420 UInt m_numHrdParameters; … … 509 438 #endif 510 439 TComPTL m_pcPTL; 511 #if SIGNAL_BITRATE_PICRATE_IN_VPS512 TComBitRatePicRateInfo m_bitRatePicRateInfo;513 #endif514 #if L0043_TIMING_INFO515 440 TimingInfo m_timingInfo; 516 #endif517 441 518 442 // ------------------------------------------ … … 636 560 #endif 637 561 TComPTL* getPTL() { return &m_pcPTL; } 638 #if SIGNAL_BITRATE_PICRATE_IN_VPS639 TComBitRatePicRateInfo *getBitratePicrateInfo() { return &m_bitRatePicRateInfo; }640 #endif641 #if L0043_TIMING_INFO642 562 TimingInfo* getTimingInfo() { return &m_timingInfo; } 643 #endif644 563 #if VPS_EXTN_MASK_AND_DIM_INFO 645 564 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } … … 814 733 Int m_log2MaxMvLengthVertical; 815 734 TComHRD m_hrdParameters; 816 #if L0043_TIMING_INFO817 735 TimingInfo m_timingInfo; 818 #else819 Bool m_pocProportionalToTimingFlag;820 Int m_numTicksPocDiffOneMinus1;821 #endif822 736 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG 823 737 Bool m_tileBoundariesAlignedFlag; … … 856 770 ,m_log2MaxMvLengthHorizontal(15) 857 771 ,m_log2MaxMvLengthVertical(15) 858 #if !L0043_TIMING_INFO859 ,m_pocProportionalToTimingFlag(false)860 ,m_numTicksPocDiffOneMinus1(0)861 #endif862 772 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG 863 773 ,m_tileBoundariesAlignedFlag(true) … … 957 867 958 868 TComHRD* getHrdParameters () { return &m_hrdParameters; } 959 #if L0043_TIMING_INFO960 869 TimingInfo* getTimingInfo() { return &m_timingInfo; } 961 #else962 Bool getPocProportionalToTimingFlag() {return m_pocProportionalToTimingFlag; }963 Void setPocProportionalToTimingFlag(Bool x) {m_pocProportionalToTimingFlag = x;}964 Int getNumTicksPocDiffOneMinus1() {return m_numTicksPocDiffOneMinus1;}965 Void setNumTicksPocDiffOneMinus1(Int x) { m_numTicksPocDiffOneMinus1 = x;}966 #endif967 870 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG 968 871 Bool getTileBoundariesAlignedFlag( ) { return m_tileBoundariesAlignedFlag; } … … 1008 911 Bool m_useAMP; 1009 912 1010 #if !L0034_COMBINED_LIST_CLEANUP1011 Bool m_bUseLComb;1012 #endif1013 1014 913 // Parameter 1015 914 Int m_bitDepthY; … … 1040 939 TComScalingList* m_scalingList; //!< ScalingList class pointer 1041 940 UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; 1042 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; 941 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) 1043 942 1044 943 Bool m_useDF; … … 1146 1045 1147 1046 // Tool list 1148 #if !L0034_COMBINED_LIST_CLEANUP1149 Void setUseLComb (Bool b) { m_bUseLComb = b; }1150 Bool getUseLComb () { return m_bUseLComb; }1151 #endif1152 1153 1047 Bool getUseLossless () { return m_useLossless; } 1154 1048 Void setUseLossless ( Bool b ) { m_useLossless = b; } … … 1504 1398 Bool m_interLayerSamplePredOnlyFlag; 1505 1399 #endif 1506 #if L0034_COMBINED_LIST_CLEANUP1507 1400 Int m_list1IdxToList0Idx[MAX_NUM_REF]; 1508 1401 Int m_aiNumRefIdx [2]; // for multiple reference of current slice 1509 #else1510 Int m_aiNumRefIdx [3]; // for multiple reference of current slice1511 Int m_iRefIdxOfLC[2][MAX_NUM_REF_LC];1512 Int m_eListIdFromIdxOfLC[MAX_NUM_REF_LC];1513 Int m_iRefIdxFromIdxOfLC[MAX_NUM_REF_LC];1514 Int m_iRefIdxOfL1FromRefIdxOfL0[MAX_NUM_REF_LC];1515 Int m_iRefIdxOfL0FromRefIdxOfL1[MAX_NUM_REF_LC];1516 Bool m_bRefPicListModificationFlagLC;1517 Bool m_bRefPicListCombinationFlag;1518 #endif1519 1402 1520 1403 Bool m_bCheckLDC; … … 1558 1441 1559 1442 Bool m_abEqualRef [2][MAX_NUM_REF][MAX_NUM_REF]; 1560 #if !L0034_COMBINED_LIST_CLEANUP1561 Bool m_bNoBackPredFlag;1562 #endif1563 1443 UInt m_uiTLayer; 1564 1444 #if SVC_EXTENSION … … 1680 1560 Bool getMvdL1ZeroFlag () { return m_bLMvdL1Zero; } 1681 1561 Int getNumRpsCurrTempList(); 1682 #if L0034_COMBINED_LIST_CLEANUP1683 1562 Int getList1IdxToList0Idx ( Int list1Idx ) { return m_list1IdxToList0Idx[list1Idx]; } 1684 #else1685 Int getRefIdxOfLC (RefPicList e, Int iRefIdx) { return m_iRefIdxOfLC[e][iRefIdx]; }1686 Int getListIdFromIdxOfLC(Int iRefIdx) { return m_eListIdFromIdxOfLC[iRefIdx]; }1687 Int getRefIdxFromIdxOfLC(Int iRefIdx) { return m_iRefIdxFromIdxOfLC[iRefIdx]; }1688 Int getRefIdxOfL0FromRefIdxOfL1(Int iRefIdx) { return m_iRefIdxOfL0FromRefIdxOfL1[iRefIdx];}1689 Int getRefIdxOfL1FromRefIdxOfL0(Int iRefIdx) { return m_iRefIdxOfL1FromRefIdxOfL0[iRefIdx];}1690 Bool getRefPicListModificationFlagLC() {return m_bRefPicListModificationFlagLC;}1691 Void setRefPicListModificationFlagLC(Bool bflag) {m_bRefPicListModificationFlagLC=bflag;}1692 Bool getRefPicListCombinationFlag() {return m_bRefPicListCombinationFlag;}1693 Void setRefPicListCombinationFlag(Bool bflag) {m_bRefPicListCombinationFlag=bflag;}1694 #endif1695 1563 Void setReferenced(Bool b) { m_bRefenced = b; } 1696 1564 Bool isReferenced() { return m_bRefenced; } … … 1733 1601 1734 1602 #if FIX1071 1603 #if SVC_EXTENSION 1735 1604 Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false, TComPic** ilpPic = NULL ); 1605 #else 1606 Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); 1607 #endif 1736 1608 #else 1737 1609 Void setRefPicList ( TComList<TComPic*>& rcListPic ); … … 1769 1641 1770 1642 static Void sortPicList ( TComList<TComPic*>& rcListPic ); 1771 #if L0034_COMBINED_LIST_CLEANUP1772 1643 Void setList1IdxToList0Idx(); 1773 #else1774 Bool getNoBackPredFlag() { return m_bNoBackPredFlag; }1775 Void setNoBackPredFlag( Bool b ) { m_bNoBackPredFlag = b; }1776 Void generateCombinedList ();1777 #endif1778 1644 1779 1645 UInt getTLayer () { return m_uiTLayer; } … … 1786 1652 Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); 1787 1653 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); 1654 #if FIX1071 1655 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); 1656 #else 1788 1657 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet); 1658 #endif 1789 1659 1790 1660 Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r191 r302 1075 1075 Int iTransformShift = MAX_TR_DYNAMIC_RANGE - uiBitDepth - uiLog2TrSize; // Represents scaling through forward transform 1076 1076 1077 Int iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift; // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits1078 1079 iAdd = (pcCU->getSlice()->getSliceType()==I_SLICE ? 171 : 85) << (iQBits-9);1080 1081 1077 #if ADAPTIVE_QP_SELECTION 1082 iQBits = QUANT_SHIFT + cQpBase.m_iPer + iTransformShift;1078 Int iQBits = QUANT_SHIFT + cQpBase.m_iPer + iTransformShift; 1083 1079 iAdd = (pcCU->getSlice()->getSliceType()==I_SLICE ? 171 : 85) << (iQBits-9); 1084 1080 Int iQBitsC = QUANT_SHIFT + cQpBase.m_iPer + iTransformShift - ARL_C_PRECISION; 1085 1081 Int iAddC = 1 << (iQBitsC-1); 1082 #else 1083 Int iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift; // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits 1084 iAdd = (pcCU->getSlice()->getSliceType()==I_SLICE ? 171 : 85) << (iQBits-9); 1086 1085 #endif 1087 1086 … … 1364 1363 #else 1365 1364 Int j; 1366 { 1367 Short block[ 64 * 64 ]; 1368 Short coeff[ 64 * 64 ]; 1369 { 1370 for (j = 0; j < iHeight; j++) 1371 { 1372 memcpy( block + j * iWidth, piBlkResi + j * uiStride, iWidth * sizeof( Short ) ); 1373 } 1374 } 1375 xTrMxN(bitDepth, block, coeff, iWidth, iHeight, uiMode ); 1376 for ( j = 0; j < iHeight * iWidth; j++ ) 1377 { 1378 psCoeff[ j ] = coeff[ j ]; 1379 } 1380 return ; 1365 Short block[ 32 * 32 ]; 1366 Short coeff[ 32 * 32 ]; 1367 for (j = 0; j < iHeight; j++) 1368 { 1369 memcpy( block + j * iWidth, piBlkResi + j * uiStride, iWidth * sizeof( Short ) ); 1370 } 1371 xTrMxN(bitDepth, block, coeff, iWidth, iHeight, uiMode ); 1372 for ( j = 0; j < iHeight * iWidth; j++ ) 1373 { 1374 psCoeff[ j ] = coeff[ j ]; 1381 1375 } 1382 1376 #endif … … 1399 1393 Int j; 1400 1394 { 1401 Short block[ 64 * 64];1402 Short coeff[ 64 * 64];1395 Short block[ 32 * 32 ]; 1396 Short coeff[ 32 * 32 ]; 1403 1397 for ( j = 0; j < iHeight * iWidth; j++ ) 1404 1398 { … … 1522 1516 UInt uiAbsPartIdx ) 1523 1517 { 1524 Int iQBits = m_cQP.m_iBits;1525 Double dTemp = 0;1526 1518 UInt uiLog2TrSize = g_aucConvertToBit[ uiWidth ] + 2; 1527 Int uiQ = g_quantScales[m_cQP.rem()];1528 1519 1529 1520 UInt uiBitDepth = eTType == TEXT_LUMA ? g_bitDepthY : g_bitDepthC; … … 1536 1527 assert(scalingListType < 6); 1537 1528 1538 iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift; // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits 1539 Double dErrScale = 0; 1529 Int iQBits = QUANT_SHIFT + m_cQP.m_iPer + iTransformShift; // Right shift of non-RDOQ quantizer; level = (coeff*uiQ + offset)>>q_bits 1540 1530 Double *pdErrScaleOrg = getErrScaleCoeff(scalingListType,uiLog2TrSize-2,m_cQP.m_iRem); 1541 1531 Int *piQCoefOrg = getQuantCoeff(scalingListType,m_cQP.m_iRem,uiLog2TrSize-2); … … 1589 1579 Double d64BaseCost = 0; 1590 1580 Int iLastScanPos = -1; 1591 dTemp = dErrScale;1592 1581 1593 1582 UInt c1Idx = 0; … … 1618 1607 UInt uiBlkPos = scan[iScanPos]; 1619 1608 // set coeff 1620 uiQ = piQCoef[uiBlkPos];1621 dTemp = pdErrScale[uiBlkPos];1609 Int uiQ = piQCoef[uiBlkPos]; 1610 Double dTemp = pdErrScale[uiBlkPos]; 1622 1611 Int lLevelDouble = plSrcCoeff[ uiBlkPos ]; 1623 1612 lLevelDouble = (Int)min<Int64>((Int64)abs((Int)lLevelDouble) * uiQ , MAX_INT - (1 << (iQBits - 1))); -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TComWeightPrediction.cpp
r191 r302 271 271 Void TComWeightPrediction::getWpScaling( TComDataCU* pcCU, Int iRefIdx0, Int iRefIdx1, wpScalingParam *&wp0, wpScalingParam *&wp1) 272 272 { 273 assert(iRefIdx0 >= 0 || iRefIdx1 >= 0); 274 273 275 TComSlice* pcSlice = pcCU->getSlice(); 274 276 TComPPS* pps = pcCU->getSlice()->getPPS(); -
branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
r300 r302 44 44 45 45 #if SVC_EXTENSION 46 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle 47 46 48 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1 ///< VUI flag to indicate tile boundary alignment 47 49 #define M0463_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling … … 49 51 #define SCALED_REF_LAYER_OFFSET_FLAG 0 ///< M0309: Signal scaled reference layer offsets in SPS 50 52 #define SCALED_REF_LAYER_OFFSETS 1 ///< M0309: Signal scaled reference layer offsets in SPS 51 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle52 53 53 54 #define VPS_RENAME 1 ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS … … 73 74 #define SVC_COL_BLK 1 ///< get co-located block 74 75 #define SVC_UPSAMPLING 1 ///< upsampling filters 75 #define ENCODER_BUGFIX 1 ///< L0167: encoder bug fix for inter mode76 76 #define CHROMA_UPSAMPLING 1 ///< L0335: Chroma upsampling with 5 bits coefficients 77 77 … … 129 129 #endif 130 130 #endif 131 #else132 #define ILP_DECODED_PICTURE 0133 #define SYNTAX_OUTPUT 0134 #endif135 131 136 132 #define FAST_INTRA_SHVC 1 ///< M0115: reduction number of intra modes in the EL (encoder only) … … 139 135 #endif 140 136 137 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC 138 139 #else 140 #define ILP_DECODED_PICTURE 0 141 #define SYNTAX_OUTPUT 0 142 #endif // SVC_EXTENSION 143 144 141 145 //! \ingroup TLibCommon 142 146 //! \{ 143 147 144 #define FIX1071 1 ///< Temporary fix for issue #1071 145 146 147 #define M0043_LAYERS_PRESENT_SEI 0 ///< M0043: add layers present SEI 148 #define L0208_SOP_DESCRIPTION_SEI 1 ///< L0208: add SOP descrioption SEI 148 #define FIX1071 1 ///< fix for issue #1071 149 149 150 #define MAX_NUM_PICS_IN_SOP 1024 150 151 151 #define K0180_SCALABLE_NESTING_SEI 1 ///JCTVC-K0180 scalable nesting sei message152 152 #define MAX_NESTING_NUM_OPS 1024 153 153 #define MAX_NESTING_NUM_LAYER 64 154 155 #define J0149_TONE_MAPPING_SEI 1 ///< J0149: Tone mapping information SEI156 #define L0363_DU_BIT_RATE 1 ///< L0363: add bit_rate_du_value_minus1 to HRD parameters157 #define L0328_SPLICING 1 ///< L0328: splicing support in HRD158 #define L0044_DU_DPB_OUTPUT_DELAY_HRD 1 ///< L0044: Include dpb_output_delay_du_length_minus1 in hrd_parameters(), dpb_output_du_delay in159 ///< picture timing SEI and DU information SEI160 #define L0045_PERSISTENCE_FLAGS 1 ///< L0045: Replace "repetition_period" syntax elements in SEI with "persistence_flag"161 #define L0045_NON_NESTED_SEI_RESTRICTIONS 1 ///< L0045; Include restriction on the order of APS and non-nested BP, PT and DU info SEI messages162 #define L0044_CPB_DPB_DELAY_OFFSET 1 ///< L0044: Include syntax elements cpb_delay_offset and dpb_delay_offset in the BP SEI message163 #define L0047_APS_FLAGS 1 ///< L0047: Include full_random_access_flag and no_param_set_update_flag in the active parameter set SEI message164 #define L0043_TIMING_INFO 1 ///< L0043: Timing information is signalled in VUI outside hrd_parameters()165 #define L0046_RENAME_PROG_SRC_IDC 1 ///< L0046: Rename progressive_source_idc to source_scan_type166 #define L0045_CONDITION_SIGNALLING 1 ///< L0045: Condition the signaling of some syntax elements in picture timing SEI message167 #define L0043_MSS_IDC 1168 #define L0116_ENTRY_POINT 1169 #define L0363_MORE_BITS 1170 #define L0363_MVP_POC 1171 #define L0363_BYTE_ALIGN 1172 #define L0363_SEI_ALLOW_SUFFIX 1173 #define L0323_LIMIT_DEFAULT_LIST_SIZE 1174 #define L0046_CONSTRAINT_FLAGS 1175 #define L0255_MOVE_PPS_FLAGS 1 ///< move some flags to earlier positions in the PPS176 #define L0444_FPA_TYPE 1 ///< allow only FPA types 3, 4 and 5177 #define L0372 1178 #define SIGNAL_BITRATE_PICRATE_IN_VPS 0 ///< K0125: Signal bit_rate and pic_rate in VPS179 #define L0232_RD_PENALTY 1 ///< L0232: RD-penalty for 32x32 TU for intra in non-intra slices180 #define L0386_DB_METRIC 1 ///< L0386: non-normative blockiness metric (automatically configures deblocking parameters in bitstream)181 #define L0323_DPB 1 ///< L0323: Specification of active reference indices and decoded picture buffer182 183 #define L0034_COMBINED_LIST_CLEANUP 1184 154 185 155 #if VPS_EXTN_MASK_AND_DIM_INFO … … 195 165 #endif 196 166 #define RATE_CONTROL_LAMBDA_DOMAIN 1 ///< JCTVC-K0103, rate control by R-lambda model 197 #define L0033_RC_BUGFIX 1 ///< JCTVC-L0033, bug fix for R-lambda model based rate control 198 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037, rate control for SHVC 167 #define M0036_RC_IMPROVEMENT 1 ///< JCTVC-M0036, improvement for R-lambda model based rate control 168 #define TICKET_1090_FIX 1 169 170 #define RC_FIX 1 /// suggested fix for M0036 171 #define RATE_CONTROL_INTRA 1 ///< JCTVC-M0257, rate control for intra 199 172 200 173 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) … … 217 190 218 191 #define REMOVE_SAO_LCU_ENC_CONSTRAINTS_3 1 ///< disable the encoder constraint that conditionally disable SAO for chroma for entire slice in interleaved mode 219 220 #define REMOVE_SINGLE_SEI_EXTENSION_FLAGS 1 ///< remove display orientation SEI extension flag (there is a generic SEI extension mechanism now)221 192 222 193 #define SAO_ENCODING_CHOICE 1 ///< I0184: picture early termination … … 232 203 #define MAX_NUM_SPS 16 233 204 #define MAX_NUM_PPS 64 234 235 236 205 237 206 #define WEIGHTED_CHROMA_DISTORTION 1 ///< F386: weighting of chroma for RDO … … 522 491 REF_PIC_LIST_0 = 0, ///< reference list 0 523 492 REF_PIC_LIST_1 = 1, ///< reference list 1 524 #if !L0034_COMBINED_LIST_CLEANUP525 REF_PIC_LIST_C = 2, ///< combined reference list for uni-prediction in B-Slices526 #endif527 493 REF_PIC_LIST_X = 100 ///< special mark 528 494 };
Note: See TracChangeset for help on using the changeset viewer.