Changeset 1317 in 3DVCSoftware for branches/HTM-15.0-dev0/source/Lib/TLibCommon
- Timestamp:
- 4 Sep 2015, 21:28:58 (10 years ago)
- Location:
- branches/HTM-15.0-dev0/source/Lib/TLibCommon
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.0-dev0/source/Lib/TLibCommon/CommonDef.h
r1314 r1317 278 278 static const Int MAX_NUM_VIDEO_SIGNAL_INFO = 16 ; 279 279 static const Int MAX_NUM_SCALED_REF_LAYERS = MAX_NUM_LAYERS - 1 ; 280 static const Int MAX_NUM_PICS_RPS = 16 ; 281 static const Int MAX_NUM_REF_LAYERS = 63 ; 280 282 #endif 281 283 … … 367 369 #endif 368 370 371 #if NH_MV 372 static const std::string NALU_TYPE_STR[] = { 373 "CODED_SLICE_TRAIL_N ", // 0 374 "CODED_SLICE_TRAIL_R ", // 1 375 "CODED_SLICE_TSA_N ", // 2 376 "CODED_SLICE_TSA_R ", // 3 377 "CODED_SLICE_STSA_N ", // 4 378 "CODED_SLICE_STSA_R ", // 5 379 "CODED_SLICE_RADL_N ", // 6 380 "CODED_SLICE_RADL_R ", // 7 381 "CODED_SLICE_RASL_N ", // 8 382 "CODED_SLICE_RASL_R ", // 9 383 "RESERVED_VCL_N10 ", 384 "RESERVED_VCL_R11 ", 385 "RESERVED_VCL_N12 ", 386 "RESERVED_VCL_R13 ", 387 "RESERVED_VCL_N14 ", 388 "RESERVED_VCL_R15 ", 389 "CODED_SLICE_BLA_W_LP ", // 16 390 "CODED_SLICE_BLA_W_RADL", // 17 391 "CODED_SLICE_BLA_N_LP ", // 18 392 "CODED_SLICE_IDR_W_RADL", // 19 393 "CODED_SLICE_IDR_N_LP ", // 20 394 "CODED_SLICE_CRA ", // 21 395 "RESERVED_IRAP_VCL22 ", 396 "RESERVED_IRAP_VCL23 ", 397 "RESERVED_VCL24 ", 398 "RESERVED_VCL25 ", 399 "RESERVED_VCL26 ", 400 "RESERVED_VCL27 ", 401 "RESERVED_VCL28 ", 402 "RESERVED_VCL29 ", 403 "RESERVED_VCL30 ", 404 "RESERVED_VCL31 ", 405 "VPS ", // 32 406 "SPS ", // 33 407 "PPS ", // 34 408 "ACCESS_UNIT_DELIMITER ", // 35 409 "EOS ", // 36 410 "EOB ", // 37 411 "FILLER_DATA ", // 38 412 "PREFIX_SEI ", // 39 413 "SUFFIX_SEI ", // 40 414 "RESERVED_NVCL41 ", 415 "RESERVED_NVCL42 ", 416 "RESERVED_NVCL43 ", 417 "RESERVED_NVCL44 ", 418 "RESERVED_NVCL45 ", 419 "RESERVED_NVCL46 ", 420 "RESERVED_NVCL47 ", 421 "UNSPECIFIED_48 ", 422 "UNSPECIFIED_49 ", 423 "UNSPECIFIED_50 ", 424 "UNSPECIFIED_51 ", 425 "UNSPECIFIED_52 ", 426 "UNSPECIFIED_53 ", 427 "UNSPECIFIED_54 ", 428 "UNSPECIFIED_55 ", 429 "UNSPECIFIED_56 ", 430 "UNSPECIFIED_57 ", 431 "UNSPECIFIED_58 ", 432 "UNSPECIFIED_59 ", 433 "UNSPECIFIED_60 ", 434 "UNSPECIFIED_61 ", 435 "UNSPECIFIED_62 ", 436 "UNSPECIFIED_63 ", 437 "INVALID " 438 }; 439 #endif 369 440 370 441 #if NH_3D -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/Debug.cpp
r1313 r1317 152 152 EnvVar DebugOptionList::ForceLumaMode ("FORCE_LUMA_MODE", "0", "Force a particular intra direction for Luma (0-34)" ); 153 153 EnvVar DebugOptionList::ForceChromaMode ("FORCE_CHROMA_MODE", "0", "Force a particular intra direction for chroma (0-5)" ); 154 155 #if DEBUG_STRING 156 EnvVar DebugOptionList::DebugString_Structure ("DEBUG_STRUCTURE", " 3", "Produce output on chosen structure bit0=intra, bit1=inter");157 EnvVar DebugOptionList::DebugString_Pred ("DEBUG_PRED", " 3", "Produce output on prediction data. bit0=intra, bit1=inter");158 EnvVar DebugOptionList::DebugString_Resi ("DEBUG_RESI", " 3", "Produce output on residual data. bit0=intra, bit1=inter");159 EnvVar DebugOptionList::DebugString_Reco ("DEBUG_RECO", " 3", "Produce output on reconstructed data. bit0=intra, bit1=inter");154 155 #if DEBUG_STRING 156 EnvVar DebugOptionList::DebugString_Structure ("DEBUG_STRUCTURE", "0", "Produce output on chosen structure bit0=intra, bit1=inter"); 157 EnvVar DebugOptionList::DebugString_Pred ("DEBUG_PRED", "0", "Produce output on prediction data. bit0=intra, bit1=inter"); 158 EnvVar DebugOptionList::DebugString_Resi ("DEBUG_RESI", "0", "Produce output on residual data. bit0=intra, bit1=inter"); 159 EnvVar DebugOptionList::DebugString_Reco ("DEBUG_RECO", "0", "Produce output on reconstructed data. bit0=intra, bit1=inter"); 160 160 EnvVar DebugOptionList::DebugString_InvTran ("DEBUG_INV_QT", "0", "Produce output on inverse-quantiser and transform stages. bit0=intra, bit1=inter"); 161 161 #endif -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/NAL.h
r1313 r1317 98 98 || m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R; 99 99 } 100 #if NH_MV 101 Bool isIrap() 102 { 103 return m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP 104 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL 105 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP 106 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 107 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP 108 || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA; 109 } 110 111 Bool isIdr() 112 { 113 return m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 114 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP; 115 } 116 117 Bool isBla() 118 { 119 return m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP 120 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL 121 || m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP; 122 } 123 124 Bool isCra() 125 { 126 return m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA; 127 } 128 129 130 #endif 100 131 Bool isSei() 101 132 { … … 108 139 return ( (UInt)m_nalUnitType < 32 ); 109 140 } 141 #if NH_MV 142 Void print( ) 143 { 144 std::cout << "Type: " << NALU_TYPE_STR[m_nalUnitType] << " LayerId: " << m_nuhLayerId << " TemporalId: " << m_temporalId; 145 } 146 #endif 110 147 }; 111 148 -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComBitStream.cpp
r1313 r1317 41 41 #include <string.h> 42 42 #include <memory.h> 43 43 #if NH_MV 44 #include "TComRom.h" // This is only here, since ENC_DEC_TRACE is currently there. Consider removing when this has changed. 45 #endif 44 46 using namespace std; 45 47 … … 258 260 m_numBitsRead += uiNumberOfBits; 259 261 262 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 263 if ( g_traceBitsRead ) 264 { 265 Bool oldJustDoIt = g_bJustDoIt; 266 g_bJustDoIt = true; 267 writeToTraceFile( "Bits: ", m_numBitsRead, true ); 268 g_bJustDoIt = oldJustDoIt; 269 } 270 #endif 271 260 272 /* NB, bits are extracted from the MSB of each byte. */ 261 273 UInt retval = 0; -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComCodingStatistics.h
r1313 r1317 102 102 STATS__CABAC_BITS__3D_IC, 103 103 #endif 104 #if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC104 #if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER 105 105 STATS__CABAC_BITS__DELTADC_SIGN_EP, 106 106 STATS__CABAC_BITS__DELTADC_PREFIX, … … 174 174 "CABAC_BITS__3D_IC" 175 175 #endif 176 #if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC176 #if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER 177 177 ,"STATS__CABAC_BITS__DELTADC_SIGN_EP" 178 178 ,"STATS__CABAC_BITS__DELTADC_PREFIX" -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r1313 r1317 2934 2934 } 2935 2935 2936 #if NH_3D _FIX_PRUNING2936 #if NH_3D 2937 2937 Bool TComDataCU::hasEqualMotion( Int dirA, const TComMvField* mvFieldA, Int dirB, const TComMvField* mvFieldB ) 2938 2938 { … … 3046 3046 if( !iLoop && ivCandDir[0] > 0) 3047 3047 { 3048 #if NH_3D_FIX_PRUNING3049 3048 if( hasEqualMotion(tmpDir, tmpMV, m_mergCands[MRG_IVMC].m_uDir, m_mergCands[MRG_IVMC].m_cMvField )) 3050 #else3051 if(tmpDir == m_mergCands[MRG_IVMC].m_uDir && m_mergCands[MRG_IVMC].m_cMvField[0]==tmpMV[0] && m_mergCands[MRG_IVMC].m_cMvField[1]==tmpMV[1])3052 #endif3053 3049 { 3054 3050 bRemove = true; … … 3101 3097 } 3102 3098 3099 3100 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 3101 if ( g_traceMergeCandListConst ) 3102 { 3103 for (Int i = 0; i<MRG_IVSHIFT+1; i++) 3104 { 3105 m_mergCands[i].print( i ); 3106 } 3107 } 3108 #endif 3109 3110 3103 3111 Int iCount = 0; 3104 3112 TComMv cZeroMv; … … 3156 3164 pcMvFieldNeighbours[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3157 3165 } 3166 3158 3167 // copy extMergeCandList to output 3159 3168 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) … … 3161 3170 puhInterDirNeighbours[ui] = uhInterDirNeighboursExt[ui]; 3162 3171 pcMvFieldNeighbours[ui<<1].setMvField(extMergeCandList[ui<<1].getMv(), extMergeCandList[ui<<1].getRefIdx()); 3172 3163 3173 if ( getSlice()->isInterB() ) 3174 { 3164 3175 pcMvFieldNeighbours[(ui<<1)+1].setMvField(extMergeCandList[(ui<<1)+1].getMv(), extMergeCandList[(ui<<1)+1].getRefIdx()); 3165 } 3176 } 3177 } 3178 3179 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 3180 if ( g_traceMergeCandListConst ) 3181 { 3182 std::cout << std::setfill(' ') << std::setw( 15 ) 3183 << "Num" << std::setw( 15 ) 3184 << "Dir " << std::setw( 15 ) 3185 << "L0 RefIdx" << std::setw( 15 ) 3186 << "L0 Hor" << std::setw( 15 ) 3187 << "L0 Ver" << std::setw( 15 ) 3188 << "L1 RefIdx" << std::setw( 15 ) 3189 << "L1 Hor" << std::setw( 15 ) 3190 << "L1 Ver" << std::setw( 15 ) 3191 << std::endl; 3192 3193 // copy extMergeCandList to output 3194 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) 3195 { 3196 UChar curDir = puhInterDirNeighbours[ui]; 3197 TComMvField& curf = pcMvFieldNeighbours[ui<<1]; 3198 TComMvField& curf2 = pcMvFieldNeighbours[(ui<<1)+1]; 3199 3200 std::cout << std::setfill(' ') << std::setw( 15 ) 3201 << ui << std::setw( 15 ) 3202 << (UInt) curDir << std::setw( 15 ) 3203 << ((curDir & 1) ? curf.getRefIdx() : MIN_INT) << std::setw( 15 ) 3204 << ((curDir & 1) ? curf.getMv().getHor() : MIN_INT) << std::setw( 15 ) 3205 << ((curDir & 1) ? curf.getMv().getVer() : MIN_INT) << std::setw( 15 ); 3206 3207 if ( getSlice()->isInterB() ) 3208 { 3209 std::cout << ((curDir & 2) ? curf2.getRefIdx() : MIN_INT) << std::setw( 15 ) 3210 << ((curDir & 1) ? curf2.getMv().getHor() : MIN_INT) << std::setw( 15 ) 3211 << ((curDir & 1) ? curf2.getMv().getVer() : MIN_INT) << std::setw( 15 ); 3212 } 3213 std::cout << std::endl; 3214 } 3215 } 3216 #endif 3166 3217 numValidMergeCand = iCount; 3167 3218 assert(iCount == getSlice()->getMaxNumMergeCand()); … … 3503 3554 continue; 3504 3555 } 3505 #if NH_3D_FIX_PRUNING3506 3556 if (hasEqualMotion( tmpDir, tmpMV, m_mergCands[MRG_A1+iCnloop].m_uDir, m_mergCands[MRG_A1+iCnloop].m_cMvField ) ) 3507 #else3508 if (tmpDir == m_mergCands[MRG_A1+iCnloop].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+iCnloop].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+iCnloop].m_cMvField[1])3509 #endif3510 3557 { 3511 3558 m_mergCands[MRG_A1+iCnloop].m_bAvailable = false; … … 3581 3628 continue; 3582 3629 } 3583 #if NH_3D_FIX_PRUNING3584 3630 if (hasEqualMotion(ivCandDir[0], tmpMV, m_mergCands[MRG_A1+i].m_uDir, m_mergCands[MRG_A1+i].m_cMvField) ) 3585 #else3586 if (ivCandDir[0] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1])3587 #endif3588 3631 { 3589 3632 m_mergCands[MRG_A1+i].m_bAvailable = false; … … 3594 3637 else 3595 3638 { 3596 #if NH_3D_FIX_PRUNING3597 3639 if( hasEqualMotion( ivCandDir[0], tmpMV, m_mergCands[MRG_T].m_uDir, m_mergCands[MRG_T].m_cMvField ) ) 3598 #else3599 if (m_mergCands[MRG_T].m_bAvailable && ivCandDir[0] == m_mergCands[MRG_T].m_uDir && tmpMV[0]==m_mergCands[MRG_T].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_T].m_cMvField[1])3600 #endif3601 3640 { 3602 3641 bRemoveSpa = true; … … 3647 3686 !bARPFlag && 3648 3687 #endif 3649 #if H_3D || NH_3D_FIX_VSP3688 #if NH_3D 3650 3689 (nPSW + nPSH > 12) && 3651 3690 #endif … … 3694 3733 continue; 3695 3734 } 3696 #if NH_3D_FIX_PRUNING3697 3735 if ( hasEqualMotion(ivCandDir[1], tmpMV, m_mergCands[MRG_A1+i].m_uDir, m_mergCands[MRG_A1+i].m_cMvField) ) 3698 #else3699 if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1])3700 #endif3701 3736 { 3702 3737 bRemoveSpa = true; … … 4852 4887 } 4853 4888 } 4889 #if NH_3D 4890 Void TComDataCU::printMV( ) 4891 { 4892 4893 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++) 4894 { 4895 std::cout << "L" << i; 4896 m_acCUMvField[i].print(m_pePredMode); 4897 } 4898 4899 } 4900 #endif 4854 4901 4855 4902 UInt TComDataCU::getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const … … 5284 5331 #if NH_3D_NBDV_REF 5285 5332 TComPic* picDepth = NULL; 5286 assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC()); 5333 assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC()); 5287 5334 #if H_3D_FCO_VSP_DONBDV_E0163 5288 5335 picDepth = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); … … 5627 5674 if(!m_pcSlice->getIsDepth()) 5628 5675 { 5629 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP5676 #if NH_3D_DBBP 5630 5677 if (!getDBBPFlag(0)) 5631 5678 #else … … 5803 5850 iCurrPosY += ( iHeight >> 1 ); 5804 5851 } 5805 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP5852 #if NH_3D_DBBP 5806 5853 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5807 5854 #else … … 5878 5925 } 5879 5926 #if NH_3D_SPIVMP 5880 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP5927 #if NH_3D_DBBP 5881 5928 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5882 5929 #else -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComDataCU.h
r1313 r1317 601 601 #if NH_3D 602 602 Void compressMV ( Int scale ); 603 Void printMV ( ); 603 604 #else 604 605 Void compressMV (); … … 644 645 645 646 Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); 646 #if NH_3D _FIX_PRUNING647 #if NH_3D 647 648 Bool hasEqualMotion ( Int dirA, const TComMvField* mvFieldA, Int dirB, const TComMvField* mvFieldB ); 648 649 #endif -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComMotionInfo.cpp
r1313 r1317 44 44 #include "TComPic.h" 45 45 #endif 46 46 #if NH_MV 47 #include <iomanip> 48 #endif 47 49 //! \ingroup TLibCommon 48 50 //! \{ … … 377 379 } 378 380 } 381 382 #if NH_MV 383 Void TComCUMvField::print(Char* pePredMode) 384 { 385 for ( Int uiPartIdx = 0; uiPartIdx < m_uiNumPartition; uiPartIdx += 1 ) 386 { 387 PredMode predMode = static_cast<PredMode>( pePredMode[ uiPartIdx ] ); 388 389 if ( predMode == MODE_INTRA) 390 { 391 std::cout << std::setfill(' ') << "(" 392 << std::setw(3) << " " << "," 393 << std::setw(3) << " " << "," 394 << std::setw(3) << " " << ")"; 395 } 396 else 397 { 398 ; 399 std::cout << std::setfill(' ') << "(" 400 << std::setw(3) << (Int) m_piRefIdx[ uiPartIdx ] << "," 401 << std::setw(3) << m_pcMv[ uiPartIdx ].getHor() << "," 402 << std::setw(3) << m_pcMv[ uiPartIdx ].getVer() << ")"; 403 } 404 } 405 } 406 407 #if NH_3D_MLC 408 Void TComMotionCand::print( Int i ) 409 { 410 if (i == 0 ) 411 { 412 413 std::cout << std::setfill(' ') << std::setw( 15 ) 414 << "Num" << std::setw( 15 ) 415 << "Avai" << std::setw( 15 ) 416 << "Dir " << std::setw( 15 ) 417 << "L0 RefIdx" << std::setw( 15 ) 418 << "L0 Hor" << std::setw( 15 ) 419 << "L0 Ver" << std::setw( 15 ) 420 << "L1 RefIdx" << std::setw( 15 ) 421 << "L1 Hor" << std::setw( 15 ) 422 << "L1 Ver" << std::setw( 15 ) 423 << "VspFlag" << std::setw( 15 ) 424 << "SPIVMPFlag" 425 << std::endl; 426 } 427 428 std::cout << std::setfill(' ') << std::setw( 15 ) 429 << i << std::setw( 15 ) 430 << m_bAvailable << std::setw( 15 ) 431 << (UInt) m_uDir << std::setw( 15 ) 432 << ((m_uDir & 1) ? m_cMvField[0].getRefIdx() : MIN_INT) << std::setw( 15 ) 433 << ((m_uDir & 1) ? m_cMvField[0].getMv().getHor() : MIN_INT) << std::setw( 15 ) 434 << ((m_uDir & 1) ? m_cMvField[0].getMv().getVer() : MIN_INT) << std::setw( 15 ) 435 << ((m_uDir & 2) ? m_cMvField[1].getRefIdx() : MIN_INT) << std::setw( 15 ) 436 << ((m_uDir & 2) ? m_cMvField[1].getMv().getHor() : MIN_INT) << std::setw( 15 ) 437 << ((m_uDir & 2) ? m_cMvField[1].getMv().getVer() : MIN_INT) << std::setw( 15 ) 438 << m_iVspFlag << std::setw( 15 ) 439 << m_bSPIVMPFlag << std::setw( 15 ) 440 << std::endl; 441 } 442 #endif 443 #endif 379 444 //! \} -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r1313 r1317 43 43 #include "CommonDef.h" 44 44 #include "TComMv.h" 45 45 46 //! \ingroup TLibCommon 46 47 //! \{ … … 188 189 189 190 Void compress(Char* pePredMode, Int scale); 191 #if NH_MV 192 Void print (Char* pePredMode); 193 #endif 190 194 }; 191 195 … … 281 285 #endif 282 286 } 287 288 289 Void print( Int i ); 290 283 291 }; 292 293 284 294 #endif 285 295 -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPic.cpp
r1313 r1317 54 54 , m_bReconstructed (false) 55 55 , m_bNeededForOutput (false) 56 #if NH_MV57 , m_bPicOutputFlag (false)58 #endif59 56 , m_uiCurrSliceIdx (0) 60 57 , m_bCheckLTMSB (false) … … 62 59 , m_layerId (0) 63 60 , m_viewId (0) 61 , m_bPicOutputFlag (false) 64 62 #if NH_3D 65 63 , m_viewIndex (0) … … 82 80 m_eRapRefList = REF_PIC_LIST_0; 83 81 m_uiRapRefIdx = 0; 82 #endif 83 #if NH_MV 84 m_isPocResettingPic = false; 85 m_hasGeneratedRefPics = false; 86 m_isFstPicOfAllLayOfPocResetPer = false; 87 m_decodingOrder = 0; 88 m_noRaslOutputFlag = false; 89 m_noClrasOutputFlag = false; 90 m_picLatencyCount = 0; 91 m_isGenerated = false; 92 m_isGeneratedCl833 = false; 93 m_activatesNewVps = false; 84 94 #endif 85 95 } … … 185 195 } 186 196 } 197 187 198 188 199 Bool TComPic::getSAOMergeAvailability(Int currAddr, Int mergeAddr) … … 231 242 232 243 #if NH_MV 233 Void TComPic::print( Bool legend ) 234 { 235 if ( legend ) 236 std::cout << std::endl << "LId" << "\t" << "POC" << "\t" << "Rec" << "\t" << "Ref" << "\t" << "LT" << "\t" << "OutMark" << "\t" << "OutFlag" << std::endl; 237 else 238 std::cout << getLayerId() << "\t" << getPOC()<< "\t" << getReconMark() << "\t" << getSlice(0)->isReferenced() << "\t" << getIsLongTerm() << "\t" << getOutputMark() << "\t" << getSlice(0)->getPicOutputFlag() <<std::endl; 239 } 240 241 TComPic* TComPicLists::getPic( Int layerIdInNuh, Int poc ) 242 { 243 TComPic* pcPic = NULL; 244 for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() && pcPic == NULL ); itL++) 245 { 246 for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() && pcPic == NULL ); itP++) 247 { 248 TComPic* currPic = (*itP); 249 if ( ( currPic->getPOC() == poc ) && ( currPic->getLayerId() == layerIdInNuh ) ) 250 { 251 pcPic = currPic ; 252 } 253 } 254 } 255 return pcPic; 244 Bool TComPic::getPocResetPeriodId() 245 { 246 return getSlice(0)->getPocResetIdc(); 247 } 248 249 Void TComPic::markAsUsedForShortTermReference() 250 { 251 getSlice(0)->setReferenced( true ); 252 setIsLongTerm( false ); 253 } 254 255 Void TComPic::markAsUsedForLongTermReference() 256 { 257 getSlice(0)->setReferenced( true ); 258 setIsLongTerm( true ); 259 } 260 261 262 Void TComPic::markAsUnusedForReference() 263 { 264 getSlice(0)->setReferenced( false ); 265 setIsLongTerm( false ); 266 } 267 268 269 Bool TComPic::getMarkedUnUsedForReference() 270 { 271 return !getSlice(0)->isReferenced( ); 272 } 273 274 275 Bool TComPic::getMarkedAsShortTerm() 276 { 277 return ( getSlice(0)->isReferenced( ) && !getIsLongTerm() ); 278 } 279 280 Void TComPic::print( Int outputLevel ) 281 { 282 if ( outputLevel== 0 ) 283 { 284 std::cout << std::endl 285 << "LId" 286 << "\t" << "POC" 287 << "\t" << "Rec" 288 << "\t" << "Ref" 289 << "\t" << "LT" 290 << "\t" << "OutMark" 291 << "\t" << "OutFlag" 292 << "\t" << "Type" 293 << "\t" << "PReFlag" 294 << std::endl; 295 } 296 else if( outputLevel == 1 ) 297 { 298 std::cout << getLayerId() 299 << "\t" << getPOC() 300 << "\t" << getReconMark() 301 << "\t" << getSlice(0)->isReferenced() 302 << "\t" << getIsLongTerm() 303 << "\t" << getOutputMark() 304 << "\t" << getSlice(0)->getPicOutputFlag() 305 << "\t" << getSlice(0)->getNalUnitTypeString() 306 << "\t" << getSlice(0)->getPocResetFlag() 307 << std::endl; 308 } 309 else if ( outputLevel == 2 ) 310 { 311 std::cout << std:: setfill(' ') 312 << " LayerId: " << std::setw(2) << getLayerId() 313 << "\t" << " POC: " << std::setw(5) << getPOC() 314 << "\t" << " Dec. Order: " << std::setw(5) << getDecodingOrder() 315 << "\t" << " Referenced: " << std::setw(1) << getSlice(0)->isReferenced() 316 << "\t" << " Pic type: " << getSlice(0)->getNalUnitTypeString() 317 << "\t" << " Generated: " << std::setw(1) << getIsGenerated() 318 << "\t" << " Gen. Ref. Pics: " << std::setw(1) << getHasGeneratedRefPics(); 319 } 320 else if ( outputLevel == 4 ) 321 { 322 std::cout << std:: setfill(' ') 323 << " LayerId: " << std::setw(2) << getLayerId() 324 << "\t" << " POC: " << std::setw(5) << getPOC() 325 << "\t" << " Referenced: " << std::setw(1) << getSlice(0)->isReferenced() << std::endl; 326 } 256 327 } 257 328 258 329 #if NH_3D 259 TComPic* TComPicLists::getPic( Int viewIndex, Bool depthFlag, Int poc ) 260 { 261 return getPic ( m_vps->getLayerIdInNuh( viewIndex, depthFlag ), poc ); 262 } 263 #endif 264 Void TComPicLists::print() 265 { 266 Bool first = true; 267 for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() ); itL++) 268 { 269 for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() ); itP++) 270 { 271 if ( first ) 272 { 273 (*itP)->print( true ); 274 first = false; 275 } 276 (*itP)->print( false ); 277 } 278 } 279 } 280 281 TComPicYuv* TComPicLists::getPicYuv( Int layerIdInNuh, Int poc, Bool reconFlag ) 282 { 283 TComPic* pcPic = getPic( layerIdInNuh, poc ); 284 TComPicYuv* pcPicYuv = NULL; 285 286 if (pcPic != NULL) 287 { 288 if( reconFlag ) 289 { 290 if ( pcPic->getReconMark() ) 291 { 292 pcPicYuv = pcPic->getPicYuvRec(); 293 } 294 } 295 else 296 { 297 pcPicYuv = pcPic->getPicYuvOrg(); 298 } 299 }; 300 301 return pcPicYuv; 302 } 303 304 #if NH_3D 305 TComPicYuv* TComPicLists::getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon ) 306 { 307 Int layerIdInNuh = m_vps->getLayerIdInNuh( viewIndex, depthFlag ); 308 return getPicYuv( layerIdInNuh, poc, recon ); 309 } 310 #if NH_3D_ARP 311 TComList<TComPic*>* TComPicLists::getPicList( Int layerIdInNuh ) 312 { 313 TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); 314 Int iLayer = 0; 315 316 assert( layerIdInNuh < m_lists.size() ); 317 318 while( iLayer != layerIdInNuh ) 319 { 320 itL++; 321 iLayer++; 322 } 323 324 return *itL; 325 } 326 #endif 327 #endif 328 #endif // NH_MV 330 Void TComPic::printMotion() 331 { 332 TComPicSym* pPicSym = getPicSym(); 333 for ( UInt uiCUAddr = 0; uiCUAddr < pPicSym->getNumberOfCtusInFrame(); uiCUAddr++ ) 334 { 335 TComDataCU* pCtu = pPicSym->getCtu(uiCUAddr); 336 std::cout << "CUAddr " << uiCUAddr << std::endl; 337 pCtu->printMV(); 338 std::cout << std::endl; 339 } 340 } 329 341 330 342 #if NH_3D_NBDV … … 437 449 m_abTIVRINCurrRL[curCandPic][iColRefDir][iColRefIdx] = false; 438 450 Int iColViewIdx = pcCandColSlice->getViewIndex(); 451 #if H_3D_FIX_ARP_CHECK_NOT_IN_DPB 452 // The picture pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx) might not be in DPB anymore 453 // So don't access it directly. 454 Int iColRefViewIdx = pcCandColSlice->getVPS()->getViewOrderIdx( pcCandColSlice->getRefLayerId( (RefPicList)iColRefDir, iColRefIdx ) ); 455 #else 439 456 Int iColRefViewIdx = pcCandColSlice->getRefPic((RefPicList)iColRefDir, iColRefIdx)->getViewIndex(); 457 #endif 440 458 if(iColViewIdx == iColRefViewIdx) 441 459 { … … 487 505 { 488 506 if(pcCurrSlice->getRefPOC((RefPicList)iCurrRefDir, iCurrRefIdx ) == iTextRefPOC && 489 507 pcCurrSlice->getRefPic((RefPicList)iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId) 490 508 { 491 m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx; 509 m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx; 492 510 } 493 511 } … … 504 522 } 505 523 #endif 524 #endif 525 526 Void TComAu::setPicLatencyCount( Int picLatenyCount ) 527 { 528 for(TComList<TComPic*>::iterator itP= begin(); itP!= end(); itP++) 529 { 530 (*itP)->setPicLatencyCount( picLatenyCount ); 531 } 532 } 533 534 TComPic* TComAu::getPic( Int nuhLayerId ) 535 { 536 TComPic* pic = NULL; 537 for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++) 538 { 539 if ( (*itP)->getLayerId() == nuhLayerId ) 540 { 541 pic = (*itP); 542 } 543 } 544 return pic; 545 } 546 547 Void TComAu::addPic( TComPic* pic, Bool pocUnkown ) 548 { 549 if ( !empty() ) 550 { 551 if (!pocUnkown) 552 { 553 assert( pic->getPOC() == ( getPoc() )); 554 } 555 pic->setPicLatencyCount( getPicLatencyCount() ); 556 557 assert( getPic( pic->getLayerId() ) == NULL ); 558 559 // Add sorted 560 TComAu::iterator itP = begin(); 561 Bool inserted = false; 562 while( !inserted ) 563 { 564 if ( ( itP == end()) || pic->getLayerId() < (*itP)->getLayerId() ) 565 { 566 insert(itP, pic ); 567 inserted = true; 568 } 569 else 570 { 571 ++itP; 572 } 573 } 574 } 575 else 576 { 577 pushBack( pic ); 578 } 579 } 580 581 Bool TComAu::containsPic( TComPic* pic ) 582 { 583 Bool isInList = false; 584 for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (!isInList) ); itP++) 585 { 586 isInList = isInList || ( pic == (*itP)); 587 } 588 return isInList; 589 } 590 591 TComSubDpb::TComSubDpb( Int nuhLayerid ) 592 { 593 m_nuhLayerId = nuhLayerid; 594 } 595 596 TComPic* TComSubDpb::getPic( Int poc ) 597 { 598 TComPic* pic = NULL; 599 for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++) 600 { 601 if ( (*itP)->getPOC() == poc ) 602 { 603 pic = (*itP); 604 } 605 } 606 return pic; 607 } 608 609 TComPic* TComSubDpb::getPicFromLsb( Int pocLsb, Int maxPicOrderCntLsb ) 610 { 611 TComPic* pic = NULL; 612 for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++) 613 { 614 if ( ( (*itP)->getPOC() & ( maxPicOrderCntLsb - 1 ) ) == pocLsb ) 615 { 616 pic = (*itP); 617 } 618 } 619 return pic; 620 } 621 622 TComPic* TComSubDpb::getShortTermRefPic( Int poc ) 623 { 624 TComPic* pic = NULL; 625 for(TComList<TComPic*>::iterator itP= begin(); ( itP!= end() && (pic == NULL) ); itP++) 626 { 627 if ( (*itP)->getPOC() == poc && (*itP)->getMarkedAsShortTerm() ) 628 { 629 pic = (*itP); 630 } 631 } 632 return pic; 633 } 634 635 TComList<TComPic*> TComSubDpb::getPicsMarkedNeedForOutput() 636 { 637 TComList<TComPic*> picsMarkedNeedForOutput; 638 639 for(TComList<TComPic*>::iterator itP= begin(); itP!= end() ; itP++ ) 640 { 641 if ( (*itP)->getOutputMark() ) 642 { 643 picsMarkedNeedForOutput.push_back( (*itP) ); 644 } 645 } 646 return picsMarkedNeedForOutput; 647 } 648 649 Void TComSubDpb::markAllAsUnusedForReference() 650 { 651 for(TComList<TComPic*>::iterator itP= begin(); itP!= end() ; itP++ ) 652 { 653 (*itP)->markAsUnusedForReference(); 654 } 655 } 656 657 Void TComSubDpb::addPic( TComPic* pic ) 658 { 659 assert( pic != NULL ); 660 assert( m_nuhLayerId == pic->getLayerId() || m_nuhLayerId == -1); 661 if ( !empty() ) 662 { 663 assert( getPic( pic->getPOC() ) == NULL ); // Don't add twice; assert( pic->getLayerId() == m_nuhLayerId ); 664 665 // Add sorted 666 TComSubDpb::iterator itP = begin(); 667 Bool inserted = false; 668 while( !inserted ) 669 { 670 if ( ( itP == end()) || pic->getPOC() < (*itP)->getPOC() ) 671 { 672 insert(itP, pic ); 673 inserted = true; 674 } 675 else 676 { 677 ++itP; 678 } 679 } 680 } 681 else 682 { 683 pushBack( pic ); 684 } 685 } 686 687 Void TComSubDpb::removePics( std::vector<TComPic*> picToRemove ) 688 { 689 for (Int i = 0; i < picToRemove.size(); i++ ) 690 { 691 if( picToRemove[i] != NULL) 692 { 693 remove( picToRemove[i] ); 694 } 695 } 696 } 697 698 Bool TComSubDpb::areAllPicsMarkedNotNeedForOutput() 699 { 700 return ( getPicsMarkedNeedForOutput().size() == 0 ); 701 } 702 703 704 TComPicLists::~TComPicLists() 705 { 706 emptyAllSubDpbs(); 707 for(TComList<TComSubDpb*>::iterator itL = m_subDpbs.begin(); ( itL != m_subDpbs.end()); itL++) 708 { 709 if ( (*itL) != NULL ) 710 { 711 delete (*itL); 712 (*itL) = NULL; 713 } 714 } 715 } 716 717 Void TComPicLists::addNewPic( TComPic* pic ) 718 { 719 getSubDpb ( pic->getLayerId() , true )->addPic( pic ); 720 getAu ( pic->getPOC() , true )->addPic( pic , false ); 721 if ( m_printPicOutput ) 722 { 723 std::cout << " Add picture: "; 724 pic->print( 2 ); 725 std::cout << std::endl; 726 } 727 } 728 729 Void TComPicLists::removePic( TComPic* pic ) 730 { 731 if (pic != NULL) 732 { 733 734 TComSubDpb* curSubDpb = getSubDpb( pic->getLayerId(), false ); 735 curSubDpb->remove( pic ); 736 737 TComAu* curAu = getAu ( pic->getPOC(), false ); 738 739 if (curAu != NULL) 740 { 741 curAu->remove( pic ); 742 // Remove AU when empty. 743 if (curAu->empty() ) 744 { 745 m_aus.remove( curAu ); 746 delete curAu; 747 } 748 } 749 750 if ( m_printPicOutput ) 751 { 752 std::cout << " Remove picture: "; 753 pic->print( 2 ); 754 std::cout << std::endl; 755 } 756 757 pic->destroy(); 758 delete pic; 759 } 760 } 761 762 TComPic* TComPicLists::getPic( Int layerIdInNuh, Int poc ) 763 { 764 TComPic* pcPic = NULL; 765 TComSubDpb* subDpb = getSubDpb( layerIdInNuh, false ); 766 if ( subDpb != NULL ) 767 { 768 pcPic = subDpb->getPic( poc ); 769 } 770 return pcPic; 771 } 772 773 TComPicYuv* TComPicLists::getPicYuv( Int layerIdInNuh, Int poc, Bool reconFlag ) 774 { 775 TComPic* pcPic = getPic( layerIdInNuh, poc ); 776 TComPicYuv* pcPicYuv = NULL; 777 778 if (pcPic != NULL) 779 { 780 if( reconFlag ) 781 { 782 if ( pcPic->getReconMark() ) 783 { 784 pcPicYuv = pcPic->getPicYuvRec(); 785 } 786 } 787 else 788 { 789 pcPicYuv = pcPic->getPicYuvOrg(); 790 } 791 }; 792 793 return pcPicYuv; 794 } 795 796 TComSubDpb* TComPicLists::getSubDpb( Int nuhLayerId, Bool create ) 797 { 798 TComSubDpb* subDpb = NULL; 799 for(TComList<TComSubDpb*>::iterator itL = m_subDpbs.begin(); ( itL != m_subDpbs.end() && subDpb == NULL ); itL++) 800 { 801 if ( (*itL)->getLayerId() == nuhLayerId ) 802 { 803 subDpb = (*itL); 804 } 805 } 806 if ( subDpb == NULL && create ) 807 { 808 m_subDpbs.push_back( new TComSubDpb(nuhLayerId) ); 809 } 810 return subDpb; 811 } 812 813 TComList<TComSubDpb*>* TComPicLists::getSubDpbs() 814 { 815 return (&m_subDpbs); 816 } 817 818 TComAu* TComPicLists::addAu( Int poc ) 819 { 820 TComList<TComAu*>::iterator itA = m_aus.begin(); 821 822 assert( getAu(poc, false) == NULL ); 823 Bool inserted = false; 824 while( !inserted) 825 { 826 if ( ( itA == m_aus.end()) || poc < (*itA)->getPoc() ) 827 { 828 m_aus.insert(itA, new TComAu ); 829 inserted = true; 830 --itA; 831 } 832 else 833 { 834 ++itA; 835 } 836 } 837 return (*itA); 838 } 839 840 TComAu* TComPicLists::getAu( Int poc, Bool create ) 841 { 842 TComAu* au = NULL; 843 844 for( TComList<TComAu*>::iterator itA = m_aus.begin(); ( itA != m_aus.end() && au == NULL ); itA++) 845 { 846 if ( (*itA)->getPoc() == poc ) 847 { 848 au = (*itA); 849 } 850 } 851 852 if ( au == NULL && create ) 853 { 854 au = addAu( poc ); 855 } 856 return au; 857 } 858 859 TComList<TComAu*>* TComPicLists::getAus() 860 { 861 return (&m_aus); 862 } 863 864 TComList<TComAu*> TComPicLists::getAusHavingPicsMarkedForOutput() 865 { 866 TComList<TComAu*> ausHavingPicsForOutput; 867 for(TComList<TComAu*>::iterator itA= m_aus.begin(); ( itA!=m_aus.end()); itA++) 868 { 869 Bool hasPicMarkedAsNeedForOutput = false; 870 for( TComAu::iterator itP= (*itA)->begin(); (itP!=(*itA)->end() && !hasPicMarkedAsNeedForOutput); itP++ ) 871 { 872 if( (*itP)->getOutputMark() ) 873 { 874 hasPicMarkedAsNeedForOutput = true; 875 } 876 } 877 if (hasPicMarkedAsNeedForOutput) 878 { 879 ausHavingPicsForOutput.pushBack( (*itA) ); 880 } 881 } 882 return ausHavingPicsForOutput; 883 } 884 885 Void TComPicLists::markSubDpbAsUnusedForReference( Int layerIdInNuh ) 886 { 887 TComSubDpb* subDpb = getSubDpb( layerIdInNuh, false ); 888 markSubDpbAsUnusedForReference( *subDpb ); 889 } 890 891 Void TComPicLists::markSubDpbAsUnusedForReference( TComSubDpb& subDpb ) 892 { 893 for(TComList<TComPic*>::iterator itP=subDpb.begin(); ( itP!=subDpb.end()); itP++) 894 { 895 (*itP)->markAsUnusedForReference(); 896 } 897 } 898 899 Void TComPicLists::markAllSubDpbAsUnusedForReference() 900 { 901 for(TComList<TComSubDpb*>::iterator itS= m_subDpbs.begin(); ( itS!=m_subDpbs.end()); itS++) 902 { 903 markSubDpbAsUnusedForReference( *(*itS) ); 904 } 905 } 906 907 Void TComPicLists::decrementPocsInSubDpb( Int nuhLayerId, Int deltaPocVal ) 908 { 909 TComSubDpb* subDpb = getSubDpb( nuhLayerId, false ); 910 911 for(TComSubDpb::iterator itP = subDpb->begin(); itP!=subDpb->end(); itP++) 912 { 913 TComPic* pic = (*itP); 914 for (Int i = 0; i < pic->getNumAllocatedSlice(); i++) 915 { 916 TComSlice* slice = pic->getSlice(i); 917 slice->setPOC( slice->getPOC() - deltaPocVal ); 918 } 919 } 920 } 921 Void TComPicLists::emptyAllSubDpbs() 922 { 923 emptySubDpbs( &m_subDpbs ); 924 } 925 926 Void TComPicLists::emptySubDpbs( TComList<TComSubDpb*>* subDpbs ) 927 { 928 assert( subDpbs != NULL ); 929 for( TComList<TComSubDpb*>::iterator itS = subDpbs->begin(); itS != subDpbs->end(); itS++ ) 930 { 931 emptySubDpb( (*itS) ); 932 } 933 } 934 935 Void TComPicLists::emptySubDpb( TComSubDpb* subDpb ) 936 { 937 if(subDpb != NULL) 938 { 939 while( !subDpb->empty() ) 940 { 941 TComPic* curPic = *(subDpb->begin()); 942 removePic( curPic ); 943 } 944 } 945 } 946 947 Void TComPicLists::emptySubDpb( Int nuhLayerId ) 948 { 949 emptySubDpb( getSubDpb( nuhLayerId , false) ); 950 } 951 952 Void TComPicLists::emptyNotNeedForOutputAndUnusedForRef() 953 { 954 for(TComList<TComSubDpb*>::iterator itS= m_subDpbs.begin(); ( itS!=m_subDpbs.end()); itS++) 955 { 956 emptySubDpbNotNeedForOutputAndUnusedForRef( *(*itS) ); 957 } 958 } 959 960 Void TComPicLists::emptySubDpbNotNeedForOutputAndUnusedForRef( Int layerId ) 961 { 962 TComSubDpb* subDpb = getSubDpb( layerId, false ); 963 emptySubDpbNotNeedForOutputAndUnusedForRef( *subDpb ); 964 } 965 966 Void TComPicLists::emptySubDpbNotNeedForOutputAndUnusedForRef( TComSubDpb subDpb ) 967 { 968 for(TComSubDpb::iterator itP= subDpb.begin(); ( itP!=subDpb.end()); itP++) 969 { 970 TComPic* pic = (*itP); 971 if ( !pic->getOutputMark() && pic->getMarkedUnUsedForReference() ) 972 { 973 removePic( pic ); 974 } 975 } 976 } 977 978 Void TComPicLists::print() 979 { 980 Bool first = true; 981 for(TComList<TComSubDpb*>::iterator itL = m_subDpbs.begin(); ( itL != m_subDpbs.end() ); itL++) 982 { 983 for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() ); itP++) 984 { 985 if ( first ) 986 { 987 (*itP)->print( true ); 988 first = false; 989 } 990 (*itP)->print( false ); 991 } 992 } 993 } 994 995 #if NH_3D 996 TComPicYuv* TComPicLists::getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon ) 997 { 998 Int layerIdInNuh = m_vps->getLayerIdInNuh( viewIndex, depthFlag ); 999 return getPicYuv( layerIdInNuh, poc, recon ); 1000 } 1001 1002 TComPic* TComPicLists::getPic( Int viewIndex, Bool depthFlag, Int poc ) 1003 { 1004 return getPic ( m_vps->getLayerIdInNuh( viewIndex, depthFlag ), poc ); 1005 } 1006 1007 #endif 1008 1009 #endif 1010 1011 506 1012 507 1013 508 1014 //! \} 1015 -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPic.h
r1313 r1317 54 54 /// picture class (symbol + YUV buffers) 55 55 56 57 58 #if NH_MV 59 class TComPic; 60 61 class TComDecodedRps 62 { 63 public: 64 65 TComDecodedRps() 66 { 67 m_refPicSetsCurr[0] = &m_refPicSetStCurrBefore; 68 m_refPicSetsCurr[1] = &m_refPicSetStCurrAfter ; 69 m_refPicSetsCurr[2] = &m_refPicSetLtCurr ; 70 71 m_refPicSetsLt [0] = &m_refPicSetLtCurr ; 72 m_refPicSetsLt [1] = &m_refPicSetLtFoll ; 73 74 m_refPicSetsAll [0] = &m_refPicSetStCurrBefore; 75 m_refPicSetsAll [1] = &m_refPicSetStCurrAfter ; 76 m_refPicSetsAll [2] = &m_refPicSetStFoll ; 77 m_refPicSetsAll [3] = &m_refPicSetLtCurr ; 78 m_refPicSetsAll [4] = &m_refPicSetLtFoll ; 79 }; 80 81 std::vector<Int> m_pocStCurrBefore; 82 std::vector<Int> m_pocStCurrAfter; 83 std::vector<Int> m_pocStFoll; 84 std::vector<Int> m_pocLtCurr; 85 std::vector<Int> m_pocLtFoll; 86 87 Int m_numPocStCurrBefore; 88 Int m_numPocStCurrAfter; 89 Int m_numPocStFoll; 90 Int m_numPocLtCurr; 91 Int m_numPocLtFoll; 92 93 std::vector<TComPic*> m_refPicSetStCurrBefore; 94 std::vector<TComPic*> m_refPicSetStCurrAfter; 95 std::vector<TComPic*> m_refPicSetStFoll; 96 std::vector<TComPic*> m_refPicSetLtCurr; 97 std::vector<TComPic*> m_refPicSetLtFoll; 98 99 std::vector<TComPic*>* m_refPicSetsCurr[3]; 100 std::vector<TComPic*>* m_refPicSetsLt [2]; 101 std::vector<TComPic*>* m_refPicSetsAll [5]; 102 103 // Annex F 104 Int m_numActiveRefLayerPics0; 105 Int m_numActiveRefLayerPics1; 106 107 std::vector<TComPic*> m_refPicSetInterLayer0; 108 std::vector<TComPic*> m_refPicSetInterLayer1; 109 }; 110 #endif 111 56 112 class TComPic 57 113 { … … 72 128 Bool m_bReconstructed; 73 129 Bool m_bNeededForOutput; 74 #if NH_MV 75 Bool m_bPicOutputFlag; // Semantics variable 76 #endif 130 77 131 UInt m_uiCurrSliceIdx; // Index of current slice 78 132 Bool m_bCheckLTMSB; … … 87 141 Int m_layerId; 88 142 Int m_viewId; 143 Bool m_bPicOutputFlag; // Semantics variable 144 Bool m_hasGeneratedRefPics; 145 Bool m_isPocResettingPic; 146 Bool m_isFstPicOfAllLayOfPocResetPer; 147 Int64 m_decodingOrder; 148 Bool m_noRaslOutputFlag; 149 Bool m_noClrasOutputFlag; 150 Int m_picLatencyCount; 151 Bool m_isGenerated; 152 Bool m_isGeneratedCl833; 153 Bool m_activatesNewVps; 154 TComDecodedRps m_decodedRps; 155 #endif 89 156 #if NH_3D 90 157 Int m_viewIndex; … … 92 159 Int** m_aaiCodedScale; 93 160 Int** m_aaiCodedOffset; 94 #endif95 #endif96 161 #if NH_3D_QTLPC 97 162 Bool m_bReduceBitsQTL; 98 163 #endif 99 164 #if NH_3D_NBDV 100 UInt m_uiRapRefIdx;101 RefPicList m_eRapRefList;102 Int m_iNumDdvCandPics;103 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists104 Int m_aiTexToDepRef [2][MAX_NUM_REF];105 #endif 106 165 UInt m_uiRapRefIdx; 166 RefPicList m_eRapRefList; 167 Int m_iNumDdvCandPics; 168 Bool m_abTIVRINCurrRL [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists 169 Int m_aiTexToDepRef [2][MAX_NUM_REF]; 170 #endif 171 #endif 107 172 public: 108 173 TComPic(); … … 115 180 UInt getTLayer() const { return m_uiTLayer; } 116 181 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 117 #if NH_MV118 Void setLayerId ( Int layerId ) { m_layerId = layerId; }119 Int getLayerId () { return m_layerId; }120 Void setViewId ( Int viewId ) { m_viewId = viewId; }121 Int getViewId () { return m_viewId; }122 #if NH_3D123 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; }124 Int getViewIndex () { return m_viewIndex; }125 126 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; }127 Bool getIsDepth () { return m_isDepth; }128 129 Void setScaleOffset( Int** pS, Int** pO ) { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; }130 Int** getCodedScale () { return m_aaiCodedScale; }131 Int** getCodedOffset() { return m_aaiCodedOffset; }132 #endif133 #endif134 #if NH_3D_QTLPC135 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; }136 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; }137 #endif138 182 139 183 Bool getUsedByCurr() const { return m_bUsedByCurr; } … … 177 221 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 178 222 Bool getOutputMark () const { return m_bNeededForOutput; } 179 #if NH_MV 180 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 181 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } 182 #endif 183 #if NH_3D 184 #if NH_3D_ARP 185 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 186 #endif 187 Void compressMotion(Int scale); 188 #else 223 224 #if !NH_3D 189 225 Void compressMotion(); 190 226 #endif … … 210 246 211 247 #if NH_MV 212 Void print( Bool legend ); 248 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 249 Int getLayerId () { return m_layerId; } 250 251 Void setViewId ( Int viewId ) { m_viewId = viewId; } 252 Int getViewId () { return m_viewId; } 253 254 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 255 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } 256 257 Bool getPocResetPeriodId(); 258 259 Void markAsUsedForShortTermReference(); 260 Void markAsUsedForLongTermReference(); 261 Void markAsUnusedForReference(); 262 263 Bool getMarkedUnUsedForReference(); 264 Bool getMarkedAsShortTerm(); 265 266 Void setHasGeneratedRefPics(Bool val) { m_hasGeneratedRefPics = val; } 267 Bool getHasGeneratedRefPics( ) { return m_hasGeneratedRefPics; } 268 269 Void setIsPocResettingPic(Bool val) { m_isPocResettingPic = val; } 270 Bool getIsPocResettingPic( ) { return m_isPocResettingPic; } 271 272 Void setIsFstPicOfAllLayOfPocResetPer(Bool val) { m_isFstPicOfAllLayOfPocResetPer = val; } 273 Bool getIsFstPicOfAllLayOfPocResetPer( ) { return m_isFstPicOfAllLayOfPocResetPer; } 274 275 Int64 getDecodingOrder( ) { return m_decodingOrder; } 276 Void setDecodingOrder( UInt64 val ) { m_decodingOrder = val; } 277 278 Bool getNoRaslOutputFlag() { return m_noRaslOutputFlag; } 279 Void setNoRaslOutputFlag( Bool b ) { m_noRaslOutputFlag = b; } 280 281 Bool getNoClrasOutputFlag() { return m_noClrasOutputFlag; } 282 Void setNoClrasOutputFlag( Bool b ) { m_noClrasOutputFlag = b; } 283 284 Int getPicLatencyCount() { return m_picLatencyCount; } 285 Void setPicLatencyCount( Int val ) { m_picLatencyCount = val; } 286 287 Bool getIsGenerated() const { return m_isGenerated; } 288 Void setIsGenerated( Bool b ) { m_isGenerated = b; } 289 290 Bool getIsGeneratedCl833() const { return m_isGeneratedCl833; } 291 Void setIsGeneratedCl833( Bool b ) { m_isGeneratedCl833 = b; } 292 293 Int getTemporalId( ) { return getSlice(0)->getTemporalId(); } 294 295 Bool getActivatesNewVps() { return m_activatesNewVps; } 296 Void setActivatesNewVps( Bool b ) { m_activatesNewVps = b; } 297 298 TComDecodedRps* getDecodedRps() { return &m_decodedRps; } 299 300 Bool isIrap() { return getSlice(0)->isIRAP(); } 301 Bool isBla () { return getSlice(0)->isBla (); } 302 Bool isIdr () { return getSlice(0)->isIdr (); } 303 Bool isCra () { return getSlice(0)->isCra (); } 304 Bool isSlnr () { return getSlice(0)->isSlnr (); } 305 Bool isRasl () { return getSlice(0)->isRasl (); } 306 Bool isRadl () { return getSlice(0)->isRadl (); } 307 Bool isStsa () { return getSlice(0)->isStsa (); } 308 Bool isTsa () { return getSlice(0)->isTsa (); } 309 310 Void print( Int outputLevel ); 311 312 #if NH_3D 313 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 314 Int getViewIndex () { return m_viewIndex; } 315 316 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 317 Bool getIsDepth () { return m_isDepth; } 318 319 Void setScaleOffset( Int** pS, Int** pO ) { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; } 320 Int** getCodedScale () { return m_aaiCodedScale; } 321 Int** getCodedOffset() { return m_aaiCodedOffset; } 322 323 Void compressMotion(Int scale); 324 Void printMotion( ); 325 #if NH_3D_ARP 326 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 327 #endif 328 #if NH_3D_QTLPC 329 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 330 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } 213 331 #endif 214 332 #if NH_3D_NBDV 215 Int getNumDdvCandPics() {return m_iNumDdvCandPics; } 216 Int getDisCandRefPictures(Int iColPOC); 217 Void setRapRefIdx(UInt uiRapRefIdx) {m_uiRapRefIdx = uiRapRefIdx;} 218 Void setRapRefList(RefPicList eRefPicList) {m_eRapRefList = eRefPicList;} 219 Void setNumDdvCandPics (Int i) {m_iNumDdvCandPics = i; } 220 UInt getRapRefIdx() {return m_uiRapRefIdx; } 221 RefPicList getRapRefList() {return m_eRapRefList; } 222 Void checkTemporalIVRef(); 223 Bool isTempIVRefValid(Int currCandPic, Int iTempRefDir, Int iTempRefIdx); 224 Void checkTextureRef( ); 225 Int isTextRefValid(Int iTextRefDir, Int iTextRefIdx); 333 Int getNumDdvCandPics() { return m_iNumDdvCandPics; } 334 Int getDisCandRefPictures(Int iColPOC); 335 Void setRapRefIdx(UInt uiRapRefIdx) { m_uiRapRefIdx = uiRapRefIdx; } 336 Void setRapRefList(RefPicList eRefPicList) { m_eRapRefList = eRefPicList; } 337 Void setNumDdvCandPics (Int i) { m_iNumDdvCandPics = i; } 338 UInt getRapRefIdx() { return m_uiRapRefIdx; } 339 RefPicList getRapRefList() { return m_eRapRefList; } 340 Void checkTemporalIVRef(); 341 Bool isTempIVRefValid(Int currCandPic, Int iTempRefDir, Int iTempRefIdx); 342 Void checkTextureRef( ); 343 Int isTextRefValid(Int iTextRefDir, Int iTextRefIdx); 344 #endif 345 #endif 226 346 #endif 227 347 … … 241 361 242 362 #if NH_MV 363 364 class TComAu : public TComList<TComPic*> 365 { 366 367 public: 368 369 Int getPoc ( ) { assert(!empty()); return back()->getPOC (); } 370 Void setPicLatencyCount( Int picLatenyCount ); 371 Int getPicLatencyCount( ) { assert(!empty()); return back()->getPicLatencyCount(); } 372 TComPic* getPic ( Int nuhLayerId ); 373 Void addPic ( TComPic* pic, Bool pocUnkown ); 374 Bool containsPic ( TComPic* pic ); 375 }; 376 377 378 class TComSubDpb : public TComList<TComPic*> 379 { 380 private: 381 Int m_nuhLayerId; 382 public: 383 TComSubDpb( Int nuhLayerid ); 384 385 Int getLayerId ( ) { return m_nuhLayerId; } 386 387 TComPic* getPic ( Int poc ); 388 TComPic* getPicFromLsb ( Int pocLsb, Int maxPicOrderCntLsb ); 389 TComPic* getShortTermRefPic ( Int poc ); 390 TComList<TComPic*> getPicsMarkedNeedForOutput ( ); 391 392 Void markAllAsUnusedForReference ( ); 393 394 Void addPic ( TComPic* pic ); 395 Void removePics ( std::vector<TComPic*> picToRemove ); 396 Bool areAllPicsMarkedNotNeedForOutput( ); 397 }; 398 243 399 class TComPicLists 244 400 { 245 401 private: 246 TComList<TComList<TComPic*>*> m_lists; 247 #if NH_3D 248 const TComVPS* m_vps; 402 TComList<TComAu* > m_aus; 403 TComList<TComSubDpb*> m_subDpbs; 404 Bool m_printPicOutput; 405 #if NH_3D 406 const TComVPS* m_vps; 249 407 #endif 250 408 public: 251 Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); } 252 Int size () { return (Int) m_lists.size(); } 253 #if NH_3D_ARP 254 TComList<TComPic*>* getPicList ( Int layerIdInNuh ); 255 #endif 256 TComPic* getPic ( Int layerIdInNuh, Int poc ); 257 TComPicYuv* getPicYuv( Int layerIdInNuh, Int poc, Bool recon ); 258 #if NH_3D 259 Void setVPS ( const TComVPS* vps ) { m_vps = vps; }; 260 TComPic* getPic ( Int viewIndex, Bool depthFlag, Int poc ); 261 TComPicYuv* getPicYuv( Int viewIndex, Bool depthFlag, Int poc, Bool recon ); 409 ~TComPicLists(); 410 411 // Add and remove single pictures 412 Void addNewPic( TComPic* pic ); 413 Void removePic( TComPic* pic ); 414 415 // Get Pics 416 TComPic* getPic ( Int layerIdInNuh, Int poc ); 417 TComPicYuv* getPicYuv ( Int layerIdInNuh, Int poc, Bool recon ); 418 419 // Get and AUs and SubDPBs 420 TComSubDpb* getSubDpb ( Int nuhLayerId, Bool create ); 421 TComList<TComSubDpb*>* getSubDpbs ( ); 422 423 TComAu* addAu ( Int poc ); 424 TComAu* getAu ( Int poc, Bool create ); 425 TComList<TComAu*>* getAus ( ); 426 TComList<TComAu*> getAusHavingPicsMarkedForOutput( ); 427 428 // Mark pictures and set POCs 429 Void markSubDpbAsUnusedForReference ( Int layerIdInNuh ); 430 Void markSubDpbAsUnusedForReference ( TComSubDpb& subDpb ); 431 Void markAllSubDpbAsUnusedForReference( ); 432 Void decrementPocsInSubDpb ( Int nuhLayerId, Int deltaPocVal ); 433 434 // Empty Sub DPBs 435 Void emptyAllSubDpbs ( ); 436 Void emptySubDpbs ( TComList<TComSubDpb*>* subDpbs); 437 Void emptySubDpb ( TComSubDpb* subDpb); 438 Void emptySubDpb ( Int nuhLayerId ); 439 440 Void emptyNotNeedForOutputAndUnusedForRef ( ); 441 Void emptySubDpbNotNeedForOutputAndUnusedForRef( Int layerId ); 442 Void emptySubDpbNotNeedForOutputAndUnusedForRef( TComSubDpb subDpb ); 443 444 // For printing to std::out 445 Void setPrintPicOutput ( Bool printPicOutput ) { m_printPicOutput = printPicOutput; }; 446 Void print(); 447 448 #if NH_3D 449 Void setVPS ( const TComVPS* vps ) { m_vps = vps; }; 450 TComPic* getPic ( Int viewIndex, Bool depthFlag, Int poc ); 451 TComPicYuv* getPicYuv ( Int viewIndex, Bool depthFlag, Int poc, Bool recon ); 262 452 #endif 263 453 264 Void print( ); 265 266 }; // END CLASS DEFINITION TComPicLists 267 268 #endif 454 }; 455 456 // END CLASS DEFINITION TComPicLists 457 458 #endif 459 269 460 270 461 //! \} -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPicYuv.h
r1313 r1317 166 166 // Set border extension flag 167 167 Void setBorderExtension(Bool b) { m_bIsBorderExtended = b; } 168 #if NH_MV 169 Bool getBorderExtension( ) { return m_bIsBorderExtended; } 170 #endif 168 171 #if NH_3D 169 172 // Set Function -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r1313 r1317 584 584 pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]); 585 585 } 586 #if H_3D_ARP || NH_3D_ALIGN_SPIVMP_RP // check this!586 #if NH_3D_ARP 587 587 if( pcCU->getARPW( uiPartAddr ) != 0 ) 588 588 { … … 1302 1302 TComMv cMv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); 1303 1303 pcCU->clipMv(cMv); 1304 1305 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 1306 if ( g_traceMotionInfoBeforUniPred ) 1307 { 1308 std::cout << "RefPic POC : " << pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC() << std::endl; 1309 std::cout << "RefPic Layer Id: " << pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getLayerId() << std::endl; 1310 std::cout << "RefIdx : " << iRefIdx << std::endl; 1311 std::cout << "RefPIcList : " << eRefPicList << std::endl; 1312 } 1313 #endif 1314 1304 1315 #if NH_MV 1305 1316 pcCU->checkMvVertRest(cMv, eRefPicList, iRefIdx ); … … 1309 1320 { 1310 1321 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC() ) 1311 {1322 { 1312 1323 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , pcYuvPred , bi ); 1313 }1314 else1315 {1324 } 1325 else 1326 { 1316 1327 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, bi ); 1317 1328 } 1318 } 1319 else 1320 { 1321 #endif 1322 for (UInt comp=COMPONENT_Y; comp<pcYuvPred->getNumberValidComponents(); comp++) 1323 { 1324 const ComponentID compID=ComponentID(comp); 1329 } 1330 else 1331 { 1332 #endif 1333 1334 for (UInt comp=COMPONENT_Y; comp<pcYuvPred->getNumberValidComponents(); comp++) 1335 { 1336 const ComponentID compID=ComponentID(comp); 1325 1337 #if NH_3D_IC 1326 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ) && ( isLuma(compID) || (iWidth > 8) );1338 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ) && ( isLuma(compID) || (iWidth > 8) ); 1327 1339 xPredInterBlk(compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) 1328 1340 #if NH_3D_ARP … … 1331 1343 , bICFlag ); 1332 1344 #else 1333 xPredInterBlk (compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) );1334 #endif 1335 }1345 xPredInterBlk (compID, pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, pcYuvPred, bi, pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID)) ); 1346 #endif 1347 } 1336 1348 #if NH_3D_ARP 1337 1349 } … … 1813 1825 ) 1814 1826 { 1827 #if NH_MV 1828 assert( refPic->getBorderExtension() ); 1829 #endif 1815 1830 Int refStride = refPic->getStride(compID); 1816 1831 Int dstStride = dstPic->getStride(compID); -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComPrediction.h
r1313 r1317 176 176 Void combineSegmentsWithMask( TComYuv* pInYuv[2], TComYuv* pOutYuv, Bool* pMask, UInt uiWidth, UInt uiHeight, UInt uiPartAddr, UInt partSize, Int bitDepthY ); 177 177 #endif 178 178 #if NH_3D 179 179 Pel predIntraGetPredValDC ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft ); 180 180 #endif 181 181 Pel* getPredictorPtr ( const ComponentID compID, const Bool bUseFilteredPredictions ) 182 182 { -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r1313 r1317 133 133 } 134 134 135 #if NH_MV 135 136 D_PRINT_INDENT( g_traceRDCost, "Dist: " + n2s(uiDistortion) + " Bits: " + n2s(uiBits) + " RD Cost: " + n2s(dRdCost)); 137 #endif 136 138 return dRdCost; 137 139 } … … 603 605 cDtParam.bitDepth = bitDepth; 604 606 605 #if NH_3D_IC_FIX606 607 cDtParam.bUseIC = false; 607 #endif608 608 #if NH_3D_SDC_INTER 609 609 cDtParam.bUseSDCMRSAD = false; … … 3685 3685 } 3686 3686 3687 #if NH_MV 3687 3688 D_PRINT_INDENT( g_traceRDCost, "VSO Dist: " + n2s(uiDistortion) + " Bits: " + n2s(uiBits) + " RD Cost: " + n2s(dRdCost)); 3689 #endif 3688 3690 3689 3691 return dRdCost; -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComRom.cpp
r1313 r1317 222 222 #if NH_MV 223 223 #if H_MV_HLS_PTL_LIMITS 224 g_generalTierAndLevelLimits[ Level::LEVEL1 ] = TComGeneralTierAndLevelLimits( 36864, 350, INT_MIN, 16, 1, 1 );225 g_generalTierAndLevelLimits[ Level::LEVEL2 ] = TComGeneralTierAndLevelLimits( 122880, 1500, INT_MIN, 16, 1, 1 );226 g_generalTierAndLevelLimits[ Level::LEVEL2_1 ] = TComGeneralTierAndLevelLimits( 245760, 3000, INT_MIN, 20, 1, 1 );227 g_generalTierAndLevelLimits[ Level::LEVEL3 ] = TComGeneralTierAndLevelLimits( 552960, 6000, INT_MIN, 30, 2, 2 );228 g_generalTierAndLevelLimits[ Level::LEVEL3_1 ] = TComGeneralTierAndLevelLimits( 983040, 10000, INT_MIN, 40, 3, 3 );224 g_generalTierAndLevelLimits[ Level::LEVEL1 ] = TComGeneralTierAndLevelLimits( 36864, 350, MIN_INT, 16, 1, 1 ); 225 g_generalTierAndLevelLimits[ Level::LEVEL2 ] = TComGeneralTierAndLevelLimits( 122880, 1500, MIN_INT, 16, 1, 1 ); 226 g_generalTierAndLevelLimits[ Level::LEVEL2_1 ] = TComGeneralTierAndLevelLimits( 245760, 3000, MIN_INT, 20, 1, 1 ); 227 g_generalTierAndLevelLimits[ Level::LEVEL3 ] = TComGeneralTierAndLevelLimits( 552960, 6000, MIN_INT, 30, 2, 2 ); 228 g_generalTierAndLevelLimits[ Level::LEVEL3_1 ] = TComGeneralTierAndLevelLimits( 983040, 10000, MIN_INT, 40, 3, 3 ); 229 229 g_generalTierAndLevelLimits[ Level::LEVEL4 ] = TComGeneralTierAndLevelLimits( 2228224, 12000, 30000, 75, 5, 5 ); 230 230 g_generalTierAndLevelLimits[ Level::LEVEL4_1 ] = TComGeneralTierAndLevelLimits( 2228224, 20000, 50000, 75, 5, 5 ); … … 546 546 Bool g_disableNumbering = false; 547 547 Bool g_disableHLSTrace = false; 548 UInt64 g_stopAtCounter 549 Bool g_traceCopyBack 550 Bool g_decTraceDispDer 551 Bool g_decTraceMvFromMerge 552 Bool g_decTracePicOutput 548 UInt64 g_stopAtCounter = 4660; 549 Bool g_traceCopyBack = false; 550 Bool g_decTraceDispDer = false; 551 Bool g_decTraceMvFromMerge = false; 552 Bool g_decTracePicOutput = false; 553 553 Bool g_startStopTrace = false; 554 Bool g_outputPos = false;555 Bool g_traceCameraParameters 556 Bool g_encNumberOfWrittenBits = false;554 Bool g_outputPos = false; 555 Bool g_traceCameraParameters = false; 556 Bool g_encNumberOfWrittenBits = false; 557 557 Bool g_traceEncFracBits = false; 558 558 Bool g_traceIntraSearchCost = false; … … 561 561 Bool g_traceModeCheck = false; 562 562 UInt g_indent = false; 563 Bool g_decNumBitsRead = false; 564 Bool g_traceMotionInfoBeforUniPred = false; 565 Bool g_traceMergeCandListConst = false; 566 Bool g_traceSubPBMotion = false; 563 567 #endif 564 568 #endif … … 693 697 Bool startTrace = false; 694 698 if ( g_startStopTrace && poc == 0 && layerId == 0 ) 695 { 699 { 696 700 startTrace = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 64 ) && ( cuHeight == 64 ); 697 }701 } 698 702 if ( startTrace ) 699 703 { … … 705 709 g_traceModeCheck = true; 706 710 g_traceCopyBack = false; 707 }711 } 708 712 Bool stopTrace = false; 709 713 if ( g_startStopTrace && poc == 0 && layerId == 0 ) … … 752 756 fflush ( g_hTrace ); 753 757 } 754 }755 Void printStr( std::string str )756 {757 std::cout << str << std::endl;758 }759 Void printStrIndent( Bool b, std::string strStr )760 {761 if ( b )762 {763 std::cout << std::string(g_indent, ' ');764 printStr( strStr );765 }766 }767 Void prinStrIncIndent( Bool b, std::string strStr )768 {769 if ( b )770 {771 printStrIndent( true, strStr );772 if (g_indent < 50)773 {774 g_indent++;775 }776 }777 }778 Void decIndent( Bool b )779 {780 if (b && g_indent > 0)781 {782 g_indent--;783 }784 758 } 785 759 #endif -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComRom.h
r1313 r1317 91 91 extern const UChar g_aucIntraModeNumFast_NotUseMPM[MAX_CU_DEPTH]; 92 92 extern const UChar g_chroma422IntraAngleMappingTable[NUM_INTRA_MODE]; 93 #if NH_3D_DMM 93 94 // ==================================================================================================================== 94 95 // Depth coding modes 95 96 // ==================================================================================================================== 96 #if NH_3D_DMM 97 97 98 extern const WedgeResolution g_dmmWedgeResolution [6]; 98 99 extern const UChar g_dmm1TabIdxBits [6]; … … 193 194 extern Bool g_traceSAOCost; 194 195 extern UInt g_indent; 196 extern Bool g_traceMotionInfoBeforUniPred; 197 extern Bool g_traceMergeCandListConst; 198 extern Bool g_traceSubPBMotion; 195 199 #define DTRACE_CU(x,y) writeToTraceFile( x,y, g_traceCU ); 196 200 #define DTRACE_PU(x,y) writeToTraceFile( x,y, g_tracePU ); … … 232 236 #define DTRACE_CABAC_R( x,y ) 233 237 #define DTRACE_CABAC_N 238 #if NH_MV 234 239 #define DTRACE_CU(x,y) ; 235 240 #define DTRACE_PU(x,y) ; … … 242 247 #define D_PRINT_INC_INDENT( b, str ); 243 248 #define D_PRINT_INDENT( b, str ); 244 249 #endif 245 250 #endif 246 251 const Char* nalUnitTypeToString(NalUnitType type); -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComSlice.cpp
r1313 r1317 6 6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 9 * 9 10 * Redistribution and use in source and binary forms, with or without … … 112 113 , m_encCABACTableIdx (I_SLICE) 113 114 #if NH_MV 114 , m_availableForTMVPRefFlag ( true )115 115 , m_refPicSetInterLayer0 ( NULL ) 116 116 , m_refPicSetInterLayer1 ( NULL ) … … 121 121 , m_isDepth (false) 122 122 #endif 123 #if !H_MV_HLS7_GEN123 #if NH_MV 124 124 , m_pocResetFlag (false) 125 #endif126 #if NH_MV127 125 , m_crossLayerBlaFlag (false) 128 126 #endif … … 134 132 , m_pocResetIdc (0) 135 133 , m_pocResetPeriodId (0) 134 , m_hasPocResetPeriodIdPresent (false) 136 135 , m_fullPocResetFlag (false) 137 136 , m_pocLsbVal (0) 138 , m_pocMsb ValPresentFlag(false)139 , m_pocMsb Val(0)137 , m_pocMsbCycleValPresentFlag (false) 138 , m_pocMsbCycleVal (0) 140 139 , m_pocMsbValRequiredFlag (false) 141 140 #endif … … 155 154 #endif 156 155 { 156 157 #if NH_MV 158 m_shortTermRefPicSetIdx = 0; 159 m_numLongTermSps = 0; 160 m_numLongTermPics = 0; 161 for (Int i = 0; i < MAX_NUM_PICS_RPS; i++) 162 { 163 m_ltIdxSps [i] = 0; 164 m_deltaPocMsbCycleLt[i] = 0; 165 } 166 setSliceTemporalMvpEnabledFlag( false ); 167 #endif 157 168 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++) 158 169 { … … 790 801 #endif 791 802 803 792 804 Int TComSlice::getNumRpsCurrTempList() const 793 805 { … … 806 818 } 807 819 #if NH_MV 808 numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics();820 numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics(); 809 821 #endif 810 822 return numRpsCurrTempList; … … 1097 1109 m_pcVPS = pSrc->m_pcVPS; 1098 1110 #endif 1099 m_pRPS = pSrc->m_pRPS; m_iLastIDR = pSrc->m_iLastIDR; 1111 m_pRPS = pSrc->m_pRPS; 1112 m_iLastIDR = pSrc->m_iLastIDR; 1100 1113 1101 1114 m_pcPic = pSrc->m_pcPic; … … 1155 1168 #if NH_MV 1156 1169 // Additional slice header syntax elements 1157 #if !H_MV_HLS7_GEN1158 1170 m_pocResetFlag = pSrc->m_pocResetFlag; 1159 #endif1160 1171 m_discardableFlag = pSrc->m_discardableFlag; 1161 1172 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; … … 2670 2681 } 2671 2682 } 2672 #endif 2673 2683 2684 #endif 2674 2685 #endif // NH_MV 2675 2686 … … 2719 2730 , m_uiBitsForPOC ( 8) 2720 2731 , m_numLongTermRefPicSPS ( 0) 2732 #if NH_MV 2733 , m_numShortTermRefPicSets ( 0) 2734 #endif 2721 2735 , m_uiMaxTrSize ( 32) 2722 2736 , m_bUseSAO (false) … … 2750 2764 for ( Int i = 0; i < MAX_TLAYER; i++ ) 2751 2765 { 2766 #if NH_MV 2767 m_uiSpsMaxLatencyIncreasePlus1[i] = 0; 2768 #else 2752 2769 m_uiMaxLatencyIncrease[i] = 0; 2770 #endif 2753 2771 m_uiMaxDecPicBuffering[i] = 1; 2754 2772 m_numReorderPics[i] = 0; … … 3081 3099 Void TComSPS::inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ) 3082 3100 { 3083 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx ));3084 3085 3101 if ( getMultiLayerExtSpsFlag() ) 3086 3102 { 3103 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 3087 3104 Int layerIdx = 0; 3088 3105 while (layerIdx < (Int) targetDecLayerIdList.size() ) … … 3109 3126 // This preliminary fix needs to be checked. 3110 3127 assert( getNumReorderPics( i ) == maxNumReorderPics ); 3111 assert( get MaxLatencyIncrease( i ) == maxLatencyIncreasePlus1 );3128 assert( getSpsMaxLatencyIncreasePlus1( i ) == maxLatencyIncreasePlus1 ); 3112 3129 3113 3130 } … … 3117 3134 setMaxDecPicBuffering( maxDecPicBufferingMinus1 + 1 , i); 3118 3135 setNumReorderPics ( maxNumReorderPics, i ); 3119 set MaxLatencyIncrease( maxLatencyIncreasePlus1 -1 , i);3136 setSpsMaxLatencyIncreasePlus1( maxLatencyIncreasePlus1 , i); 3120 3137 } 3121 3138 } … … 3412 3429 } 3413 3430 } 3414 3415 3431 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ) 3416 3432 { … … 3435 3451 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[li]-1); rIdx ++) 3436 3452 { 3437 if (rIdx == 0 && li == 0) m_apcRefPicList[li][rIdx]->print( true ); 3453 if (rIdx == 0 && li == 0) m_apcRefPicList[li][rIdx]->print( 1 ); 3454 m_apcRefPicList[li][rIdx]->print( 0 ); 3438 3455 3439 m_apcRefPicList[li][rIdx]->print( false );3440 3456 } 3441 3457 } … … 3456 3472 m_refPicSetInterLayer1 = refPicSetInterLayer1; 3457 3473 } 3474 3475 TComPic* TComSlice::getRefPicSetInterLayer( Int setIdc, Int i ) const 3476 { 3477 TComPic* pic = NULL; 3478 if (setIdc == 0 ) 3479 { 3480 pic = (*m_refPicSetInterLayer0)[ i ]; 3481 } 3482 else if (setIdc == 1 ) 3483 { 3484 pic = (*m_refPicSetInterLayer1)[ i ]; 3485 } 3486 3487 assert( pic != NULL ); 3488 3489 return pic; 3490 } 3491 3458 3492 3459 3493 TComPic* TComSlice::getPicFromRefPicSetInterLayer(Int setIdc, Int layerId ) const … … 3572 3606 #endif 3573 3607 } 3608 #endif 3574 3609 #if NH_3D_NBDV 3575 3610 Void TComSlice::setDefaultRefView() … … 3687 3722 if( iViewIdx<getViewIndex() && !bIsDepth ) 3688 3723 { 3689 setBaseViewRefPicList( ivPicLists->get PicList( iLayerId), iViewIdx );3724 setBaseViewRefPicList( ivPicLists->getSubDpb( iLayerId, false ), iViewIdx ); 3690 3725 } 3691 3726 } … … 3710 3745 if ( pcCurrPic->getViewIndex() != pcRefPic->getViewIndex() ) 3711 3746 { 3712 existInterViewRef = true; 3747 existInterViewRef = true; 3713 3748 } 3714 3749 } … … 3833 3868 #if NH_3D 3834 3869 Void TComSlice::setIvPicLists( TComPicLists* m_ivPicLists ) 3835 { 3870 { 3836 3871 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 3837 { 3872 { 3838 3873 for ( Int depthId = 0; depthId < 2; depthId++ ) 3839 3874 { … … 3920 3955 } 3921 3956 #endif 3922 #endif 3957 3923 3958 3924 3959 … … 3933 3968 } 3934 3969 3935 Bool TComSlice::inferPocMsb ValPresentFlag()3970 Bool TComSlice::inferPocMsbCycleValPresentFlag() 3936 3971 { 3937 3972 Bool pocMsbValPresentFlag; … … 3952 3987 } 3953 3988 3989 3990 Void TComSlice::f834decProcForRefPicListConst() 3991 { 3992 // This process is invoked at the beginning of the decoding process for each P or B slice. 3993 assert( getSliceType() == B_SLICE || getSliceType() == P_SLICE ); 3994 3995 // Reference pictures are addressed through reference indices as specified in clause 8.5.3.3.2. A reference index is an index into 3996 // a reference picture list. When decoding a P slice, there is a single reference picture list RefPicList0. When decoding a B 3997 // slice, there is a second independent reference picture list RefPicList1 in addition to RefPicList0. 3998 3999 // At the beginning of the decoding process for each slice, the reference picture lists RefPicList0 and, for B slices, RefPicList1 4000 // are derived as follows: 4001 4002 // The variable NumRpsCurrTempList0 is set equal to Max( num_ref_idx_l0_active_minus1 + 1, NumPicTotalCurr ) 4003 Int numRpsCurrTempList0 = std::max( getNumRefIdxL0ActiveMinus1() + 1, getNumPicTotalCurr() ); 4004 4005 // and the list RefPicListTemp0 is constructed as follows: 4006 std::vector<TComPic*> refPicListTemp0; 4007 refPicListTemp0.resize((MAX_NUM_REF+1),NULL); 4008 4009 const TComDecodedRps* decRps = getPic()->getDecodedRps(); 4010 4011 const std::vector<TComPic*>& refPicSetStCurrBefore = decRps->m_refPicSetStCurrBefore; 4012 const std::vector<TComPic*>& refPicSetStCurrAfter = decRps->m_refPicSetStCurrAfter; 4013 const std::vector<TComPic*>& refPicSetLtCurr = decRps->m_refPicSetLtCurr; 4014 4015 const Int numPocStCurrBefore = decRps->m_numPocStCurrBefore; 4016 const Int numPocStCurrAfter = decRps->m_numPocStCurrAfter; 4017 const Int numPocLtCurr = decRps->m_numPocLtCurr; 4018 4019 const Int numActiveRefLayerPics0 = decRps->m_numActiveRefLayerPics0; 4020 const Int numActiveRefLayerPics1 = decRps->m_numActiveRefLayerPics1; 4021 4022 const std::vector<TComPic*>& refPicSetInterLayer0 = decRps->m_refPicSetInterLayer0; 4023 const std::vector<TComPic*>& refPicSetInterLayer1 = decRps->m_refPicSetInterLayer1; 4024 4025 Int rIdx = 0; 4026 while( rIdx < numRpsCurrTempList0 ) 4027 { 4028 for(Int i = 0; i < numPocStCurrBefore && rIdx < numRpsCurrTempList0; rIdx++, i++ ) 4029 { 4030 refPicListTemp0[ rIdx ] = refPicSetStCurrBefore[ i ]; 4031 } 4032 4033 for(Int i = 0; i < numActiveRefLayerPics0; rIdx++, i++ ) 4034 { 4035 refPicListTemp0[ rIdx ] = refPicSetInterLayer0[ i ]; 4036 } 4037 4038 for(Int i = 0; i < numPocStCurrAfter && rIdx < numRpsCurrTempList0; rIdx++, i++ ) // (F 65) 4039 { 4040 refPicListTemp0[ rIdx ] = refPicSetStCurrAfter[ i ]; 4041 } 4042 4043 for(Int i = 0; i < numPocLtCurr && rIdx < numRpsCurrTempList0; rIdx++, i++ ) 4044 { 4045 refPicListTemp0[ rIdx ] = refPicSetLtCurr[ i ]; 4046 } 4047 4048 for(Int i = 0; i < numActiveRefLayerPics1; rIdx++, i++ ) 4049 { 4050 refPicListTemp0[ rIdx ] = refPicSetInterLayer1[ i ]; 4051 } 4052 } 4053 4054 // The list RefPicList0 is constructed as follows: 4055 TComRefPicListModification* rplm = getRefPicListModification(); 4056 for( rIdx = 0; rIdx <= getNumRefIdxL0ActiveMinus1(); rIdx++ ) // (F 66) 4057 { 4058 m_apcRefPicList[ 0 ][ rIdx ] = rplm->getRefPicListModificationFlagL0( ) ? refPicListTemp0[ rplm->getListEntryL0( rIdx )] : refPicListTemp0[ rIdx ]; 4059 // The decoding process below slice level requires the status 4060 // of the reference pictures, when decoding the RPS. So store it here. 4061 m_bIsUsedAsLongTerm[ 0 ][ rIdx ] = m_apcRefPicList[ 0 ][ rIdx ]->getIsLongTerm(); 4062 m_aiRefPOCList [ 0 ][ rIdx ] = m_apcRefPicList[ 0 ][ rIdx ]->getPOC(); 4063 m_aiRefLayerIdList [ 0 ][ rIdx ] = m_apcRefPicList[ 0 ][ rIdx ]->getLayerId(); 4064 } 4065 4066 std::vector<TComPic*> refPicListTemp1; 4067 refPicListTemp1.resize((MAX_NUM_REF+1),NULL); 4068 4069 if (getSliceType() == B_SLICE ) 4070 { 4071 // When the slice is a B slice, the variable NumRpsCurrTempList1 is set equal to 4072 // Max( num_ref_idx_l1_active_minus1 + 1, NumPicTotalCurr ) and the list RefPicListTemp1 is constructed as follows: 4073 Int numRpsCurrTempList1 = std::max( getNumRefIdxL1ActiveMinus1() + 1, getNumPicTotalCurr() ); 4074 4075 rIdx = 0; 4076 while( rIdx < numRpsCurrTempList1 ) 4077 { 4078 for( Int i = 0; i < numPocStCurrAfter && rIdx < numRpsCurrTempList1; rIdx++, i++ ) 4079 { 4080 refPicListTemp1[ rIdx ] = refPicSetStCurrAfter[ i ]; 4081 } 4082 for( Int i = 0; i< numActiveRefLayerPics1; rIdx++, i++ ) 4083 { 4084 refPicListTemp1[ rIdx ] = refPicSetInterLayer1[ i ]; 4085 } 4086 for( Int i = 0; i < numPocStCurrBefore && rIdx < numRpsCurrTempList1; rIdx++, i++ ) // (F 67) 4087 { 4088 refPicListTemp1[ rIdx ] = refPicSetStCurrBefore[ i ]; 4089 } 4090 for( Int i = 0; i < numPocLtCurr && rIdx < numRpsCurrTempList1; rIdx++, i++ ) 4091 { 4092 refPicListTemp1[ rIdx ] = refPicSetLtCurr[ i ]; 4093 } 4094 for( Int i = 0; i< numActiveRefLayerPics0; rIdx++, i++ ) 4095 { 4096 refPicListTemp1[ rIdx ] = refPicSetInterLayer0[ i ]; 4097 } 4098 } 4099 } 4100 4101 if (getSliceType() == B_SLICE ) 4102 { 4103 // When the slice is a B slice, the list RefPicList1 is constructed as follows: 4104 for( rIdx = 0; rIdx <= getNumRefIdxL1ActiveMinus1(); rIdx++ ) // (F 68) 4105 { 4106 m_apcRefPicList[ 1 ][ rIdx ] = rplm->getRefPicListModificationFlagL1() ? refPicListTemp1[ rplm->getListEntryL1( rIdx ) ] : refPicListTemp1[ rIdx ]; 4107 4108 // The decoding process below slice level requires the marking status 4109 // of the reference pictures, when decoding the RPS. So store it here. 4110 m_bIsUsedAsLongTerm[ 1 ][ rIdx ] = m_apcRefPicList[ 1 ][ rIdx ]->getIsLongTerm(); 4111 m_aiRefPOCList [ 1 ][ rIdx ] = m_apcRefPicList[ 1 ][ rIdx ]->getPOC(); 4112 m_aiRefLayerIdList [ 1 ][ rIdx ] = m_apcRefPicList[ 1 ][ rIdx ]->getLayerId(); 4113 } 4114 } 4115 } 4116 4117 4118 Void TComSlice::cl834DecProcForRefPicListConst() 4119 { 4120 // This process is invoked at the beginning of the decoding process for each P or B slice. 4121 assert( getSliceType() == B_SLICE || getSliceType() == P_SLICE ); 4122 4123 // Reference pictures are addressed through reference indices as specified in clause 8.5.3.3.2. A reference index is an index into 4124 // a reference picture list. When decoding a P slice, there is a single reference picture list RefPicList0. When decoding a B 4125 // slice, there is a second independent reference picture list RefPicList1 in addition to RefPicList0. 4126 4127 // At the beginning of the decoding process for each slice, the reference picture lists RefPicList0 and, for B slices, RefPicList1 4128 // are derived as follows: 4129 4130 // The variable NumRpsCurrTempList0 is set equal to Max( num_ref_idx_l0_active_minus1 + 1, NumPicTotalCurr ) 4131 Int numRpsCurrTempList0 = std::max( getNumRefIdxL0ActiveMinus1() + 1, getNumPicTotalCurr() ); 4132 4133 // and the list RefPicListTemp0 is constructed as follows: 4134 std::vector<TComPic*> refPicListTemp0; 4135 refPicListTemp0.resize((MAX_NUM_REF+1),NULL); 4136 4137 const TComDecodedRps* decRps = getPic()->getDecodedRps(); 4138 4139 const std::vector<TComPic*>& refPicSetStCurrBefore = decRps->m_refPicSetStCurrBefore; 4140 const std::vector<TComPic*>& refPicSetStCurrAfter = decRps->m_refPicSetStCurrAfter; 4141 const std::vector<TComPic*>& refPicSetLtCurr = decRps->m_refPicSetLtCurr; 4142 4143 const Int numPocStCurrBefore = decRps->m_numPocStCurrBefore; 4144 const Int numPocStCurrAfter = decRps->m_numPocStCurrAfter; 4145 const Int numPocLtCurr = decRps->m_numPocLtCurr; 4146 4147 Int rIdx = 0; 4148 while( rIdx < numRpsCurrTempList0 ) 4149 { 4150 for(Int i = 0; i < numPocStCurrBefore && rIdx < numRpsCurrTempList0; rIdx++, i++ ) 4151 { 4152 refPicListTemp0[ rIdx ] = refPicSetStCurrBefore[ i ]; 4153 } 4154 4155 for(Int i = 0; i < numPocStCurrAfter && rIdx < numRpsCurrTempList0; rIdx++, i++ ) // (8 8) 4156 { 4157 refPicListTemp0[ rIdx ] = refPicSetStCurrAfter[ i ]; 4158 } 4159 4160 for(Int i = 0; i < numPocLtCurr && rIdx < numRpsCurrTempList0; rIdx++, i++ ) 4161 { 4162 refPicListTemp0[ rIdx ] = refPicSetLtCurr[ i ]; 4163 } 4164 } 4165 4166 // The list RefPicList0 is constructed as follows: 4167 4168 TComRefPicListModification* rplm = getRefPicListModification(); 4169 for( rIdx = 0; rIdx <= getNumRefIdxL0ActiveMinus1(); rIdx++ ) // (8-9) 4170 { 4171 m_apcRefPicList[0][ rIdx ] = rplm->getRefPicListModificationFlagL0( ) ? refPicListTemp0[ rplm->getListEntryL0( rIdx )] : refPicListTemp0[ rIdx ]; 4172 4173 // The decoding process below slice level requires the marking status 4174 // of the reference pictures, when decoding the RPS. So store it here. 4175 m_bIsUsedAsLongTerm[ 0 ][ rIdx ] = m_apcRefPicList[ 0 ][ rIdx ]->getIsLongTerm(); 4176 m_aiRefPOCList [ 0 ][ rIdx ] = m_apcRefPicList[ 0 ][ rIdx ]->getPOC(); 4177 m_aiRefLayerIdList [ 0 ][ rIdx ] = m_apcRefPicList[ 0 ][ rIdx ]->getLayerId(); 4178 } 4179 4180 std::vector<TComPic*> refPicListTemp1; 4181 refPicListTemp1.resize((MAX_NUM_REF+1),NULL); 4182 4183 if (getSliceType() == B_SLICE ) 4184 { 4185 // When the slice is a B slice, the variable NumRpsCurrTempList1 is set equal to 4186 // Max( num_ref_idx_l1_active_minus1 + 1, NumPicTotalCurr ) and the list RefPicListTemp1 is constructed as follows: 4187 Int numRpsCurrTempList1 = std::max( getNumRefIdxL1ActiveMinus1() + 1, getNumPicTotalCurr() ); 4188 4189 rIdx = 0; 4190 while( rIdx < numRpsCurrTempList1 ) 4191 { 4192 for( Int i = 0; i < numPocStCurrAfter && rIdx < numRpsCurrTempList1; rIdx++, i++ ) 4193 { 4194 refPicListTemp1[ rIdx ] = refPicSetStCurrAfter[ i ]; 4195 } 4196 for( Int i = 0; i < numPocStCurrBefore && rIdx < numRpsCurrTempList1; rIdx++, i++ ) // (8-10) 4197 { 4198 refPicListTemp1[ rIdx ] = refPicSetStCurrBefore[ i ]; 4199 } 4200 for( Int i = 0; i < numPocLtCurr && rIdx < numRpsCurrTempList1; rIdx++, i++ ) 4201 { 4202 refPicListTemp1[ rIdx ] = refPicSetLtCurr[ i ]; 4203 } 4204 } 4205 } 4206 4207 if (getSliceType() == B_SLICE ) 4208 { 4209 // When the slice is a B slice, the list RefPicList1 is constructed as follows: 4210 for( rIdx = 0; rIdx <= getNumRefIdxL1ActiveMinus1(); rIdx++ ) // (F 68) 4211 { 4212 m_apcRefPicList[ 1 ][ rIdx ] = rplm->getRefPicListModificationFlagL1() ? refPicListTemp1[ rplm->getListEntryL1( rIdx ) ] : refPicListTemp1[ rIdx ]; 4213 4214 // The decoding process below slice level requires the marking status 4215 // of the reference pictures, when decoding the RPS. So store it here. 4216 m_bIsUsedAsLongTerm[ 1 ][ rIdx ] = m_apcRefPicList[ 1 ][ rIdx ]->getIsLongTerm(); 4217 m_aiRefPOCList [ 1 ][ rIdx ] = m_apcRefPicList[ 1 ][ rIdx ]->getPOC(); 4218 m_aiRefLayerIdList [ 1 ][ rIdx ] = m_apcRefPicList[ 1 ][ rIdx ]->getLayerId(); 4219 } 4220 } 4221 } 4222 4223 Int TComSlice::getNumPicTotalCurr() const 4224 { 4225 Int numPicTotalCurr = 0; 4226 #if NH_MV_FIX_NUM_POC_TOTAL_CUR 4227 if ( !isIdr() ) 4228 { 4229 const TComStRefPicSet* stRps = getStRps( getCurrRpsIdx() ); 4230 #endif 4231 for( Int i = 0; i < stRps->getNumNegativePicsVar(); i++ ) 4232 { 4233 if( stRps->getUsedByCurrPicS0Var( i ) ) 4234 { 4235 numPicTotalCurr++; 4236 } 4237 } 4238 for( Int i = 0; i < stRps->getNumPositivePicsVar(); i++) //(7 55) 4239 { 4240 if( stRps->getUsedByCurrPicS1Var(i) ) 4241 { 4242 numPicTotalCurr++; 4243 } 4244 } 4245 for( Int i = 0; i < getNumLongTermSps() + getNumLongTermPics(); i++ ) 4246 { 4247 if( getUsedByCurrPicLtVar( i ) ) 4248 { 4249 numPicTotalCurr++; 4250 } 4251 } 4252 #if NH_MV_FIX_NUM_POC_TOTAL_CUR 4253 } 4254 #endif 4255 4256 if ( decProcAnnexF() ) 4257 { 4258 numPicTotalCurr += getNumActiveRefLayerPics(); 4259 } 4260 return numPicTotalCurr; 4261 } 4262 4263 4264 4265 Int TComSlice::getPocLsbLtVar( Int i ) 4266 { 4267 Int pocLsbLtVar; 4268 if (i < getNumLongTermSps() ) 4269 { 4270 4271 pocLsbLtVar = getSPS()->getLtRefPicPocLsbSps( getLtIdxSps( i ) ); 4272 } 4273 else 4274 { 4275 pocLsbLtVar = getPocLsbLt( i ); 4276 } 4277 return pocLsbLtVar; 4278 } 4279 4280 4281 Bool TComSlice::getUsedByCurrPicLtVar( Int i ) const 4282 { 4283 Bool usedByCurrPicLtVar; 4284 if (i < getNumLongTermSps() ) 4285 { 4286 usedByCurrPicLtVar = getSPS()->getUsedByCurrPicLtSPSFlag( getLtIdxSps( i ) ); 4287 } 4288 else 4289 { 4290 usedByCurrPicLtVar = getUsedByCurrPicLtFlag( i ); 4291 } 4292 return usedByCurrPicLtVar; 4293 } 4294 4295 4296 Int TComSlice::getDeltaPocMsbCycleLtVar( Int i ) const 4297 { 4298 Int deltaPocMsbCycleVar; 4299 if (i == 0 || i == getNumLongTermSps() ) 4300 { 4301 deltaPocMsbCycleVar = getDeltaPocMsbCycleLt( i ); 4302 } 4303 else 4304 { 4305 deltaPocMsbCycleVar = getDeltaPocMsbCycleLt( i ) + getDeltaPocMsbCycleLtVar( i - 1 ); 4306 } 4307 return deltaPocMsbCycleVar; 4308 } 3954 4309 3955 4310 #endif … … 4074 4429 4075 4430 Void TComSlice::checkInCompPredRefLayers() 4076 { 4431 { 4077 4432 if ( getInCompPredFlag() ) 4078 4433 { 4079 4434 for (Int i = 0; i < getNumCurCmpLIds(); i++ ) 4080 { 4435 { 4081 4436 assert( getIvPic(!getIsDepth(), getInCmpRefViewIdcs( i ) ) != NULL ); 4082 4437 // It is a requirement of bitstream conformance that there 4083 4438 // is a picture in the DPB with PicOrderCntVal equal to the PicOrderCntVal of the current picture, 4084 4439 // and a nuh_layer_id value equal to ViewCompLayerId[ inCmpRefViewIdcs[ i ] ][ !DepthFlag ]. 4440 } 4441 } 4442 } 4443 4444 Void TComSlice::setPocsInCurrRPSs() 4445 { 4446 // Currently only needed at decoder side; 4447 m_pocsInCurrRPSs.clear(); 4448 std::vector<TComPic*>** rpsCurr = getPic()->getDecodedRps()->m_refPicSetsCurr; 4449 for (Int i = 0 ; i < 3; i++ ) 4450 { 4451 for( Int j = 0; j < rpsCurr[i]->size(); j++ ) 4452 { 4453 m_pocsInCurrRPSs.push_back( (*rpsCurr[i])[j]->getPOC() ); 4085 4454 } 4086 4455 } … … 4613 4982 4614 4983 ProfileTierLevel* curProfileTierLevel = getGeneralPTL( ); 4984 assert( curProfileTierLevel != NULL ); 4615 4985 4616 4986 if( !profilePresentFlag ) … … 4644 5014 Void TComPTL::inferSubLayerValues(Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL) 4645 5015 { 4646 assert( k == 0 || refPTL != NULL ); 4647 5016 assert( k == 0 || refPTL != NULL ); 4648 5017 for (Int i = maxNumSubLayersMinus1; i >= 0; i--) 4649 5018 { … … 4665 5034 } 4666 5035 5036 assert( refProfileTierLevel != NULL ); 4667 5037 ProfileTierLevel* curProfileTierLevel = getSubLayerPTL( i ); 5038 assert( curProfileTierLevel != NULL ); 4668 5039 if( !getSubLayerLevelPresentFlag( i ) ) 4669 5040 { … … 4883 5254 } 4884 5255 5256 5257 Int TComDpbSize::getVpsMaxLatencyPictures( Int i, Int j ) const 5258 { 5259 return getMaxVpsNumReorderPics( i, j ) + getMaxVpsLatencyIncreasePlus1(i, j) - 1; 5260 } 5261 4885 5262 Void Window::scaleOffsets( Int scal ) 4886 5263 { … … 4894 5271 } 4895 5272 } 4896 #endif 5273 5274 Void TComStRefPicSet::inferRps( Int stRpsIdx, TComSPS* sps, Bool encoder ) 5275 { 5276 if ( getInterRefPicSetPredictionFlag() ) 5277 { 5278 // When inter_ref_pic_set_prediction_flag is equal to 1, the variables DeltaPocS0[ stRpsIdx ][ i ], UsedByCurrPicS0[ stRpsIdx ][ i ], 5279 // NumNegativePics[ stRpsIdx ], DeltaPocS1[ stRpsIdx ][ i ], UsedByCurrPicS1[ stRpsIdx ][ i ] and NumPositivePics[ stRpsIdx ] are 5280 // derived as follows: 5281 5282 Int i = 0; 5283 Int refRpsIdx = getRefRpsIdx( stRpsIdx ); 5284 TComStRefPicSet* refRps = sps->getStRefPicSet( refRpsIdx ); 5285 5286 for( Int j = refRps->getNumPositivePicsVar( ) - 1; j >= 0; j-- ) 5287 { 5288 Int dPoc = refRps->getDeltaPocS1Var( j ) + getDeltaRps(); 5289 if( dPoc < 0 && getUseDeltaFlag( refRps->getNumNegativePicsVar( ) + j ) ) 5290 { 5291 setDeltaPocS0Var ( i, dPoc ); 5292 setUsedByCurrPicS0Var( i++ , getUsedByCurrPicFlag( refRps->getNumNegativePicsVar( ) + j ) ); 5293 } 5294 } 5295 if( getDeltaRps() < 0 && getUseDeltaFlag( refRps->getNumDeltaPocs() ) ) // (7 59) 5296 { 5297 setDeltaPocS0Var( i, getDeltaRps() ); 5298 setUsedByCurrPicS0Var( i++ , getUsedByCurrPicFlag( refRps->getNumDeltaPocs() ) ); 5299 } 5300 for( Int j = 0; j < refRps->getNumNegativePicsVar(); j++ ) 5301 { 5302 Int dPoc = refRps->getDeltaPocS0Var( j ) + getDeltaRps(); 5303 if( dPoc < 0 && getUseDeltaFlag( j ) ) 5304 { 5305 setDeltaPocS0Var( i , dPoc); 5306 setUsedByCurrPicS0Var( i++ , getUsedByCurrPicFlag( j )) ; 5307 } 5308 } 5309 5310 setNumNegativePicsVar( i ); 5311 5312 i = 0; 5313 for( Int j = refRps->getNumNegativePicsVar() - 1; j >= 0; j-- ) 5314 { 5315 Int dPoc = refRps->getDeltaPocS0Var( j ) + getDeltaRps(); 5316 if( dPoc > 0 && getUseDeltaFlag( j ) ) 5317 { 5318 setDeltaPocS1Var( i, dPoc ); 5319 setUsedByCurrPicS1Var( i++, getUsedByCurrPicFlag( j ) ) ; 5320 } 5321 } 5322 5323 if( getDeltaRps() > 0 && getUseDeltaFlag( refRps->getNumDeltaPocs() ) ) // (7 60) 5324 { 5325 setDeltaPocS1Var( i , getDeltaRps() ); 5326 setUsedByCurrPicS1Var( i++ , getUsedByCurrPicFlag( refRps->getNumDeltaPocs() )); 5327 } 5328 5329 for( Int j = 0; j < refRps->getNumPositivePicsVar( ); j++) 5330 { 5331 Int dPoc = refRps->getDeltaPocS1Var( j ) + getDeltaRps(); 5332 if( dPoc > 0 && getUseDeltaFlag( refRps->getNumNegativePicsVar() + j ) ) 5333 { 5334 setDeltaPocS1Var( i, dPoc); 5335 setUsedByCurrPicS1Var( i++, getUsedByCurrPicFlag( refRps->getNumNegativePicsVar() + j )); 5336 } 5337 } 5338 setNumPositivePicsVar( i ); 5339 } 5340 else 5341 { 5342 // When inter_ref_pic_set_prediction_flag is equal to 0, the variables NumNegativePics[ stRpsIdx ], NumPositivePics[ stRpsIdx ], 5343 // UsedByCurrPicS0[ stRpsIdx ][ i ], UsedByCurrPicS1[ stRpsIdx ][ i ], DeltaPocS0[ stRpsIdx ][ i ] and DeltaPocS1[ stRpsIdx ][ i ] 5344 // are derived as follows: 5345 5346 setNumNegativePicsVar( getNumNegativePics( ) ); // (7 61) 5347 setNumPositivePicsVar( getNumPositivePics( ) ); // (7 62) 5348 5349 for (Int i = 0 ; i < getNumNegativePics(); i++ ) 5350 { 5351 setUsedByCurrPicS0Var( i, getUsedByCurrPicS0Flag( i ) ); // (7 63) 5352 if (i == 0 ) 5353 { 5354 setDeltaPocS0Var( i , -( getDeltaPocS0Minus1( i ) + 1 )); // (7 65) 5355 } 5356 else 5357 { 5358 setDeltaPocS0Var( i , getDeltaPocS0Var( i - 1 ) - ( getDeltaPocS0Minus1( i ) + 1 )); // (7 67) 5359 } 5360 } 5361 5362 for (Int i = 0 ; i < getNumPositivePics(); i++ ) 5363 { 5364 setUsedByCurrPicS1Var( i, getUsedByCurrPicS1Flag( i ) ); // (7 64) 5365 5366 if (i == 0 ) 5367 { 5368 setDeltaPocS1Var( i , getDeltaPocS1Minus1( i ) + 1 ); // (7 66) 5369 } 5370 else 5371 { 5372 setDeltaPocS1Var( i , getDeltaPocS1Var( i - 1 ) + ( getDeltaPocS1Minus1( i ) + 1 )); // (7 68) 5373 } 5374 } 5375 } 5376 } 5377 5378 #endif -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComSlice.h
r1313 r1317 53 53 class TComTrQuant; 54 54 #if NH_MV 55 class TComDecodedRps; 55 56 class TComPicLists; 56 57 class TComVPS; … … 68 69 69 70 /// Reference Picture Set class 71 72 #if NH_MV 73 class TComStRefPicSet 74 { 75 // This class is currently only used by the decoder. 76 // TBD: Modify encoder to use also it. 77 78 private: 79 80 // Syntax elements: 81 82 Bool m_interRefPicSetPredictionFlag; 83 Int m_deltaIdxMinus1; 84 Bool m_deltaRpsSign; 85 Int m_absDeltaRpsMinus1; 86 Bool m_usedByCurrPicFlag [ MAX_NUM_PICS_RPS ]; 87 Bool m_useDeltaFlag [ MAX_NUM_PICS_RPS ]; 88 Int m_numNegativePics; 89 Int m_numPositivePics; 90 Int m_deltaPocS0Minus1 [ MAX_NUM_PICS_RPS ]; 91 Bool m_usedByCurrPicS0Flag[ MAX_NUM_PICS_RPS ]; 92 Int m_deltaPocS1Minus1 [ MAX_NUM_PICS_RPS ]; 93 Bool m_usedByCurrPicS1Flag[ MAX_NUM_PICS_RPS ]; 94 95 // Semantic variables: 96 Int m_deltaPocS0Var [ MAX_NUM_PICS_RPS ]; 97 Int m_deltaPocS1Var [ MAX_NUM_PICS_RPS ]; 98 Int m_usedByCurrPicS0Var [ MAX_NUM_PICS_RPS ]; 99 Int m_usedByCurrPicS1Var [ MAX_NUM_PICS_RPS ]; 100 Int m_numNegativePicsVar ; 101 Int m_numPositivePicsVar ; 102 103 public: 104 105 TComStRefPicSet( ) 106 { 107 // Set default inheritance values: 108 setInterRefPicSetPredictionFlag( false ); 109 setDeltaIdxMinus1( 0 ); 110 for (Int j = 0; j < MAX_NUM_PICS_RPS; j++) 111 { 112 setUseDeltaFlag( j, true ); 113 } 114 } 115 116 // Syntax elements: 117 Void setInterRefPicSetPredictionFlag( Bool flag ) { m_interRefPicSetPredictionFlag = flag; } 118 Bool getInterRefPicSetPredictionFlag( ) const { return m_interRefPicSetPredictionFlag; } 119 120 Void setDeltaIdxMinus1( Int val ) { m_deltaIdxMinus1 = val; } 121 Int getDeltaIdxMinus1( ) const { return m_deltaIdxMinus1; } 122 123 Void setDeltaRpsSign( Bool flag ) { m_deltaRpsSign = flag; } 124 Bool getDeltaRpsSign( ) const { return m_deltaRpsSign; } 125 126 Void setAbsDeltaRpsMinus1( Int val ) { m_absDeltaRpsMinus1 = val; } 127 Int getAbsDeltaRpsMinus1( ) const { return m_absDeltaRpsMinus1; } 128 129 Void setUsedByCurrPicFlag( Int j, Bool flag ) { m_usedByCurrPicFlag[j] = flag; } 130 Bool getUsedByCurrPicFlag( Int j ) const { return m_usedByCurrPicFlag[j]; } 131 132 Void setUseDeltaFlag( Int j, Bool flag ) { m_useDeltaFlag[j] = flag; } 133 Bool getUseDeltaFlag( Int j ) const { return m_useDeltaFlag[j]; } 134 135 Void setNumNegativePics( Int val ) { m_numNegativePics = val; } 136 Int getNumNegativePics( ) const { return m_numNegativePics; } 137 138 Void setNumPositivePics( Int val ) { m_numPositivePics = val; } 139 Int getNumPositivePics( ) const { return m_numPositivePics; } 140 141 Void setDeltaPocS0Minus1( Int i, Int val ) { m_deltaPocS0Minus1[i] = val; } 142 Int getDeltaPocS0Minus1( Int i ) const { return m_deltaPocS0Minus1[i]; } 143 144 Void setUsedByCurrPicS0Flag( Int i, Bool flag ) { m_usedByCurrPicS0Flag[i] = flag; } 145 Bool getUsedByCurrPicS0Flag( Int i ) const { return m_usedByCurrPicS0Flag[i]; } 146 147 Void setDeltaPocS1Minus1( Int i, Int val ) { m_deltaPocS1Minus1[i] = val; } 148 Int getDeltaPocS1Minus1( Int i ) const { return m_deltaPocS1Minus1[i]; } 149 150 Void setUsedByCurrPicS1Flag( Int i, Bool flag ) { m_usedByCurrPicS1Flag[i] = flag; } 151 Bool getUsedByCurrPicS1Flag( Int i ) const { return m_usedByCurrPicS1Flag[i]; } 152 153 // Semantics variables: 154 Int getRefRpsIdx(Int stRpsIdx ) const { return ( stRpsIdx - (getDeltaIdxMinus1() + 1) ); } 155 Int getDeltaRps() const { return ( ( 1 - 2 * getDeltaRpsSign() ) * ( getAbsDeltaRpsMinus1() + 1 ) ); } 156 Int getNumDeltaPocs() const { return ( getNumNegativePicsVar() + getNumPositivePicsVar()); } 157 158 Void setNumNegativePicsVar( Int val ) { m_numNegativePicsVar = val; } 159 Int getNumNegativePicsVar( ) const { return m_numNegativePicsVar; } 160 161 Void setNumPositivePicsVar( Int val ) { m_numPositivePicsVar = val; } 162 Int getNumPositivePicsVar( ) const { return m_numPositivePicsVar; } 163 164 Void setDeltaPocS0Var( Int i, Int val ) { m_deltaPocS0Var[i] = val; } 165 Int getDeltaPocS0Var( Int i ) const { return m_deltaPocS0Var[i]; } 166 167 Void setUsedByCurrPicS0Var( Int i, Bool flag ) { m_usedByCurrPicS0Var[i] = flag; } 168 Bool getUsedByCurrPicS0Var( Int i ) const { return m_usedByCurrPicS0Var[i]; } 169 170 Void setDeltaPocS1Var( Int i, Int val ) { m_deltaPocS1Var[i] = val; } 171 Int getDeltaPocS1Var( Int i ) const { return m_deltaPocS1Var[i]; } 172 173 Void setUsedByCurrPicS1Var( Int i, Bool flag ) { m_usedByCurrPicS1Var[i] = flag; } 174 Bool getUsedByCurrPicS1Var( Int i ) const { return m_usedByCurrPicS1Var[i]; } 175 176 Void inferRps( Int stRpsIdx, TComSPS* sps, Bool encoder ); 177 }; 178 179 #endif 180 70 181 class TComReferencePictureSet 71 182 { … … 302 413 { 303 414 ProfileTierLevel m_generalPTL; 415 #if !NH_MV 304 416 ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 (= 6) 305 417 Bool m_subLayerProfilePresentFlag [MAX_TLAYER-1]; 306 418 Bool m_subLayerLevelPresentFlag [MAX_TLAYER-1]; 419 #else 420 ProfileTierLevel m_subLayerPTL [MAX_TLAYER]; // However, highest index is 6, so we need one more. 421 Bool m_subLayerProfilePresentFlag [MAX_TLAYER]; 422 Bool m_subLayerLevelPresentFlag [MAX_TLAYER]; 423 #endif 307 424 308 425 public: … … 804 921 805 922 Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; } 806 Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) const { return m_maxVpsLatencyIncreasePlus1[i][j]; } 923 Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) const { return m_maxVpsLatencyIncreasePlus1[i][j]; } 924 Int getVpsMaxLatencyPictures ( Int i, Int j ) const; 807 925 }; 808 926 #endif … … 901 1019 Int m_defaultDirectDependencyType; 902 1020 903 #if H_MV_HLS7_GEN904 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS];905 #endif906 1021 Bool m_vpsVuiPresentFlag; 907 1022 TComVPSVUI m_vpsVUI; 908 #if !H_MV_HLS7_GEN909 1023 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 910 #endif911 1024 912 1025 // VPS EXTENSION SEMANTICS VARIABLES … … 1119 1232 Void setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val ) { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] = val; } 1120 1233 Int getLayerSetIdxForOlsMinus1( Int outLayerSetIdx ) const { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; } 1121 #if NH_MV_FIX_TICKET_1051122 1234 Int getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx ) const { return gCeilLog2( getNumLayerSets() - 1 ); } 1123 #else1124 Int getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx ) const { return gCeilLog2( getNumLayerSets() ); }1125 #endif1126 1235 1127 1236 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } … … 1803 1912 1804 1913 TComRPSList m_RPSList; 1914 #if NH_MV 1915 std::vector<TComStRefPicSet> m_stRefPicSets; 1916 #endif 1805 1917 Bool m_bLongTermRefsPresent; 1806 1918 Bool m_TMVPFlagsPresent; … … 1825 1937 UInt m_uiBitsForPOC; 1826 1938 UInt m_numLongTermRefPicSPS; 1939 #if NH_MV 1940 Int m_numShortTermRefPicSets; 1941 #endif 1827 1942 UInt m_ltRefPicPocLsbSps[MAX_NUM_LONG_TERM_REF_PICS]; 1828 1943 Bool m_usedByCurrPicLtSPSFlag[MAX_NUM_LONG_TERM_REF_PICS]; … … 1838 1953 TComScalingList m_scalingList; 1839 1954 UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; 1955 #if NH_MV 1956 UInt m_uiSpsMaxLatencyIncreasePlus1[MAX_TLAYER]; 1957 // Calling a member m_uiMaxLatencyIncrease although it is m_uiMaxLatencyIncreasePlus1 is really bad style. 1958 #else 1840 1959 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) 1960 #endif 1841 1961 1842 1962 Bool m_useStrongIntraSmoothing; … … 1911 2031 Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } 1912 2032 2033 #if NH_MV 2034 UInt getNumLongTermRefPicsSps() const { return m_numLongTermRefPicSPS; } 2035 #endif 2036 1913 2037 UInt getNumLongTermRefPicSPS() const { return m_numLongTermRefPicSPS; } 1914 2038 Void setNumLongTermRefPicSPS(UInt val) { m_numLongTermRefPicSPS = val; } … … 1939 2063 Void setBitsForPOC( UInt u ) { m_uiBitsForPOC = u; } 1940 2064 UInt getBitsForPOC() const { return m_uiBitsForPOC; } 2065 #if NH_MV 2066 UInt getMaxPicOrderCntLsb() const { return (1 << ( getLog2MaxPicOrderCntLsbMinus4() + 4) ); } 2067 Int getLog2MaxPicOrderCntLsbMinus4() const { return (getBitsForPOC() - 4); } 2068 #endif 1941 2069 Bool getUseAMP() const { return m_useAMP; } 1942 2070 Void setUseAMP( Bool b ) { m_useAMP = b; } … … 1954 2082 const TComRPSList* getRPSList() const { return &m_RPSList; } 1955 2083 TComRPSList* getRPSList() { return &m_RPSList; } 2084 #if NH_MV 2085 Void initStRefPicSets( ) { m_stRefPicSets.resize( getNumShortTermRefPicSets() ); } 2086 TComStRefPicSet* getStRefPicSet( Int i ) { return &(m_stRefPicSets[i]); } 2087 const TComStRefPicSet* getStRefPicSet( Int i ) const { return &(m_stRefPicSets[i]); } 2088 Bool getLongTermRefPicsPresentFlag() const { return m_bLongTermRefsPresent; } 2089 Void setLongTermRefPicsPresentFlag(Bool b) { m_bLongTermRefsPresent=b; } 2090 #else 1956 2091 Bool getLongTermRefsPresent() const { return m_bLongTermRefsPresent; } 1957 2092 Void setLongTermRefsPresent(Bool b) { m_bLongTermRefsPresent=b; } 2093 #endif 1958 2094 Bool getTMVPFlagsPresent() const { return m_TMVPFlagsPresent; } 1959 2095 Void setTMVPFlagsPresent(Bool b) { m_TMVPFlagsPresent=b; } 2096 #if NH_MV 2097 Bool getSpsTemporalMvpEnabledFlag() const { return m_TMVPFlagsPresent; } 2098 #endif 1960 2099 // physical transform 1961 2100 Void setMaxTrSize( UInt u ) { m_uiMaxTrSize = u; } … … 1988 2127 Void setPCMFilterDisableFlag( Bool bValue ) { m_bPCMFilterDisableFlag = bValue; } 1989 2128 Bool getPCMFilterDisableFlag() const { return m_bPCMFilterDisableFlag; } 1990 2129 #if NH_MV 2130 Void setNumShortTermRefPicSets( Int val ) { m_numShortTermRefPicSets = val; } 2131 Int getNumShortTermRefPicSets( )const { return m_numShortTermRefPicSets; } 2132 #endif 1991 2133 Bool getScalingListFlag() const { return m_scalingListEnabledFlag; } 1992 2134 Void setScalingListFlag( Bool b ) { m_scalingListEnabledFlag = b; } … … 1998 2140 UInt getMaxDecPicBuffering(UInt tlayer) const { return m_uiMaxDecPicBuffering[tlayer]; } 1999 2141 Void setMaxDecPicBuffering( UInt ui, UInt tlayer ) { assert(tlayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tlayer] = ui; } 2142 #if NH_MV 2143 UInt getSpsMaxDecPicBufferingMinus1(UInt tlayer) const { return m_uiMaxDecPicBuffering[tlayer] -1 ; } 2144 UInt getSpsMaxLatencyIncreasePlus1(UInt tlayer) const { return m_uiSpsMaxLatencyIncreasePlus1[tlayer]; } 2145 Void setSpsMaxLatencyIncreasePlus1( UInt ui , UInt tlayer) { m_uiSpsMaxLatencyIncreasePlus1[tlayer] = ui; } 2146 Int getSpsMaxLatencyPictures( Int i ) const { return ( getSpsMaxNumReorderPics(i) + getSpsMaxLatencyIncreasePlus1(i)-1); } 2147 #else 2000 2148 UInt getMaxLatencyIncrease(UInt tlayer) const { return m_uiMaxLatencyIncrease[tlayer]; } 2001 2149 Void setMaxLatencyIncrease( UInt ui , UInt tlayer) { m_uiMaxLatencyIncrease[tlayer] = ui; } 2150 #endif 2151 2152 #if NH_MV 2153 Int getSpsMaxNumReorderPics(Int i ) const { return getNumReorderPics( i ); } 2154 #endif 2002 2155 2003 2156 Void setUseStrongIntraSmoothing(Bool bVal) { m_useStrongIntraSmoothing = bVal; } … … 2133 2286 Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { assert(idx<REF_PIC_LIST_NUM_IDX); m_RefPicSetIdxL1[idx] = refPicSetIdx; } 2134 2287 #if NH_MV 2135 // Why not a listIdx for all members, would avoid code duplication??2288 2136 2289 Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; } 2137 2290 UInt getRefPicSetIdxL(UInt li, UInt idx ) { return ( li == 0 ) ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ; } 2138 2291 Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_refPicListModificationFlagL0 : m_refPicListModificationFlagL1 ) = flag; } 2139 2292 Bool getRefPicListModificationFlagL(UInt li ) { return ( li== 0) ? m_refPicListModificationFlagL0 : m_refPicListModificationFlagL1; } 2293 2294 Int getListEntryL0( Int i) const { assert(i<REF_PIC_LIST_NUM_IDX); return m_RefPicSetIdxL0[i]; } 2295 Int getListEntryL1( Int i) const { assert(i<REF_PIC_LIST_NUM_IDX); return m_RefPicSetIdxL1[i]; } 2296 2297 Int getListEntryLXLen( Int numPicTotalCur ) const { return gCeilLog2( numPicTotalCur ); } 2298 2299 Void setListEntryL0( Int i, Int val ) { m_RefPicSetIdxL0[i] = val; } 2300 Void setListEntryL1( Int i, Int val ) { m_RefPicSetIdxL1[i] = val; } 2301 2302 2140 2303 #endif 2141 2304 }; … … 2470 2633 private: 2471 2634 // Bitstream writing 2635 #if NH_MV 2636 Bool m_firstSliceSegmentInPicFlag; 2637 #endif 2472 2638 Bool m_saoEnabledFlag[MAX_NUM_CHANNEL_TYPE]; 2473 2639 Int m_iPPSId; ///< picture parameter set ID … … 2475 2641 #if NH_MV 2476 2642 Int m_slicePicOrderCntLsb; 2643 Bool m_shortTermRefPicSetSpsFlag; 2644 Int m_shortTermRefPicSetIdx; 2645 Int m_numLongTermSps; 2646 Int m_numLongTermPics; 2647 Int m_ltIdxSps [MAX_NUM_PICS_RPS]; 2648 Int m_pocLsbLt [MAX_NUM_PICS_RPS]; 2649 Bool m_usedByCurrPicLtFlag [MAX_NUM_PICS_RPS]; 2650 Bool m_deltaPocMsbPresentFlag [MAX_NUM_PICS_RPS]; 2651 Int m_deltaPocMsbCycleLt [MAX_NUM_PICS_RPS]; 2652 Bool m_sliceTemporalMvpEnabledFlag; 2653 TComStRefPicSet m_stRefPicSet; 2477 2654 #endif 2478 2655 Int m_iPOC; … … 2510 2687 Int m_aiRefPOCList [NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; 2511 2688 #if NH_MV 2512 Int m_aiRefLayerIdList[2][MAX_NUM_REF+1];2689 Int m_aiRefLayerIdList[2][MAX_NUM_REF+1]; 2513 2690 #endif 2514 2691 Bool m_bIsUsedAsLongTerm[NUM_REF_PIC_LIST_01][MAX_NUM_REF+1]; … … 2570 2747 SliceType m_encCABACTableIdx; // Used to transmit table selection across slices. 2571 2748 #if NH_MV 2572 Bool m_availableForTMVPRefFlag; 2573 #endif 2574 2575 #if NH_MV 2749 2576 2750 std::vector<TComPic*>* m_refPicSetInterLayer0; 2577 2751 std::vector<TComPic*>* m_refPicSetInterLayer1; … … 2584 2758 2585 2759 // Additional slice header syntax elements 2586 #if !H_MV_HLS7_GEN2587 2760 Bool m_pocResetFlag; 2588 #endif 2761 2589 2762 Bool m_crossLayerBlaFlag; 2590 2763 Bool m_discardableFlag; … … 2596 2769 Int m_pocResetIdc; 2597 2770 Int m_pocResetPeriodId; 2771 2772 Bool m_hasPocResetPeriodIdPresent; 2773 DecodingProcess m_decodingProcess; 2774 DecodingProcess m_decProcPocAndRps; 2598 2775 Bool m_fullPocResetFlag; 2599 2776 Int m_pocLsbVal; 2600 Bool m_pocMsb ValPresentFlag;2601 Int m_pocMsb Val;2777 Bool m_pocMsbCycleValPresentFlag; 2778 Int m_pocMsbCycleVal; 2602 2779 Bool m_pocMsbValRequiredFlag; 2603 2780 … … 2676 2853 Void setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; } 2677 2854 Int getSlicePicOrderCntLsb( ) const { return m_slicePicOrderCntLsb; } 2855 2856 Bool getFirstSliceSegementInPicFlag() const { return m_firstSliceSegmentInPicFlag; } 2857 Void setFirstSliceSegementInPicFlag(Bool val) { m_firstSliceSegmentInPicFlag = val; } 2678 2858 #endif 2679 2859 Bool getPicOutputFlag() const { return m_PicOutputFlag; } … … 2734 2914 Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } 2735 2915 Void setARPStepNum( TComPicLists*ivPicLists ); 2916 Void setPocsInCurrRPSs( ); 2917 2736 2918 TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } 2737 2919 UInt getARPStepNum( ) { return m_nARPStepNum; } … … 2746 2928 Bool getMvdL1ZeroFlag() const { return m_bLMvdL1Zero; } 2747 2929 Int getNumRpsCurrTempList() const; 2930 #if NH_MV 2931 Int getNumPicTotalCurr() const; 2932 #endif 2748 2933 Int getList1IdxToList0Idx( Int list1Idx ) const { return m_list1IdxToList0Idx[list1Idx]; } 2749 2934 Void setReferenced(Bool b) { m_bRefenced = b; } … … 2753 2938 Void setNalUnitType( NalUnitType e ) { m_eNalUnitType = e; } 2754 2939 NalUnitType getNalUnitType() const { return m_eNalUnitType; } 2940 #if NH_MV 2941 std::string getNalUnitTypeString( ) { return NALU_TYPE_STR[ getNalUnitType() ]; }; 2942 #endif 2755 2943 Bool getRapPicFlag() const; 2756 2944 Bool getIdrPicFlag() const { return getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP; } 2757 2945 Bool isIRAP() const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); } 2946 #if NH_MV 2947 Bool isBla() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL ); } 2948 Bool isIdr() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ); } 2949 Bool isCra() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ); } 2950 2951 Bool isSlnr() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N || 2952 getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N || 2953 getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N || 2954 getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N || 2955 getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N || 2956 getNalUnitType() == NAL_UNIT_RESERVED_VCL_N10 || 2957 getNalUnitType() == NAL_UNIT_RESERVED_VCL_N12 || 2958 getNalUnitType() == NAL_UNIT_RESERVED_VCL_N14 ); } 2959 2960 Bool isRasl() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N ); } 2961 Bool isRadl() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_R ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N ); } 2962 Bool isStsa() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_R ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N ); } 2963 Bool isTsa() const { return ( getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_R ) || ( getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N ); } 2964 2965 Bool decProcClause8() const { return ( m_decodingProcess == CLAUSE_8 ); } 2966 Bool decProcAnnexF() const { return ( decProcAnnexG() || decProcAnnexH() || decProcAnnexI() ) ; } 2967 Bool decProcAnnexG() const { return ( m_decodingProcess == ANNEX_G || decProcAnnexI() ); } 2968 Bool decProcAnnexH() const { return ( m_decodingProcess == ANNEX_H ); } 2969 Bool decProcAnnexI() const { return ( m_decodingProcess == ANNEX_I ); } 2970 Int getCurrRpsIdx() const { return ( getShortTermRefPicSetSpsFlag() ? getShortTermRefPicSetIdx() : getSPS()->getNumShortTermRefPicSets() ) ;} 2971 2972 #endif 2973 2974 2758 2975 Void checkCRA(const TComReferencePictureSet *pReferencePictureSet, Int& pocCRA, NalUnitType& associatedIRAPType, TComList<TComPic *>& rcListPic); 2759 2976 Void decodingRefreshMarking(Int& pocCRA, Bool& bRefreshPending, TComList<TComPic*>& rcListPic, const bool bEfficientFieldIRAPEnabled); … … 2774 2991 Void setRefPOC( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } 2775 2992 Void setNumRefIdx( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } 2993 #if NH_MV 2994 Int getNumRefIdxL0ActiveMinus1() const { return ( getNumRefIdx(REF_PIC_LIST_0) -1); } 2995 Int getNumRefIdxL1ActiveMinus1() const { return ( getNumRefIdx(REF_PIC_LIST_1) -1); } 2996 #endif 2776 2997 Void setPic( TComPic* p ) { m_pcPic = p; } 2777 2998 Void setDepth( Int iDepth ) { m_iDepth = iDepth; } … … 2827 3048 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 2828 3049 #if NH_MV 2829 Int getTemporalId ( ){ return (Int) m_uiTLayer; }3050 Int getTemporalId( ) const { return (Int) m_uiTLayer; } 2830 3051 #endif 2831 3052 … … 2836 3057 #if NH_MV 2837 3058 Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); 3059 Void f834decProcForRefPicListConst(); 3060 Void cl834DecProcForRefPicListConst(); 3061 2838 3062 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2839 3063 static Void markCurrPic ( TComPic* currPic ); … … 2852 3076 Void setNoRaslOutputFlag( Bool val ) { m_noRaslOutputFlag = val; } 2853 3077 Bool getNoRaslOutputFlag() const { return m_noRaslOutputFlag; } 3078 2854 3079 2855 3080 Void setHandleCraAsBlaFlag( Bool val ) { m_handleCraAsBlaFlag = val; } … … 2915 3140 Bool getLFCrossSliceBoundaryFlag() { return m_LFCrossSliceBoundaryFlag; } 2916 3141 3142 #if NH_MV 3143 Void setShortTermRefPicSetSpsFlag( Bool flag ) { m_shortTermRefPicSetSpsFlag = flag; } 3144 Bool getShortTermRefPicSetSpsFlag( ) const { return m_shortTermRefPicSetSpsFlag; } 3145 3146 Int getShortTermRefPicSetIdxLen() const { return gCeilLog2( getSPS()->getNumShortTermRefPicSets() ); } 3147 Void setShortTermRefPicSetIdx( Int val ) { m_shortTermRefPicSetIdx = val; } 3148 Int getShortTermRefPicSetIdx( ) const { return m_shortTermRefPicSetIdx; } 3149 3150 Void setNumLongTermSps( Int val ) { m_numLongTermSps = val; } 3151 Int getNumLongTermSps( ) const { return m_numLongTermSps; } 3152 3153 Void setNumLongTermPics( Int val ) { m_numLongTermPics = val; } 3154 Int getNumLongTermPics( ) const { return m_numLongTermPics; } 3155 3156 Int getLtIdxSpsLen() const { return gCeilLog2( getSPS()->getNumLongTermRefPicsSps() ); } 3157 Void setLtIdxSps( Int i, Int val ) { m_ltIdxSps[i] = val; } 3158 Int getLtIdxSps( Int i ) const { return m_ltIdxSps[i]; } 3159 3160 Int getPocLsbLtLen() const { return (getSPS()->getLog2MaxPicOrderCntLsbMinus4()+ 4); } 3161 Void setPocLsbLt( Int i, Int val ) { m_pocLsbLt[i] = val; } 3162 Int getPocLsbLt( Int i ) const { return m_pocLsbLt[i]; } 3163 3164 Void setUsedByCurrPicLtFlag( Int i, Bool flag ) { m_usedByCurrPicLtFlag[i] = flag; } 3165 Bool getUsedByCurrPicLtFlag( Int i ) const { return m_usedByCurrPicLtFlag[i]; } 3166 3167 Void setDeltaPocMsbPresentFlag( Int i, Bool flag ) { m_deltaPocMsbPresentFlag[i] = flag; } 3168 Bool getDeltaPocMsbPresentFlag( Int i ) const { return m_deltaPocMsbPresentFlag[i]; } 3169 3170 Void setDeltaPocMsbCycleLt( Int i, Int val ) { m_deltaPocMsbCycleLt[i] = val; } 3171 Int getDeltaPocMsbCycleLt( Int i ) const { return m_deltaPocMsbCycleLt[i]; } 3172 3173 Void setSliceTemporalMvpEnabledFlag( Bool flag ) { m_enableTMVPFlag = flag; } 3174 Bool getSliceTemporalMvpEnabledFlag( ) const { return m_enableTMVPFlag; } 3175 3176 TComStRefPicSet* getLocalStRps( ) { return &m_stRefPicSet; }; 3177 const TComStRefPicSet* getStRps( Int stRpsIdx ) const { return ( (stRpsIdx == getSPS()->getNumShortTermRefPicSets()) ? &m_stRefPicSet : getSPS()->getStRefPicSet( stRpsIdx ) ); }; 3178 3179 #endif 3180 2917 3181 Void setEnableTMVPFlag( Bool b ) { m_enableTMVPFlag = b; } 2918 3182 Bool getEnableTMVPFlag() { return m_enableTMVPFlag; } … … 2922 3186 2923 3187 #if NH_MV 2924 Void setAvailableForTMVPRefFlag( Bool b ) { m_availableForTMVPRefFlag = b; }2925 Bool getAvailableForTMVPRefFlag() { return m_availableForTMVPRefFlag; }2926 2927 3188 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 2928 3189 Int getLayerId () const { return m_layerId; } … … 2932 3193 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 2933 3194 Int getViewIndex () const { return m_viewIndex; } 3195 3196 Void setDecodingProcess ( DecodingProcess decProc ) { m_decodingProcess = decProc; } 3197 3198 2934 3199 #if NH_3D 2935 3200 #if NH_3D_TMVP … … 2986 3251 Void checkCrossLayerBlaFlag ( ) const ; 2987 3252 2988 #if !H_MV_HLS7_GEN3253 #if NH_MV 2989 3254 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } 2990 3255 Bool getPocResetFlag( ) const { return m_pocResetFlag; } … … 3010 3275 Void checkPocResetIdc( ) const { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } 3011 3276 3277 3012 3278 Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } 3013 3279 Int getPocResetPeriodId( ) const { return m_pocResetPeriodId; } … … 3020 3286 Void checkPocLsbVal( ) const { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } 3021 3287 3288 #if NH_MV 3289 Void setHasPocResetPeriodIdPresent( Bool val ) { m_hasPocResetPeriodIdPresent = val; } 3290 Bool getHasPocResetPeriodIdPresent( ) const { return m_hasPocResetPeriodIdPresent; } 3291 3292 Void setPocMsbCycleValPresentFlag( Bool flag ) { m_pocMsbCycleValPresentFlag = flag; } 3293 Bool getPocMsbCycleValPresentFlag( ) const { return m_pocMsbCycleValPresentFlag; } 3294 3295 Void setPocMsbCycleVal( Int val ) { m_pocMsbCycleVal = val; } 3296 Int getPocMsbCycleVal( ) const { return m_pocMsbCycleVal; } 3297 3298 Int getPocLsbLtVar(Int i); 3299 Bool getUsedByCurrPicLtVar(Int i) const; 3300 Int getDeltaPocMsbCycleLtVar( Int i ) const; 3301 3302 #else 3022 3303 Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } 3023 3304 Bool getPocMsbValPresentFlag( ) const { return m_pocMsbValPresentFlag; } … … 3025 3306 Void setPocMsbVal( Int val ) { m_pocMsbVal = val; } 3026 3307 Int getPocMsbVal( ) const { return m_pocMsbVal; } 3308 #endif 3309 3027 3310 3028 3311 Bool getCraOrBlaPicFlag() const { return ( getCraPicFlag() || getBlaPicFlag() ); } 3029 3312 Bool getPocMsbValRequiredFlag() const { return ( getCraOrBlaPicFlag() && ( getVPS()->getVpsPocLsbAlignedFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 ) ); } 3030 3313 3031 UInt getPocLsbValLen() const { return getSPS()->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 4 3314 UInt getPocLsbValLen() const { return getSPS()->getBitsForPOC(); }; //log2_max_pic_order_cnt_lsb_minus4 + 4 3032 3315 3033 3316 Bool getBlaPicFlag() const … … 3069 3352 Void deriveInCmpPredAndCpAvailFlag( ); 3070 3353 Void init3dToolParameters(); 3071 Void checkInCompPredRefLayers(); ;3354 Void checkInCompPredRefLayers(); 3072 3355 3073 3356 Bool getIvMvPredFlag ( ) { return m_ivMvPredFlag ; }; … … 3095 3378 #endif 3096 3379 #endif 3380 #if NH_MV 3381 TComPic* getRefPicSetInterLayer( Int setIdc, Int i ) const; 3382 #endif 3383 3097 3384 // Inference 3385 #if NH_MV 3386 Bool inferPocMsbCycleValPresentFlag(); 3387 #else 3098 3388 Bool inferPocMsbValPresentFlag(); 3389 #endif 3099 3390 #endif 3100 3391 protected: -
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TypeDef.h
r1313 r1317 61 61 #define NH_3D ( HEVC_EXT == 2) 62 62 ///////////////////////////////////////////////////////////////////////////////////////// 63 /////////////////////////////////// FIXES /////////////////////////////////// 64 ///////////////////////////////////////////////////////////////////////////////////////// 65 #if NH_MV 66 #define NH_MV_FIX_NO_REF_PICS_CHECK 1 // !!SPEC!! 67 #define NH_MV_FIX_INIT_NUM_ACTIVE_REF_LAYER_PICS 1 // Derivation of NumActiveRefLayerPIcs. !!SPEC!! 68 #define NH_MV_FIX_NUM_POC_TOTAL_CUR 1 // Derivation of NumPocTotalCur for IDR pictures. !!SPEC!! 69 #endif 70 #if NH_3D 71 #define H_3D_FIX_ARP_CHECK_NOT_IN_DPB 1 72 #endif 73 ///////////////////////////////////////////////////////////////////////////////////////// 63 74 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// 64 75 ///////////////////////////////////////////////////////////////////////////////////////// 65 76 #if NH_MV 66 #define NH_MV_FIX_TICKET_105 1 // layer_set_idx_for_ols_minus1 length67 #define NH_MV_FIX_TICKET_100 1 // Extra slice header bits68 77 #define H_MV_ENC_DEC_TRAC 1 //< CU/PU level tracking 69 #define H_MV_ENC_DEC_TRAC_FIX 1 // by SHARP70 78 #if NH_3D 71 // FIXES72 #define NH_3D_FIX_TICKET_98 1 // Writing of depth intra skip flag73 #define NH_3D_FIX_TICKET_101 ( 1 && NH_3D_VER141_DEC_COMP_FLAG ) // Camera parameters for depth74 #define NH_3D_DIS_FIX 175 #define NH_3D_ENC_DEPTH_FIX 1 // Fix Intra TU coding.76 #define NH_3D_INTRA_SDC_RD_FIX 1 // Fix in RD- decision of intra SDC.77 #define NH_3D_DLT_FIX 1 // Fixes numbers of parsed DLTs78 #define NH_3D_VER141_DEC_COMP_FLAG 0 // Makes decoding of this version compatible to HTM-14.1 by re-introducing HTM-14.1 bugs.79 #define NH_3D_ALIGN_SPIVMP_DBBP 1 // Further alignment of DBBP and SBP motion80 #define NH_3D_ALIGN_SPIVMP_RP 1 // Alignment of DBBP and RP81 #define NH_3D_FIX_VSP 182 #define NH_3D_VSO 183 #define NH_3D_NBDV 184 #define NH_3D_TMVP 1 // QC_TMVP_C004785 // Sony_M2363986 // H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K005387 #define NH_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D006088 // Unifying rounding offset, for IC part, JCT3V-D013589 // SHARP_ILLUCOMP_REFINE_E004690 // MTK_CLIPPING_ALIGN_IC_E0168 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E016891 // LGE_IC_CTX_F0160 //JCT3V-F016092 // SEC_ONLY_TEXTURE_IC_F015193 // MTK_IC_FLAG_CABAC_SIMP_G006194 // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G012195 // MTK_LOW_LATENCY_IC_ENCODING_H0086 Low-latency IC encoding in JCT3V-H008696 // MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX 1 // Remove the global variables used in JCT3V-H008697 // SEC_IC_NEIGHBOR_CLIP_I0080 // Clipping of neighboring sample position, JCT3V-I008098 // LGE_CHROMA_IC_J0050_J003499 #define NH_3D_IC_FIX 1 // Fix uninitialized value in cDtParam.bUseIC (it happened on intra block)100 #define NH_3D_FULL_PEL_DEPTH_MAP_MV_ACC 1 // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC101 #define NH_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068102 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units103 // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055104 #define NH_3D_NBDV_REF 1105 #define NH_3D_MLC 1106 #define NH_3D_FIX_PRUNING 1107 #define NH_3D_VSP 1108 #define NH_3D_IV_MERGE 1109 #define NH_3D_SPIVMP 1110 79 #define NH_3D_INTEGER_MV_DEPTH 1 111 #define NH_3D_TEXT_MERGE 1112 #define NH_3D_DBBP 1113 #define BUF_FIX 1114 #define NH_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177115 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108116 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check117 // LGE_ARP_CTX_F0161 JCT3V-F0161118 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061119 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053120 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085121 // QC_I0051_ARP_SIMP122 // SHARP_ARP_CHROMA_I0104123 // MTK_I0072_IVARP_SCALING_FIX124 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1125 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035126 #define NH_3D_DMM 1 // Depth modeling modes127 #define NH_3D_DLT 1 // Depth Lookup Table128 #define NH_3D_SDC_INTRA 1 // Segment-wise DC Coding method for INTRA129 #define NH_3D_SDC_INTER 1 // Segment-wise DC Coding method for INTER130 80 #define NH_3D_ENC_DEPTH 1 // Encoder optimizations for depth, incl. 131 81 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160 … … 133 83 // HHI_DMM4_ENC_I0066 134 84 // H_3D_FAST_DEPTH_INTRA 135 #define NH_3D_DIS 1136 85 #define NH_3D_FAST_TEXTURE_ENCODING 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173 137 #endif 138 #if H_3D 139 #define H_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 86 #define NH_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 87 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108 88 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check 89 // LGE_ARP_CTX_F0161 JCT3V-F0161 90 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 91 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 92 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 93 // QC_I0051_ARP_SIMP 94 // SHARP_ARP_CHROMA_I0104 95 // MTK_I0072_IVARP_SCALING_FIX 96 // SEC_ARP_VIEW_REF_CHECK_J0037 Signaling iv_res_pred_weight_idx when the current slice has both view and temporal reference picture(s), JCT3V-J0037 item1 97 // SEC_ARP_REM_ENC_RESTRICT_K0035 Removal of encoder restriction of ARP, JCT3V-K0035 98 #define NH_3D_QTLPC 1 // OL_QTLIMIT_PREDCODING_B0068 //JCT3V-B0068 140 99 // HHI_QTLPC_RAU_OFF_C0160 JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 141 100 // MTK_TEX_DEP_PAR_G0055 Texture-partition-dependent depth partition. JCT3V-G0055 142 #define H_3D_VSO 1 // VSO, View synthesis optimization, includes:101 #define NH_3D_VSO 1 // VSO, View synthesis optimization, includes: 143 102 // HHI_VSO 144 103 // HHI_VSO_LS_TABLE_M23714 enable table base Lagrange multiplier optimization … … 146 105 // LGE_WVSO_A0119 147 106 // SCU_HS_VSD_BUGFIX_IMPROV_G0163 148 #define H_3D_NBDV 1 // Neighboring block disparity derivation107 #define NH_3D_NBDV 1 // Neighboring block disparity derivation 149 108 // QC_JCT3V-A0097 150 109 // LGE_DVMCP_A0126 … … 162 121 // MTK_TEXTURE_MRGCAND_BUGFIX_E0182 Bug fix for TEXTURE MERGING CANDIDATE , JCT3V-E0182 163 122 // LGE_SIMP_DISP_AVAIL_J0041 // Use 2 status for disparity availability - DISP_AVAILABLE and DISP_NONE 164 #define H_3D_IC1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060123 #define NH_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 165 124 // Unifying rounding offset, for IC part, JCT3V-D0135 166 125 // Full Pel Interpolation for Depth, HHI_FULL_PEL_DEPTH_MAP_MV_ACC … … 176 135 // LGE_CHROMA_IC_J0050_J0034 177 136 #if NH_3D_NBDV 178 #define H_3D_NBDV_REF 1 // Depth oriented neighboring block disparity derivation137 #define NH_3D_NBDV_REF 1 // Depth oriented neighboring block disparity derivation 179 138 // MTK_D0156 180 139 // MERL_D0166: Reference view selection in NBDV & Bi-VSP … … 184 143 // SEC_VER_DONBDV_H0103 Vertical DV Restriction for DoNBDV 185 144 #endif 186 #define H_3D_VSP 1 // View synthesis prediction145 #define NH_3D_VSP 1 // View synthesis prediction 187 146 // MERL_C0152: Basic VSP 188 147 // MERL_D0166: Reference view selection in NBDV & Bi-VSP … … 202 161 // MTK_MRG_LIST_SIZE_CLEANUP_J0059 1 // Include VSP for deriving merge candidate list size, JCT3V-J0059 203 162 // SEC_A1_BASED_VSP_J0039 1 // Removal of redundant VSP in Merge list 204 #define H_3D_IV_MERGE 1 // Inter-view motion merge candidate 163 #define NH_3D_MLC 1 164 #define NH_3D_IV_MERGE 1 // Inter-view motion merge candidate 205 165 // HHI_INTER_VIEW_MOTION_PRED 206 166 // SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction … … 209 169 // MTK_INTERVIEW_MERGE_A0049 , second part 210 170 // QC_AMVP_MRG_UNIFY_IVCAN_C0051 211 // TEXTURE MERGING CANDIDATE , JCT3V-C0137212 171 // QC_INRIA_MTK_MRG_E0126 213 172 // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate 214 // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode215 173 // MTK_NBDV_IVREF_FIX_G0067 , Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 216 174 // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074 … … 225 183 // SEC_SIMP_SHIFTED_DV_I0086 Simplification of Shifted DV candidate, JCT3V-I0086 226 184 // SEC_SHIFTED_IVMC_POS_K0036 Position Derivation for Shifted-IVMC, JCT3V-K0036 227 #define H_3D_TMVP 1 // QC_TMVP_C0047 185 #define NH_3D_TEXT_MERGE 1 186 // TEXTURE MERGING CANDIDATE , JCT3V-C0137 187 // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode 188 #define NH_3D_TMVP 1 // QC_TMVP_C0047 228 189 // Sony_M23639 229 190 // H_3D_TMVP_SCALING_FIX_K0053 1 // QC/CY for K0053 230 #define H_3D_DIM 1 // DIM, Depth intra modes, includes: 191 #define NH_3D_DMM 1 // Depth modeling modes 192 // HHI_DMM_PRED_TEX 231 193 // HHI_DMM_WEDGE_INTRA 232 // HHI_DMM_PRED_TEX233 194 // FIX_WEDGE_NOFLOAT_D0036 234 195 // LGE_EDGE_INTRA_A0070 235 196 // LGE_DMM3_SIMP_C0044 236 197 // QC_DC_PREDICTOR_D0183 198 // LGE_CONCATENATE_D0141 199 // PKU_QC_DEPTH_INTRA_UNI_D0195 200 // SEC_DMM2_E0146_HHIFIX Removal of DMM2 from DMMs 201 // ZJU_DEPTH_INTRA_MODE_E0204 Simplified Binarization for depth_intra_mode 202 // SCU_HS_DMM4_REMOVE_DIV_E0242 DMM4 Division Removal 203 // LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 1 Removal of overlap between DMM3 and DMM1 204 // SEC_DMM3_RBC_F0147 Removal of DMM3 and RBC from DMMs 205 // HHI_DIM_PREDSAMP_FIX_F0171 206 // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes 207 // LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 Use only one context for CABAC of dim_not_present_flag 208 // QC_SIMP_DELTADC_CODING_H0131 Simplify detaDC entropy coding 209 // MTK_DMM_SIMP_CODE_H0092 Remove CABAC context for DMM1 mode coding 210 // MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 Use only one context for CABAC of delta_dc_flag as in JCTVC-H0084, JCTVC-H0100 and JCTVC-H0113 211 // HS_DMM_SIGNALLING_I0120 212 // SHARP_DMM1_I0110 LUT size reduction for DMM1 proposed in JCT3V-I0110 213 // MTK_DMM_SIM_J0035 214 // SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation 215 #define NH_3D_DLT 1 // Depth Lookup Table 237 216 // HHI_DELTADC_DLT_D0035 238 // PKU_QC_DEPTH_INTRA_UNI_D0195 217 // LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 JCT3V-F0159 218 // SEC_NO_RESI_DLT_H0105 219 // MTK_DLT_CODING_FIX_H0091 220 // H_3D_DELTA_DLT 221 // RWTH_DLT_CLIP_I0057 222 // SHARP_DLT_SIMP_J0029 DLT(DepthValue2Idx[]) table derivation cleanup 223 #define NH_3D_SDC_INTRA 1 // Segment-wise DC Coding method for INTRA 224 #define NH_3D_SDC_INTER 1 // Segment-wise DC Coding method for INTER 239 225 // RWTH_SDC_DLT_B0036 240 226 // INTEL_SDC64_D0193 241 227 // RWTH_SDC_CTX_SIMPL_D0032 242 // LGE_CONCATENATE_D0141243 228 // FIX_SDC_ENC_RD_WVSO_D0163 244 229 // MTK_SAMPLE_BASED_SDC_D0110 245 // SEC_DMM2_E0146_HHIFIX Removal of DMM2 from DMMs246 // ZJU_DEPTH_INTRA_MODE_E0204 Simplified Binarization for depth_intra_mode247 230 // KWU_SDC_SIMPLE_DC_E0117 Simplified DC calculation for SDC 248 // SCU_HS_DMM4_REMOVE_DIV_E0242 DMM4 Division Removal249 231 // LGE_SDC_REMOVE_DC_E0158 Removal of DC mode from SDC 250 // LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 1 Removal of overlap between DMM3 and DMM1251 // LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 JCT3V-F0159252 // HHI_DIM_PREDSAMP_FIX_F0171253 // SEC_DMM3_RBC_F0147 Removal of DMM3 and RBC from DMMs254 // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes255 232 // Unify intra SDC and inter SDC 256 233 // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes … … 259 236 // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split 260 237 // HS_DMM_SDC_PREDICTOR_UNIFY_H0108 Unification of DMM and SDC predictor derivation 261 // LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 Use only one context for CABAC of dim_not_present_flag262 // QC_SIMP_DELTADC_CODING_H0131 Simplify detaDC entropy coding263 // MTK_DMM_SIMP_CODE_H0092 Remove CABAC context for DMM1 mode coding264 // MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 Use only one context for CABAC of delta_dc_flag as in JCTVC-H0084, JCTVC-H0100 and JCTVC-H0113265 238 // MTK_SDC_FLAG_FIX_H0095 Remove conditional check of PCM flag based on SDC flag, JCTVC-H0095 266 // SEC_NO_RESI_DLT_H0105267 // MTK_DLT_CODING_FIX_H0091268 // HS_DMM_SIGNALLING_I0120269 // SHARP_DMM1_I0110 LUT size reduction for DMM1 proposed in JCT3V-I0110270 239 // FAST_SDC_OFFSET_DECISION_I0084 271 240 // SEPARATE_FLAG_I0085 272 // H_3D_DELTA_DLT273 // RWTH_DLT_CLIP_I0057274 // MTK_DMM_SIM_J0035275 241 // MTK_J0033 276 // SHARP_DLT_SIMP_J0029 DLT(DepthValue2Idx[]) table derivation cleanup277 // SHARP_DMM_CLEAN_K0042 1 // Generate DMM pattern with rotation278 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding279 242 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding 280 243 // SEC_INTER_SDC_G0101 Improved inter SDC with multiple DC candidates 281 #define H_3D_INTER_SDC_FIX 1 282 #define H_3D_SPIVMP 1 // H_3D_SPIVMP JCT3V-F0110: Sub-PU level inter-view motion prediction 244 #define NH_3D_SPIVMP 1 // H_3D_SPIVMP JCT3V-F0110: Sub-PU level inter-view motion prediction 283 245 // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 284 246 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate 285 247 // Simplification on Sub-PU level temporal interview motion prediction 286 248 // MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 287 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging249 #define NH_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 288 250 // MTK_DBBP_AMP_REM_H0072 289 251 // RWTH_DBBP_NO_SPU_H0057 … … 298 260 // RWTH_DBBP_NO_SATD_K0028 299 261 // HS_DBBP_CLEAN_K0048 300 #define H_3D_DDD 1 // Disparity derived depth coding 301 // LGE_DDD_REMOVAL_J0042_J0030 DDD removal 302 #define H_3D_DIS 1 // Depth intra skip 262 #define NH_3D_DIS 1 // Depth intra skip 303 263 // SEC_DEPTH_INTRA_SKIP_MODE_K0033 Depth intra skip mode 304 264 #define H_3D_FCO 0 // Flexible coding order for 3D 305 #define H_3D_FAST_INTRA_SDC 1 // I0123306 265 // OTHERS 307 266 // MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 // Progressive MV Compression, JCT3V-E0170 308 #define H_3D_FAST_TEXTURE_ENCODING 1 // Fast merge mode decision and early CU determination for texture component of dependent view, JCT3V-E0173309 267 // MTK_FAST_TEXTURE_ENCODING_E0173 310 #if H_3D_DIM311 #define H_3D_FAST_DEPTH_INTRA 1 // Fast DMM Selection312 // SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX313 #endif314 268 //HLS 315 269 // HHI_DEPENDENCY_SIGNALLING_I1_J0107 … … 321 275 // H_3D_DIRECT_DEP_TYPE 322 276 // Rate Control 323 #define KWU_FIX_URQ 1277 #define KWU_FIX_URQ 0 324 278 #define KWU_RC_VIEWRC_E0227 0 ///< JCT3V-E0227, view-wise target bitrate allocation 325 279 #define KWU_RC_MADPRED_E0227 0 ///< JCT3V-E0227, inter-view MAD prediction 326 #endif // H_3D280 #endif // NH_3D 327 281 ///////////////////////////////////////////////////////////////////////////////////////// 328 282 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// … … 349 303 #if NH_3D_ARP 350 304 #define H_3D_ARP_WFNR 3 351 #endif352 ///// ***** DEPTH INTRA MODES *********353 #if H_3D_DIM354 // HHI_DMM4_ENC_I0066355 #define H_3D_DIM_DMM 1 // Depth Modeling Modes356 #define H_3D_DIM_SDC 1 // Simplified Depth Coding method357 #define H_3D_DIM_DLT 1 // Depth Lookup Table358 #define H_3D_DIM_ENC 1 // Depth Intra encoder optimizations, includes:359 // HHI_DEPTH_INTRA_SEARCH_RAU_C0160360 // LG_ZEROINTRADEPTHRESI_A0087361 305 #endif 362 306 ///////////////////////////////////////////////////////////////////////////////////// … … 389 333 // TBD: Check if integration is necessary. 390 334 #define H_MV_HLS_PTL_LIMITS 0 391 #define H_MV_HLS7_GEN 0 // General changes (not tested)392 // POC393 // #define H_MV_HLS_7_POC_P0041_3 0 // (POC/P0041/POC reset) #3 It was remarked that we should require each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above)394 // #define H_MV_HLS_7_POC_P0041_FIXES 0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture.395 // #define H_MV_HLS_7_POC_P0056_4 0 // (POC/P0056/layer tree poc) #4 Proposal 1: If the POC reset approach is adopted as the basis for multi-layer POC derivation, it is proposed to derive the POC anchor picture from the previous TID0 picture (that is not a RASL picture, a RADL picture or a sub-layer non-reference picture and not with discardable_flag equal to 1) of the current layer or any of its reference layer. This is asserted to improve loss resilience and reduce bit rate overhead. Decision: Adopt Proposal 1 (with the suggested modifications Ewith text provided as P0297).396 // SEI related397 //#define H_MV_HLS_8_SEI_NODOC_53 0 // #53 (SEI /NODOC/Added Multiview view position SEI message) Plain copy from AVC.398 //#define H_MV_HLS_8_SEI_NODOC_52 0 // #52 (SEI /NODOC/Added Multiview acquisition information SEI) Plain copy from AVC.399 //#define H_MV_HLS_8_SEI_NODOC_51 0 // #51 (SEI /NODOC/Added Multiview scene information SEI message)400 //#define H_MV_HLS_8_SEI_Q0189_35 0 // #35 (SEI /Q0189/SEI message for indicating constraints on TMVP) Proposal 2.3, SEI message for indicating constraints on TMVP401 //#define H_MV_HLS_8_EDF_Q0116_29 0 // #29 (ED.FIX /Q0116/Recovery point SEI) , consider adding a note regarding how random accessibility is affected by the recovery point SEI message402 //#define H_MV_HLS_8_GEN_Q0183_23 0 // #23 (GEN /Q0183/SEI clean-ups) numerous small clean-ups on SEI messages.403 //#define H_MV_HLS_8_MIS_Q0247_49 0 // #49 (MISC /Q0247/frame-field information SEI message)404 //#define H_MV_HLS_8_MIS_Q0189_34 0 // #34 (MISC /Q0189/slice temporal mvp enabled flag) Proposal 2.2, clarification of semantics of slice temporal mvp enabled flag405 //#define H_MV_HLS_8_EDF_Q0081_01 0 // #1 (ED.FIX /Q0081/alpha channel persist) On reuse of alpha planes in auxiliary pictures. It was asked why there would not be a presumption that the alpha channel content would simply persist, without needing the flag to indicate it. Decision (Ed.): Delegated to editors to clarify, as necessary, that the alpha channel content persists until cancelled or updated in output order.406 //#define H_MV_HLS_8_SEI_Q0253_37 0 // #37 (SEI /Q0253/layer not present), modified semantics of layers not present SEI message to correct bug introduced during editing407 //#define H_MV_HLS_8_SEI_Q0045_11 0 // #11 (SEI /Q0045/Overlay) Proposal for an SEI message on selectable overlays. Decision: Adopt (modified for variable-length strings).408 //#define H_MV_HLS_7_SEI_P0133_28 0 // (SEI/P0133/Recovery point SEI) #28 Decision: Adopt change to recover point semantics only (-v3)409 //#define H_MV_HLS_7_SEI_P0123_25 0 // (SEI/P0123/Alpha channel info) #25 Add alpha channel information SEI message Decision: Adopt. Constrain the bit depth indicated to be equal to the coded bit depth of the aux picture.410 // DPB411 //#define H_MV_HLS_8_HRD_Q0102_09 0 // #9 (HRD /Q0102/NoOutputOfPriorPicsFlag) It was suggested that also the separate_colour_plane_flag should affect inference of NoOutputOfPriorPicsFlag. Decision (Ed.): Agreed (affects RExt text).412 //#define H_MV_HLS_8_DBP_Q0154_38 0 // #38 (DBP /Q0154/VPS DPB) Proposal in C.5.2.1: Add in the decoding process that when a new VPS is activated, all pictures in the DPB are marked as unused for reference413 //#define H_MV_HLS_8_HRD_Q0154_10 0 // #10 (HRD /Q0154/DPB Flushing and parameters) On picture flushing and DPB parameters Decision: Adopted (some details to be discussed further in BoG).414 //#define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution415 // OTHERS416 //#define H_MV_HLS_8_HSB_Q0041_03 0 // #3 (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows ?// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution417 //#define H_MV_HLS_8_MIS_Q0078_24 0 // #24 (MISC /Q0078/scan and pic type) , Items 3 b,c and 4, clarifying which pictures in an output layer sets are applied the values of general_progressive_source_flag, general_interlaced_source_flag, general_non_packed_constraint_flag and general_frame_only_constraint_flag.418 //#define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.419 335 ///////////////////////////////////////////////////////////////////////////////////////// 420 336 /////////////////////////////////// HM RELATED DEFINES //////////////////////////////// … … 871 787 #define NUM_SAO_BO_CLASSES_LOG2 5 872 788 #define NUM_SAO_BO_CLASSES (1<<NUM_SAO_BO_CLASSES_LOG2) 789 #if NH_MV 790 enum DecodingProcess 791 { 792 INVALID, 793 CLAUSE_8, 794 ANNEX_C, 795 ANNEX_F, 796 ANNEX_G, 797 ANNEX_H, 798 ANNEX_I 799 }; 800 #endif 873 801 namespace Profile 874 802 { … … 1017 945 AUX_ID = 3, 1018 946 }; 947 enum DecProcPart 948 { 949 START_PIC, 950 FINALIZE_PIC 951 }; 1019 952 #endif 1020 953 #if NH_3D
Note: See TracChangeset for help on using the changeset viewer.