Changeset 476 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
- Timestamp:
- 18 Jun 2013, 05:16:27 (11 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp
r446 r476 581 581 WRITE_FLAG( 0, "sps_extension_flag" ); 582 582 #endif 583 584 #if H_3D_IV_MERGE 585 if( pcSPS->getViewIndex() || pcSPS->isDepth() ) 586 { 587 WRITE_FLAG( 0, "base_view_flag" ); 588 if( pcSPS->isDepth() ) 589 { 590 WRITE_FLAG( 1, "depth_flag" ); 591 WRITE_UVLC( pcSPS->getViewIndex(), "view_idx" ); 592 } 593 else 594 { 595 WRITE_FLAG( 0, "depth_flag" ); 596 WRITE_UVLC( pcSPS->getViewIndex() - 1, "view_idx_minus1" ); 597 WRITE_UVLC( pcSPS->getPredDepthMapGeneration(), "Pdm_generation" ); 598 if( pcSPS->getPredDepthMapGeneration() ) 599 { 600 WRITE_UVLC( pcSPS->getMultiviewMvPredMode(), "multi_view_mv_pred_mode" ); 601 } 602 } 603 } 604 else 605 { 606 WRITE_FLAG( 1, "base_view_flag" ); 607 } 608 #endif 583 609 } 584 610 … … 1071 1097 xCodePredWeightTable( pcSlice ); 1072 1098 } 1099 #if H_3D_IV_MERGE 1100 assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM); 1101 #else 1073 1102 assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS); 1103 #endif 1074 1104 if (!pcSlice->isIntra()) 1075 1105 { 1106 #if H_3D_IV_MERGE 1107 WRITE_UVLC(((pcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) == PDM_USE_FOR_MERGE? MRG_MAX_NUM_CANDS_MEM: MRG_MAX_NUM_CANDS) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand"); 1108 #else 1076 1109 WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand"); 1110 #endif 1077 1111 } 1078 1112 Int iCode = pcSlice->getSliceQp() - ( pcSlice->getPPS()->getPicInitQPMinus26() + 26 ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCfg.h
r446 r476 375 375 TAppComCamPara* m_cameraParameters; 376 376 377 #if H_3D_IV_MERGE 378 UInt m_uiPredDepthMapGeneration; 379 UInt m_uiMultiviewMvPredMode; 380 #endif 377 381 #if H_3D_VSO 378 382 //====== View Synthesis Optimization ====== … … 926 930 Void setDispCoeff ( Double d ) { m_dDispCoeff = d; } 927 931 #endif // H_3D_VSO 932 #if H_3D_IV_MERGE 933 Void setMultiviewMvPredMode (UInt ui) { m_uiMultiviewMvPredMode = ui;} 934 Void setPredDepthMapGeneration ( UInt u ) { m_uiPredDepthMapGeneration = u; } 935 936 UInt getMultiviewMvPredMode () { return m_uiMultiviewMvPredMode;} 937 #endif 928 938 #endif // H_3D 929 939 }; -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCu.cpp
r455 r476 1259 1259 { 1260 1260 assert( rpcTempCU->getSlice()->getSliceType() != I_SLICE ); 1261 #if H_3D_IV_MERGE 1262 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 1263 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; 1264 #else 1261 1265 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists 1262 1266 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 1267 #endif 1263 1268 Int numValidMergeCand = 0; 1264 1269 … … 1284 1289 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 1285 1290 1291 #if H_3D_IV_MERGE 1292 Int mergeCandBuffer[MRG_MAX_NUM_CANDS_MEM]; 1293 #else 1286 1294 Int mergeCandBuffer[MRG_MAX_NUM_CANDS]; 1295 #endif 1287 1296 for( UInt ui = 0; ui < rpcTempCU->getSlice()->getMaxNumMergeCand(); ++ui ) 1288 1297 { -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp
r455 r476 49 49 #include <time.h> 50 50 #include <math.h> 51 51 #if H_3D_IV_MERGE 52 #include "../../App/TAppEncoder/TAppEncTop.h" 53 #endif 52 54 using namespace std; 53 55 //! \ingroup TLibEncoder … … 107 109 m_viewIndex = 0; 108 110 m_isDepth = false; 111 #if H_3D_IV_MERGE 112 m_pcDepthMapGenerator = NULL; 113 #endif 109 114 #endif 110 115 #endif … … 155 160 m_viewIndex = pcTEncTop->getViewIndex(); 156 161 m_isDepth = pcTEncTop->getIsDepth(); 162 #if H_3D_IV_MERGE 163 m_pcDepthMapGenerator = pcTEncTop->getDepthMapGenerator(); 164 #endif 157 165 #endif 158 166 #endif … … 674 682 #endif 675 683 684 #if H_3D_IV_MERGE 685 TAppEncTop* tAppEncTop = m_pcEncTop->getEncTop(); 686 TComPic * const pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( getViewIndex(), pcSlice->getPOC(), false ) : NULL; 687 assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL ); 688 pcSlice->setTexturePic( pcTexturePic ); 689 #endif 676 690 // Slice info. refinement 677 691 #if H_MV … … 1028 1042 m_storedStartCUAddrForEncodingSliceSegment.push_back(nextCUAddr); 1029 1043 startCUAddrSliceSegmentIdx++; 1044 1045 #if H_3D_IV_MERGE 1046 m_pcDepthMapGenerator->initViewComponent( pcPic ); 1047 #endif 1048 1030 1049 #if H_3D_NBDV 1031 1050 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. … … 2478 2497 #if ADAPTIVE_QP_SELECTION 2479 2498 #if H_MV 2480 printf("Layer %3d POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits",2499 printf("Layer %3d POC %4d TId: %1d ( %c-SLICE, nQP %d QP %d ) %10d bits", 2481 2500 pcSlice->getLayerId(), 2482 2501 pcSlice->getPOC(), -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.h
r446 r476 59 59 #include <vector> 60 60 61 #if H_3D_IV_MERGE 62 #include "TLibCommon/TComDepthMapGenerator.h" 63 #endif 61 64 //! \ingroup TLibEncoder 62 65 //! \{ … … 107 110 Int m_viewIndex; 108 111 Bool m_isDepth; 112 113 #if H_3D_IV_MERGE 114 TComDepthMapGenerator* m_pcDepthMapGenerator; 115 #endif 116 109 117 #endif 110 118 #endif … … 166 174 167 175 TComList<TComPic*>* getListPic() { return m_pcListPic; } 168 176 #if H_3D_IV_MERGE 177 TEncTop* getEncTop() { return m_pcEncTop; } 178 #endif 169 179 #if !H_MV 170 180 Void printOutSummary ( UInt uiNumAllPicCoded ); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSearch.cpp
r456 r476 3315 3315 #endif 3316 3316 3317 #if H_3D_IV_MERGE 3318 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 3319 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; 3320 #else 3317 3321 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists 3318 3322 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 3323 #endif 3319 3324 Int numValidMergeCand = 0 ; 3320 3325 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp
r446 r476 529 529 rpcSlice->setSliceSegmentMode ( m_pcCfg->getSliceSegmentMode() ); 530 530 rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() ); 531 #if H_3D_IV_MERGE 532 rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() + ((rpcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) ? 1:0) ); 533 #else 531 534 rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() ); 535 #endif 532 536 xStoreWPparam( pPPS->getUseWP(), pPPS->getWPBiPred() ); 533 537 } -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp
r446 r476 119 119 #endif 120 120 m_cLoopFilter. create( g_uiMaxCUDepth ); 121 121 122 #if H_3D_IV_MERGE 123 m_cDepthMapGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(m_uiPredDepthMapGeneration), PDM_SUB_SAMP_EXP_Y(m_uiPredDepthMapGeneration) ); 124 #endif 125 122 126 #if RATE_CONTROL_LAMBDA_DOMAIN 123 127 if ( m_RCEnableRateControl ) … … 225 229 m_cLoopFilter. destroy(); 226 230 m_cRateCtrl. destroy(); 231 232 #if H_3D_IV_MERGE 233 m_cDepthMapGenerator. destroy(); 234 #endif 227 235 // SBAC RD 228 236 if( m_bUseSBACRD ) … … 284 292 } 285 293 294 #if H_3D_IV_MERGE 295 Void TEncTop::init( TAppEncTop* pcTAppEncTop) 296 #else 286 297 Void TEncTop::init() 298 #endif 287 299 { 288 300 // initialize SPS … … 306 318 m_cCuEncoder. init( this ); 307 319 320 #if H_3D_IV_MERGE 321 m_pcTAppEncTop = pcTAppEncTop; 322 m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getVPSAccess(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() ); 323 #endif 324 308 325 // initialize transform & quantization class 309 326 m_pcCavlcCoder = getCavlcCoder(); … … 658 675 { 659 676 m_cSPS.initCamParaSPS ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset ); 660 } 677 #if H_3D_IV_MERGE 678 if( m_viewIndex ) 679 { 680 m_cSPS.setPredDepthMapGeneration( m_viewIndex, false, m_uiPredDepthMapGeneration, m_uiMultiviewMvPredMode); 681 } 682 else 683 { 684 m_cSPS.setPredDepthMapGeneration( m_viewIndex, false ); 685 } 686 #endif 687 } 688 #if H_3D_IV_MERGE 689 else 690 { 691 m_cSPS.initCamParaSPSDepth ( m_viewIndex); 692 m_cSPS.setPredDepthMapGeneration( m_viewIndex, true ); 693 } 694 #endif 661 695 #endif 662 696 } … … 1300 1334 } 1301 1335 #endif 1336 1337 1302 1338 //! \} -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.h
r446 r476 57 57 #include "TEncPreanalyzer.h" 58 58 #include "TEncRateCtrl.h" 59 60 #if H_3D_IV_MERGE 61 #include "TLibCommon/TComDepthMapGenerator.h" 62 #endif 59 63 //! \ingroup TLibEncoder 60 64 //! \{ … … 63 67 // Class definition 64 68 // ==================================================================================================================== 69 70 #if H_3D_IV_MERGE 71 class TAppEncTop; 72 #endif 65 73 66 74 /// encoder class … … 96 104 TEncSlice m_cSliceEncoder; ///< slice encoder 97 105 TEncCu m_cCuEncoder; ///< CU encoder 106 107 #if H_3D_IV_MERGE 108 TComDepthMapGenerator m_cDepthMapGenerator; ///< depth map generator 109 #endif 110 98 111 // SPS 99 112 TComSPS m_cSPS; ///< SPS … … 119 132 TEncBinCABAC* m_pcRDGoOnBinCodersCABAC; ///< going on bin coder CABAC for RD stage per substream 120 133 134 #if H_3D_IV_MERGE 135 TAppEncTop* m_pcTAppEncTop; 136 #endif 121 137 // quality control 122 138 TEncPreanalyzer m_cPreanalyzer; ///< image characteristics analyzer for TM5-step3-like adaptive QP … … 145 161 Void create (); 146 162 Void destroy (); 163 #if H_3D_IV_MERGE 164 Void init ( TAppEncTop* pcTAppEncTop ); 165 #else 147 166 Void init (); 167 #endif 148 168 #if H_MV 149 169 TComPicLists* getIvPicLists() { return m_ivPicLists; } … … 185 205 TEncSbac* getRDGoOnSbacCoders () { return m_pcRDGoOnSbacCoders; } 186 206 TEncRateCtrl* getRateCtrl () { return &m_cRateCtrl; } 207 #if H_3D_IV_MERGE 208 TAppEncTop* getEncTop () { return m_pcTAppEncTop; } 209 #endif 187 210 TComSPS* getSPS () { return &m_cSPS; } 188 211 TComPPS* getPPS () { return &m_cPPS; } … … 205 228 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 206 229 #endif 230 #if H_3D_IV_MERGE 231 TComDepthMapGenerator* getDepthMapGenerator () { return &m_cDepthMapGenerator; } 232 #endif 207 233 // ------------------------------------------------------------------------------------------------------------------- 208 234 // encoder function
Note: See TracChangeset for help on using the changeset viewer.