Changeset 476 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source
- Timestamp:
- 18 Jun 2013, 05:16:27 (12 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source
- Files:
-
- 2 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp
r456 r476 641 641 m_tDecTop[ decIdx ] = new TDecTop; 642 642 m_tDecTop[ decIdx ]->create(); 643 #if H_3D_IV_MERGE 644 m_tDecTop[ decIdx ]->init(this ); 645 #else 643 646 m_tDecTop[ decIdx ]->init( ); 647 #endif 644 648 m_tDecTop[ decIdx ]->setLayerId( layerId ); 645 649 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); … … 678 682 } 679 683 #endif 684 #if H_3D_IV_MERGE 685 TComPic* TAppDecTop::xGetPicFromView( Int viewIdx, Int poc, Bool isDepth ) 686 { 687 assert( ( viewIdx >= 0 ) ); 688 689 TComList<TComPic*>* apcListPic = m_tDecTop[ (isDepth ? 1 : 0) + viewIdx * 2 ]->getListPic(); 690 691 TComPic* pcPic = NULL; 692 for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ ) 693 { 694 if( (*it)->getPOC() == poc ) 695 { 696 pcPic = *it; 697 break; 698 } 699 } 700 return pcPic; 701 } 702 #endif 703 680 704 //! \} -
branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.h
r446 r476 49 49 #include "TAppDecCfg.h" 50 50 51 #if H_3D_IV_MERGE 52 #include "TLibCommon/TComDepthMapGenerator.h" 53 #endif 51 54 //! \ingroup TAppDecoder 52 55 //! \{ … … 73 76 // for output control 74 77 Bool m_abDecFlag[ MAX_GOP ]; ///< decoded flag in one GOP 78 79 #if H_3D_IV_MERGE 80 Int m_fcoViewDepthId; 81 Char m_fcoOrder[MAX_VIEW_NUM*2]; 82 #endif 75 83 #if H_MV 76 84 Int m_pocLastDisplay [ MAX_NUM_LAYERS ]; ///< last POC in display order … … 82 90 FILE* m_pScaleOffsetFile; 83 91 CamParsCollector m_cCamParsCollector; 92 #if H_3D_IV_MERGE 93 TComVPSAccess m_cVPSAccess; 94 TComSPSAccess m_cSPSAccess; 95 TComAUPicAccess m_cAUPicAccess; 96 #endif 84 97 #endif 85 98 public: … … 90 103 Void destroy (); ///< destroy internal members 91 104 Void decode (); ///< main decoding function 92 105 106 #if H_3D_IV_MERGE 107 TDecTop* getTDecTop ( Int viewIdx, Bool isDepth ); 108 TComPic* getPicFromView ( Int viewIdx, Int poc, bool isDepth ) { return xGetPicFromView( viewIdx, poc, isDepth ); } 109 #endif 110 111 #if H_3D_IV_MERGE 112 TComVPSAccess* getVPSAccess () { return &m_cVPSAccess; } 113 TComSPSAccess* getSPSAccess () { return &m_cSPSAccess; } 114 TComAUPicAccess* getAUPicAccess() { return &m_cAUPicAccess; } 115 TDecTop* getDecTop0 () { return m_tDecTop[0]; } 116 #endif 117 93 118 protected: 94 119 Void xCreateDecLib (); ///< create internal classes 95 120 Void xDestroyDecLib (); ///< destroy internal classes 96 121 Void xInitDecLib (); ///< initialize decoder class 97 122 123 #if H_3D_IV_MERGE 124 TComPic* xGetPicFromView( Int viewIdx, Int poc, Bool isDepth ); 125 #endif 126 98 127 #if H_MV 99 128 Void xWriteOutput ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file … … 104 133 Void xFlushOutput ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file 105 134 #endif 135 106 136 Bool isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet 107 137 }; -
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp
r446 r476 717 717 718 718 #endif //HHI_VSO 719 720 #if H_3D_IV_MERGE 721 ("PredDepthMapGen", m_uiPredDepthMapGeneration, (UInt)0, "generation of prediction depth maps for motion data prediction" ) 722 ("MultiviewMvPred", m_uiMultiviewMvPredMode, (UInt)0, "usage of predicted depth maps" ) 723 #endif 719 724 #endif //H_3D 720 725 ; … … 1439 1444 xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1440 1445 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" ); 1446 #if H_3D_IV_MERGE 1447 xConfirmPara ( m_uiPredDepthMapGeneration > 2, "PredDepthMapGen must be less than or equal to 2" ); 1448 xConfirmPara ( m_uiMultiviewMvPredMode > 7, "MultiviewMvPred must be less than or equal to 7" ); 1449 xConfirmPara ( m_uiMultiviewMvPredMode > 0 && m_uiPredDepthMapGeneration == 0 , "MultiviewMvPred > 0 requires PredDepthMapGen > 0" ); 1450 #endif 1441 1451 #if H_3D_VSO 1442 1452 if( m_bUseVSO ) … … 2278 2288 printf("WVSO:%d ", m_bUseWVSO ); 2279 2289 #endif 2290 #if H_3D_IV_MERGE 2291 printf("MultiviewMvPred:%d", m_uiMultiviewMvPredMode); 2292 #endif 2280 2293 printf("\n\n"); 2281 2294 -
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.h
r446 r476 381 381 TAppComCamPara m_cCameraData; 382 382 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 383 #if H_3D_IV_MERGE 384 UInt m_uiMultiviewMvPredMode; 385 UInt m_uiPredDepthMapGeneration; 386 #endif 383 387 #if H_3D_VSO 384 388 Char* m_pchVSOConfig; -
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp
r446 r476 128 128 m_frameRcvd .push_back(0); 129 129 m_acTEncTopList .push_back(new TEncTop); 130 #if H_3D_IV_MERGE 131 // m_acTEncDepthTopList .push_back(new TEncTop); 132 #endif 130 133 m_acTVideoIOYuvInputFileList.push_back(new TVideoIOYuv); 131 134 m_acTVideoIOYuvReconFileList.push_back(new TVideoIOYuv); 132 135 m_picYuvRec .push_back(new TComList<TComPicYuv*>) ; 133 136 #if H_3D_IV_MERGE 137 //m_acTEncDepthTopList[iViewIdx]->setFrameRate ( m_iFrameRate ); 138 //m_acTEncDepthTopList[iViewIdx]->setFrameSkip ( m_FrameSkip ); 139 //m_acTEncDepthTopList[iViewIdx]->setSourceWidth ( m_iSourceWidth ); 140 //m_acTEncDepthTopList[iViewIdx]->setSourceHeight ( m_iSourceHeight ); 141 //m_acTEncDepthTopList[iViewIdx]->setCroppingMode ( m_croppingMode ); 142 //m_acTEncDepthTopList[iViewIdx]->setCropLeft ( m_cropLeft ); 143 //m_acTEncDepthTopList[iViewIdx]->setCropRight ( m_cropRight ); 144 //m_acTEncDepthTopList[iViewIdx]->setCropTop ( m_cropTop ); 145 //m_acTEncDepthTopList[iViewIdx]->setCropBottom ( m_cropBottom ); 146 //m_acTEncDepthTopList[iViewIdx]->setFrameToBeEncoded ( m_iFrameToBeEncoded ); 147 //m_acTEncDepthTopList[iViewIdx]->setViewId ( iViewIdx ); 148 //m_acTEncDepthTopList[iViewIdx]->setIsDepth ( true ); 149 150 //m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 151 152 //m_acTEncDepthTopList[iViewIdx]->setLayerId ( layerId ); 153 154 #endif 134 155 m_ivPicLists.push_back( m_acTEncTopList[ layer ]->getListPic() ); 135 156 TEncTop& m_cTEncTop = *m_acTEncTopList[ layer ]; // It is not a member, but this name helps avoiding code duplication !!! … … 143 164 m_cTEncTop.setIsDepth ( isDepth ); 144 165 //====== Camera Parameters ========= 166 #if H_3D_IV_MERGE 167 //m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( 0 ); 168 //m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( false ); 169 //m_acTEncDepthTopList[iViewIdx]->setCodedScale ( 0 ); 170 //m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( 0 ); 171 #endif 145 172 m_cTEncTop.setCameraParameters ( &m_cCameraData ); 146 173 m_cTEncTop.setCamParPrecision ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision () ); … … 166 193 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 ); 167 194 #endif // H_3D_VSO 195 #if H_3D_IV_MERGE 196 m_cTEncTop.setMultiviewMvPredMode ( m_uiMultiviewMvPredMode ); 197 m_cTEncTop.setPredDepthMapGeneration ( m_uiPredDepthMapGeneration ); 198 #endif 168 199 #endif // H_3D 169 200 … … 189 220 190 221 //====== Coding Structure ======== 222 #if H_3D_IV_MERGE 223 //m_acTEncDepthTopList[iViewIdx]->setIntraPeriod ( m_iIntraPeriod ); 224 //m_acTEncDepthTopList[iViewIdx]->setDecodingRefreshType ( m_iDecodingRefreshType ); 225 //m_acTEncDepthTopList[iViewIdx]->setGOPSize ( m_iGOPSize ); 226 //m_acTEncDepthTopList[iViewIdx]->setGopList ( m_GOPListsMvc[iViewIdx] ); 227 //m_acTEncDepthTopList[iViewIdx]->setExtraRPSs ( m_extraRPSs[iViewIdx] ); 228 #endif 191 229 m_cTEncTop.setIntraPeriod ( m_iIntraPeriod ); 192 230 m_cTEncTop.setDecodingRefreshType ( m_iDecodingRefreshType ); … … 207 245 m_cTEncTop.setNumReorderPics ( m_numReorderPics[i], i ); 208 246 m_cTEncTop.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); 209 } 247 #if H_3D_IV_MERGE 248 m_acTEncDepthTopList[iViewIdx]->setNumReorderPics ( m_numReorderPics[iViewIdx][i], i ); 249 m_acTEncDepthTopList[iViewIdx]->setMaxDecPicBuffering ( m_maxDecPicBuffering[iViewIdx][i], i ); 250 #endif 251 } 252 #if H_3D_IV_MERGE 253 m_acTEncDepthTopList[iViewIdx]->setQP ( m_aiQP[1] ); 254 255 m_acTEncDepthTopList[iViewIdx]->setTemporalLayerQPOffset ( m_aiTLayerQPOffset ); 256 m_acTEncDepthTopList[iViewIdx]->setPad ( m_aiPad ); 257 258 m_acTEncDepthTopList[iViewIdx]->setMaxTempLayer ( m_maxTempLayer[iViewIdx] ); 259 260 m_acTEncDepthTopList[iViewIdx]->setDisInter4x4 ( m_bDisInter4x4); 261 262 m_acTEncDepthTopList[iViewIdx]->setUseNSQT( m_enableNSQT ); 263 m_acTEncDepthTopList[iViewIdx]->setUseAMP( m_enableAMP ); 264 #endif 210 265 #endif 211 266 for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop ) 212 267 { 213 268 m_cTEncTop.setLambdaModifier( uiLoop, m_adLambdaModifier[ uiLoop ] ); 269 #if H_3D_IV_MERGE 270 // m_acTEncDepthTopList[iViewIdx]->setLambdaModifier( uiLoop, m_adLambdaModifier[ uiLoop ] ); 271 #endif 214 272 } 215 273 #if H_MV … … 231 289 232 290 //====== Loop/Deblock Filter ======== 291 #if H_3D_IV_MERGE 292 //m_acTEncDepthTopList[iViewIdx]->setLoopFilterDisable ( m_abLoopFilterDisable[1] ); 293 //m_acTEncDepthTopList[iViewIdx]->setLoopFilterOffsetInAPS ( m_loopFilterOffsetInAPS ); 294 //m_acTEncDepthTopList[iViewIdx]->setLoopFilterBetaOffset ( m_loopFilterBetaOffsetDiv2 ); 295 //m_acTEncDepthTopList[iViewIdx]->setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 296 //m_acTEncDepthTopList[iViewIdx]->setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 297 #endif 233 298 #if H_MV 234 299 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable[layer]); … … 604 669 for(Int layer=0; layer<m_numberOfLayers; layer++) 605 670 { 671 #if H_3D_IV_MERGE 672 m_acTEncTopList[layer]->init(this ); 673 #else 606 674 m_acTEncTopList[layer]->init( ); 675 #endif 607 676 } 608 677 #else … … 1032 1101 } 1033 1102 #endif 1103 #if H_3D_IV_MERGE 1104 TComPic* TAppEncTop::xGetPicFromView( Int viewIdx, Int poc, Bool isDepth ) 1105 { 1106 assert( ( viewIdx >= 0 ) && ( viewIdx < m_iNumberOfViews ) ); 1107 1108 TComList<TComPic*>* apcListPic = m_acTEncTopList[(isDepth ? 1 : 0) + viewIdx * 2]->getListPic() ; 1109 1110 1111 1112 TComPic* pcPic = NULL; 1113 for(TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++) 1114 { 1115 if( (*it)->getPOC() == poc ) 1116 { 1117 pcPic = *it ; 1118 break ; 1119 } 1120 } 1121 1122 return pcPic; 1123 }; 1124 #endif 1034 1125 //! \} -
branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h
r446 r476 48 48 #if H_3D 49 49 #include "../../Lib/TLibRenderer/TRenTop.h" 50 #if H_3D_IV_MERGE 51 #include "TLibCommon/TComDepthMapGenerator.h" 52 #endif 50 53 #endif 51 54 … … 89 92 TRenModel m_cRendererModel; 90 93 #endif 94 95 #if H_3D_IV_MERGE 96 TComVPSAccess m_cVPSAccess; 97 TComSPSAccess m_cSPSAccess; 98 TComAUPicAccess m_cAUPicAccess; 99 #endif 91 100 protected: 92 101 // initialization … … 114 123 void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats); 115 124 void printRateSummary(); 116 125 #if H_3D_IV_MERGE 126 TComPic* xGetPicFromView( Int viewIdx, Int iPoc, Bool isDepth ); 127 #endif 117 128 #if H_MV 118 129 Void xSetLayerIds ( TComVPS& vps ); … … 126 137 127 138 Void encode (); ///< main encoding function 139 #if H_3D_IV_MERGE 140 TComPic* getPicFromView ( Int viewIdx, Int poc, Bool isDepth ) { return xGetPicFromView( viewIdx, poc, isDepth ); } 141 #endif 128 142 #if H_MV 129 143 TEncTop* getTEncTop( UInt layer ) { return m_acTEncTopList[layer]; } ///< return pointer to encoder class for specific layer 130 144 #else 131 145 TEncTop& getTEncTop () { return m_cTEncTop; } ///< return encoder class pointer reference 146 #endif 147 148 #if H_3D_IV_MERGE 149 TComVPSAccess* getVPSAccess () { return &m_cVPSAccess; } 150 TComSPSAccess* getSPSAccess () { return &m_cSPSAccess; } 151 TComAUPicAccess* getAUPicAccess() { return &m_cAUPicAccess; } 132 152 #endif 133 153 };// END CLASS DEFINITION TAppEncTop -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/CommonDef.h
r447 r476 178 178 } 179 179 180 #if H_3D_IV_MERGE 181 #define ROFVS( exp ) \ 182 { \ 183 if( !( exp ) ) \ 184 { \ 185 return; \ 186 } \ 187 } 188 189 #define ROTVS( exp ) \ 190 { \ 191 if( ( exp ) ) \ 192 { \ 193 return; \ 194 } \ 195 } 196 197 #define ROTRS( exp, retVal ) \ 198 { \ 199 if( ( exp ) ) \ 200 { \ 201 return retVal; \ 202 } \ 203 } 204 205 #define ROFRS( exp, retVal ) \ 206 { \ 207 if( !( exp ) ) \ 208 { \ 209 return retVal; \ 210 } \ 211 } 212 #endif 213 180 214 template <typename T> 181 215 __inline T gSign(const T& t) … … 200 234 // MERGE 201 235 #define MRG_MAX_NUM_CANDS 5 202 236 #if H_3D_IV_MERGE 237 #define MRG_MAX_NUM_CANDS_MEM (MRG_MAX_NUM_CANDS+1) // one extra for inter-view motion prediction 238 #endif 203 239 // Reference memory management 204 240 #define DYN_REF_FREE 0 ///< dynamic free of reference memories … … 325 361 #define STD_CAM_PARAMETERS_PRECISION 5 ///< quarter luma sample accuarcy for derived disparities (as default) 326 362 363 #if H_3D_IV_MERGE 364 #define PDM_USE_FOR_IVIEW 1 365 #define PDM_USE_FOR_INTER 2 366 #define PDM_USE_FOR_MERGE 4 367 368 #define MAX_VIEW_NUM 10 369 #define PDM_SUBSAMPLING_EXP 2 // subsampling factor is 2^PDM_SUBSAMPLING_EXP 370 #define PDM_SUB_SAMP_EXP_X(Pdm) ((Pdm)==1?PDM_SUBSAMPLING_EXP:0) 371 #define PDM_SUB_SAMP_EXP_Y(Pdm) ((Pdm)==1?PDM_SUBSAMPLING_EXP:0) 372 373 #define PDM_INTERNAL_CALC_BIT_DEPTH 31 // bit depth for internal calculations (32 - 1 for signed values) 374 #define PDM_BITDEPTH_VIRT_DEPTH 15 // bit depth for virtual depth storage (16 - 1 for signed values) 375 #define PDM_LOG2_MAX_ABS_NORMAL_DISPARITY 8 // maximum absolute normal disparity = 256 (for setting accuracy) 376 #define PDM_VIRT_DEPTH_PRECISION 4 // must be greater than or equal to 2 (since MVs are given in quarter-pel units) 377 378 #define PDM_INTER_CALC_SHIFT ( PDM_INTERNAL_CALC_BIT_DEPTH - PDM_BITDEPTH_VIRT_DEPTH ) // avoids overflow 379 #define PDM_LOG4_SCALE_DENOMINATOR ( PDM_LOG2_MAX_ABS_NORMAL_DISPARITY + PDM_VIRT_DEPTH_PRECISION ) // accuracy of scaling factor 380 #define PDM_OFFSET_SHIFT ( PDM_LOG2_MAX_ABS_NORMAL_DISPARITY ) // accuracy of offset 381 382 #endif 383 327 384 #endif // end of H_3D 328 385 //! \} -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp
r456 r476 40 40 #include "TComPic.h" 41 41 42 #if H_3D_IV_MERGE 43 #include "TComDepthMapGenerator.h" 44 #endif 42 45 //! \ingroup TLibCommon 43 46 //! \{ … … 2426 2429 { 2427 2430 UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx; 2431 #if H_3D_IV_MERGE 2432 TComMv cZeroMv; 2433 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ]; 2434 #else 2428 2435 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 2436 #endif 2429 2437 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 2430 2438 { 2431 2439 abCandIsInter[ui] = false; 2440 #if H_3D_IV_MERGE 2441 pcMvFieldNeighbours[ ( ui << 1 ) ].setMvField(cZeroMv, NOT_VALID); 2442 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID); 2443 #else 2432 2444 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 2433 2445 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 2446 #endif 2434 2447 } 2435 2448 numValidMergeCand = getSlice()->getMaxNumMergeCand(); … … 2444 2457 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 2445 2458 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 2459 2460 #if H_3D_IV_MERGE 2461 Bool bNoPdmMerge = ( m_pcSlice->getSPS()->getViewIndex() == 0 || ( m_pcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) != PDM_USE_FOR_MERGE ); 2462 2463 //===== add merge with predicted depth maps ===== 2464 TComMv acPdmMv [4]; 2465 Int aiPdmRefIdx [4] = {-1, -1, -1, -1}; 2466 Bool bLeftAvai = false; 2467 Int iPosLeftAbove[2] = {-1, -1}; 2468 2469 //Notes from QC: DvMCP related variables. 2470 //acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 2471 2472 DisInfo cDisInfo; 2473 2474 cDisInfo.bDV = getDvInfo(uiAbsPartIdx).bDV; 2475 cDisInfo.m_acNBDV = getDvInfo(uiAbsPartIdx).m_acNBDV; 2476 cDisInfo.m_aVIdxCan = getDvInfo(uiAbsPartIdx).m_aVIdxCan; 2477 2478 if( m_pcSlice->getIsDepth()) 2479 { 2480 UInt uiPartIdxCenter; 2481 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 2482 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 2483 2484 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 2485 { 2486 abCandIsInter[iCount] = true; 2487 puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter ); 2488 if( ( puhInterDirNeighbours[iCount] & 1 ) == 1 ) 2489 { 2490 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 2491 2492 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 2493 2494 //Notes from MTK: shoud be aligned with " full-pel mv accuracy for depth maps", currently not supported 2495 //const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 2496 //cMvPred+=cAdd; 2497 //cMvPred>>=2; 2498 //clipMv(cMvPred); 2499 //pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx()); 2500 if (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0) 2501 { 2502 for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_0); i++) 2503 { 2504 if (getSlice()->getRefPOC(REF_PIC_LIST_0, i) == getSlice()->getPOC()) 2505 { 2506 pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,i); 2507 break; 2508 } 2509 } 2510 } 2511 2512 } 2513 2514 if ( getSlice()->isInterB() ) 2515 { 2516 if( ( puhInterDirNeighbours[iCount] & 2 ) == 2 ) 2517 { 2518 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 2519 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 2520 2521 //Notes from MTK: shoud be aligned with " full-pel mv accuracy for depth maps", currently not supported 2522 //const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 2523 //cMvPred+=cAdd; 2524 //cMvPred>>=2; 2525 //clipMv(cMvPred); 2526 //pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()); 2527 if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0) 2528 { 2529 for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_1); i++) 2530 { 2531 if (getSlice()->getRefPOC(REF_PIC_LIST_1, i) == getSlice()->getPOC()) 2532 { 2533 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,i); 2534 break; 2535 } 2536 } 2537 } 2538 2539 } 2540 } 2541 2542 if (!((pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && !getSlice()->isInterB()) 2543 || (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0 && getSlice()->isInterB()))) 2544 { 2545 if ( mrgCandIdx == iCount ) 2546 { 2547 return; 2548 } 2549 iCount ++; 2550 } 2551 else 2552 { 2553 assert(0); 2554 } 2555 } 2556 } 2557 2558 Int iPdmDir[2] = {0, 0}; 2559 getUnifiedMvPredCan(uiPUIdx, REF_PIC_LIST_0, 0, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir, true); 2560 Int iPdmInterDir; 2561 2562 if( iPdmDir[0] && !bNoPdmMerge ) 2563 { 2564 abCandIsInter [ iCount ] = true; 2565 puhInterDirNeighbours[ iCount ] = iPdmDir[0]; 2566 iPdmInterDir = iPdmDir[0]; 2567 2568 if( ( iPdmInterDir & 1 ) == 1 ) 2569 { 2570 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 2571 } 2572 2573 if( ( iPdmInterDir & 2 ) == 2 ) 2574 { 2575 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 2576 } 2577 2578 if ( mrgCandIdx == iCount ) 2579 { 2580 return; 2581 } 2582 iCount ++; 2583 } 2584 #endif 2585 2586 #if !H_3D_IV_MERGE 2446 2587 #if H_3D_NBDV //Notes from QC: DvMCP related variables. 2447 2588 //acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; … … 2461 2602 //} 2462 2603 #endif 2604 #endif 2605 2463 2606 //left 2464 2607 UInt uiLeftPartIdx = 0; … … 2480 2623 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 2481 2624 } 2625 2626 #if H_3D_IV_MERGE 2627 Bool bRemoveSpa = false; //pruning to inter-view candidates 2628 Int iCnloop = iCount - 1; 2629 for(; iCnloop >= 0; iCnloop --) 2630 { 2631 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 2632 { 2633 bRemoveSpa = true; 2634 abCandIsInter [ iCount ] = false; 2635 2636 //reset to the default value for MC 2637 puhInterDirNeighbours[iCount] = 0; 2638 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 2639 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 2640 break; 2641 } 2642 } 2643 if(!bRemoveSpa) 2644 { 2645 bLeftAvai = true; 2646 iPosLeftAbove[0] = iCount; 2647 2648 if ( mrgCandIdx == iCount ) 2649 { 2650 return; 2651 } 2652 iCount ++; 2653 } 2654 #else 2482 2655 if ( mrgCandIdx == iCount ) 2483 2656 { … … 2485 2658 } 2486 2659 iCount ++; 2660 #endif 2487 2661 } 2488 2662 … … 2511 2685 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 2512 2686 } 2687 #if H_3D_IV_MERGE 2688 Bool bRemoveSpa = false; //pruning to inter-view candidates 2689 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 2690 for(; iCnloop >= 0; iCnloop --) 2691 { 2692 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 2693 { 2694 bRemoveSpa = true; 2695 abCandIsInter [ iCount ] = false; 2696 2697 //reset to the default value for MC 2698 puhInterDirNeighbours[iCount] = 0; 2699 2700 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 2701 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 2702 break; 2703 } 2704 } 2705 if(!bRemoveSpa) 2706 { 2707 iPosLeftAbove[1] = iCount; 2708 2709 if ( mrgCandIdx == iCount ) 2710 { 2711 return; 2712 } 2713 iCount ++; 2714 } 2715 #else 2513 2716 if ( mrgCandIdx == iCount ) 2514 2717 { … … 2516 2719 } 2517 2720 iCount ++; 2721 #endif 2518 2722 } 2519 2723 // early termination … … 2552 2756 return; 2553 2757 } 2758 2759 #if H_3D_IV_MERGE 2760 if(!bNoPdmMerge && iPdmDir[1] ) 2761 { 2762 assert(iCount < getSlice()->getMaxNumMergeCand()); 2763 abCandIsInter [ iCount ] = true; 2764 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 2765 if( ( iPdmDir[1] & 1 ) == 1 ) 2766 { 2767 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 2768 } 2769 if( ( iPdmDir[1] & 2 ) == 2 ) 2770 { 2771 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 2772 } 2773 2774 Bool bRemoveSpa = false; //pruning to A1, B1 2775 for(Int i = 0; i < 2; i ++) 2776 { 2777 Int iCnloop = iPosLeftAbove[i]; 2778 if(iCnloop == -1) 2779 continue; 2780 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 2781 { 2782 bRemoveSpa = true; 2783 abCandIsInter [ iCount ] = false; 2784 //reset to the default value for MC 2785 puhInterDirNeighbours[iCount] = 0; 2786 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 2787 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 2788 break; 2789 } 2790 } 2791 if(!bRemoveSpa) 2792 { 2793 if ( mrgCandIdx == iCount ) 2794 return; 2795 iCount ++; 2796 2797 // early termination 2798 if (iCount == getSlice()->getMaxNumMergeCand()) 2799 { 2800 return; 2801 } 2802 } 2803 } 2804 #endif 2554 2805 2555 2806 //left bottom … … 2717 2968 if ( getSlice()->isInterB()) 2718 2969 { 2970 #if H_3D_IV_MERGE 2971 UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3, 0, 4, 1, 4, 2, 4, 3, 4 }; 2972 UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2, 4, 0, 4, 1, 4, 2, 4, 3 }; 2973 #else 2719 2974 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 2720 2975 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 2976 #endif 2721 2977 2722 2978 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) … … 4246 4502 } 4247 4503 #endif 4504 4505 #if H_3D_IV_MERGE 4506 Bool TComDataCU::getUnifiedMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ) 4507 { 4508 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 4509 ROFRS( pcDepthMapGenerator, false ); 4510 if (pcDepthMapGenerator->getPdmCandidate(this, uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, pacPdmMv, pDInfo, iPdm, bMerge)) 4511 return true; 4512 return false; 4513 } 4514 #endif 4248 4515 //! \} -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.h
r455 r476 434 434 435 435 #endif 436 437 #if H_3D_IV_MERGE 438 Bool getUnifiedMvPredCan ( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge ); 439 #endif 436 440 // ------------------------------------------------------------------------------------------------------------------- 437 441 // member functions for accessing partition information -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComMotionInfo.h
r455 r476 105 105 Int getHor () const { return m_acMv.getHor(); } 106 106 Int getVer () const { return m_acMv.getVer(); } 107 108 #if H_3D_IV_MERGE 109 Bool operator== ( const TComMvField& rcMv ) const 110 { 111 return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx()); 112 } 113 #endif 107 114 }; 108 115 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPic.h
r455 r476 141 141 Int getPOC() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC(); } 142 142 TComDataCU*& getCU( UInt uiCUAddr ) { return m_apcPicSym->getCU( uiCUAddr ); } 143 #if H_3D_IV_MERGE 144 TComSlice* getCurrSlice() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx); } 145 TComSPS* getSPS() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getSPS(); } 146 TComVPS* getVPS() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS(); } 147 #endif 143 148 144 149 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[0]; } -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPicYuv.cpp
r446 r476 77 77 m_iCuHeight = uiMaxCUHeight; 78 78 79 #if H_3D_IV_MERGE 80 m_iNumCuInWidth = m_iPicWidth / m_iCuWidth; 81 m_iNumCuInWidth += ( m_iPicWidth % m_iCuWidth ) ? 1 : 0; 82 83 m_iBaseUnitWidth = uiMaxCUWidth >> uiMaxCUDepth; 84 m_iBaseUnitHeight = uiMaxCUHeight >> uiMaxCUDepth; 85 #endif 86 79 87 Int numCuInWidth = m_iPicWidth / m_iCuWidth + (m_iPicWidth % m_iCuWidth != 0); 80 88 Int numCuInHeight = m_iPicHeight / m_iCuHeight + (m_iPicHeight % m_iCuHeight != 0); … … 325 333 326 334 #if H_3D 335 #if H_3D_IV_MERGE 336 Void 337 TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ) 338 { 339 Int iRastPartIdx = g_auiZscanToRaster[iAbsZorderIdx]; 340 Int iCuSizeInBases = m_iCuWidth / m_iBaseUnitWidth; 341 Int iCuX = iCuAddr % m_iNumCuInWidth; 342 Int iCuY = iCuAddr / m_iNumCuInWidth; 343 Int iBaseX = iRastPartIdx % iCuSizeInBases; 344 Int iBaseY = iRastPartIdx / iCuSizeInBases; 345 riX = iCuX * m_iCuWidth + iBaseX * m_iBaseUnitWidth; 346 riY = iCuY * m_iCuHeight + iBaseY * m_iBaseUnitHeight; 347 } 348 349 Void 350 TComPicYuv::getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ) 351 { 352 Int iCuX = iX / m_iCuWidth; 353 Int iCuY = iY / m_iCuHeight; 354 Int iBaseX = ( iX - iCuX * m_iCuWidth ) / m_iBaseUnitWidth; 355 Int iBaseY = ( iY - iCuY * m_iCuHeight ) / m_iBaseUnitHeight; 356 Int iCuSizeInBases = m_iCuWidth / m_iBaseUnitWidth; 357 riCuAddr = iCuY * m_iNumCuInWidth + iCuX; 358 Int iRastPartIdx = iBaseY * iCuSizeInBases + iBaseX; 359 riAbsZorderIdx = g_auiRasterToZscan[ iRastPartIdx ]; 360 } 361 #endif 327 362 Void TComPicYuv::setLumaTo( Pel pVal ) 328 363 { -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPicYuv.h
r446 r476 88 88 Bool m_bIsBorderExtended; 89 89 90 #if H_3D_IV_MERGE 91 Int m_iBaseUnitWidth; ///< Width of Base Unit (with maximum depth or minimum size, m_iCuWidth >> Max. Depth) 92 Int m_iBaseUnitHeight; ///< Height of Base Unit (with maximum depth or minimum size, m_iCuHeight >> Max. Depth) 93 Int m_iNumCuInWidth; 94 #endif 90 95 protected: 91 96 Void xExtendPicCompBorder (Pel* piTxt, Int iStride, Int iWidth, Int iHeight, Int iMarginX, Int iMarginY); … … 165 170 Void setLumaTo ( Pel pVal ); 166 171 Void setChromaTo ( Pel pVal ); 172 #if H_3D_IV_MERGE 173 // sample to block and block to sample conversion 174 Void getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ); 175 Void getCUAddrAndPartIdx( Int iX, Int iY, Int& riCuAddr, Int& riAbsZorderIdx ); 176 #endif 167 177 #endif 168 178 };// END CLASS DEFINITION TComPicYuv -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp
r446 r476 68 68 , m_iSliceQpDeltaCb ( 0 ) 69 69 , m_iSliceQpDeltaCr ( 0 ) 70 #if H_3D_IV_MERGE 71 , m_pcTexturePic ( NULL ) 72 #endif 70 73 , m_iDepth ( 0 ) 71 74 , m_bRefenced ( false ) … … 171 174 172 175 m_colRefIdx = 0; 176 #if H_3D_IV_MERGE 177 m_pcTexturePic = NULL; 178 #endif 173 179 initEqualRef(); 174 180 #if !L0034_COMBINED_LIST_CLEANUP … … 185 191 #endif 186 192 193 #if H_3D_IV_MERGE 194 m_maxNumMergeCand = MRG_MAX_NUM_CANDS_MEM; 195 #else 187 196 m_maxNumMergeCand = MRG_MAX_NUM_CANDS; 197 #endif 188 198 189 199 m_bFinalized=false; … … 1847 1857 } 1848 1858 } 1859 1860 #if H_3D_IV_MERGE 1861 Void 1862 TComSPS::setPredDepthMapGeneration( UInt uiViewIndex, Bool bIsDepth, UInt uiPdmGenMode, UInt uiPdmMvPredMode) 1863 { 1864 AOF( m_uiViewIndex == uiViewIndex ); 1865 AOF( m_bDepth == bIsDepth ); 1866 AOT( ( uiViewIndex == 0 || bIsDepth ) && uiPdmGenMode ); 1867 AOT( uiPdmMvPredMode && uiPdmGenMode == 0 ); 1868 1869 m_uiPredDepthMapGeneration = uiPdmGenMode; 1870 m_uiMultiviewMvPredMode = uiPdmMvPredMode; 1871 } 1872 #endif 1873 1849 1874 const Int TComSPS::m_winUnitX[]={1,2,2,1}; 1850 1875 const Int TComSPS::m_winUnitY[]={1,2,1,1}; … … 1913 1938 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1914 1939 1940 #if H_3D_IV_MERGE 1941 m_uiViewIndex = uiViewIndex; 1942 m_bDepth = false; 1943 #endif 1944 1915 1945 if( !m_bCamParInSliceHeader ) 1916 1946 { … … 1924 1954 } 1925 1955 } 1956 1957 #if H_3D_IV_MERGE 1958 Void 1959 TComSPS::initCamParaSPSDepth( UInt uiViewIndex) 1960 { 1961 m_uiCamParPrecision = 0; 1962 m_bCamParInSliceHeader = false; 1963 1964 ::memset( m_aaiCodedScale, 0x00, sizeof( m_aaiCodedScale ) ); 1965 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1966 1967 m_uiViewIndex = uiViewIndex; 1968 m_bDepth = true; 1969 } 1970 #endif 1926 1971 #endif 1927 1972 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h
r446 r476 53 53 #if H_MV 54 54 class TComPicLists; 55 #endif 56 57 #if H_3D_IV_MERGE 58 class TComDepthMapGenerator; 55 59 #endif 56 60 // ==================================================================================================================== … … 981 985 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 982 986 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; 987 #if H_3D_IV_MERGE 988 UInt m_uiMultiviewMvPredMode; 989 UInt m_uiPredDepthMapGeneration; 990 991 UInt m_uiViewIndex; 992 Bool m_bDepth; 993 TComDepthMapGenerator* m_pcDepthMapGenerator; 994 #endif 983 995 #endif 984 996 public: … … 1124 1136 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 1125 1137 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 1138 #if H_3D_IV_MERGE 1139 Void initCamParaSPSDepth ( UInt uiViewIndex); 1140 UInt getMultiviewMvPredMode () { return m_uiMultiviewMvPredMode; } 1141 UInt getPredDepthMapGeneration() { return m_uiPredDepthMapGeneration; } 1142 1143 UInt getViewIndex () { return m_uiViewIndex; } 1144 Bool isDepth () { return m_bDepth; } 1145 Void setDepthMapGenerator( TComDepthMapGenerator* pcDepthMapGenerator ) { m_pcDepthMapGenerator = pcDepthMapGenerator; } 1146 TComDepthMapGenerator* getDepthMapGenerator() { return m_pcDepthMapGenerator; } 1147 Void setPredDepthMapGeneration( UInt uiViewIndex, Bool bIsDepth, UInt uiPdmGenMode = 0, UInt uiPdmMvPredMode = 0); 1148 #endif 1126 1149 #endif 1127 1150 }; … … 1414 1437 #endif 1415 1438 Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; 1439 #if H_3D_IV_MERGE 1440 TComPic* m_pcTexturePic; 1441 #endif 1416 1442 Int m_iDepth; 1417 1443 … … 1544 1570 TComPic* getRefPic ( RefPicList e, Int iRefIdx) { return m_apcRefPicList[e][iRefIdx]; } 1545 1571 Int getRefPOC ( RefPicList e, Int iRefIdx) { return m_aiRefPOCList[e][iRefIdx]; } 1572 #if H_3D_IV_MERGE 1573 TComPic* getTexturePic () const { return m_pcTexturePic; } 1574 #endif 1546 1575 Int getDepth () { return m_iDepth; } 1547 1576 UInt getColFromL0Flag () { return m_colFromL0Flag; } … … 1594 1623 Void setRefPic ( TComPic* p, RefPicList e, Int iRefIdx ) { m_apcRefPicList[e][iRefIdx] = p; } 1595 1624 Void setRefPOC ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; } 1625 #if H_3D_IV_MERGE 1626 Void setTexturePic ( TComPic *pcTexturePic ) { m_pcTexturePic = pcTexturePic; } 1627 #endif 1596 1628 Void setNumRefIdx ( RefPicList e, Int i ) { m_aiNumRefIdx[e] = i; } 1597 1629 Void setPic ( TComPic* p ) { m_pcPic = p; } -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h
r456 r476 42 42 //! \{ 43 43 44 45 44 ///////////////////////////////////////////////////////////////////////////////////////// 46 45 ///////////////////////////////// EXTENSION SELECTION /////////////////////////////////// … … 89 88 // QC_CU_NBDV_D0181 90 89 // SEC_DEFAULT_DV_D0112 90 91 #define H_3D_IV_MERGE 1 // Inter-view motion merge candidate 92 // HHI_INTER_VIEW_MOTION_PRED 93 // SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction 94 // QC_MRG_CANS_B0048 , JCT3V-B0048, B0086, B0069 95 // OL_DISMV_POS_B0069 , different pos for disparity MV candidate, B0069 96 // MTK_INTERVIEW_MERGE_A0049 , second part 97 // QC_AMVP_MRG_UNIFY_IVCAN_C0051 98 // TEXTURE MERGING CANDIDATE , JCT3V-C0137 99 91 100 #endif 92 101 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.cpp
r446 r476 759 759 } 760 760 #endif // !H_MV 761 762 #if H_3D_IV_MERGE 763 READ_FLAG( uiCode, "base_view_flag" ); 764 if( uiCode ) 765 { // baseview SPS -> set standard values 766 pcSPS->initCamParaSPS ( 0 ); 767 pcSPS->setPredDepthMapGeneration( 0, false ); 768 } 769 else 770 { 771 READ_FLAG( uiCode, "depth_flag" ); 772 if( uiCode ) 773 { 774 READ_UVLC( uiCode, "view_idx" ); 775 pcSPS->initCamParaSPSDepth ( uiCode ); 776 pcSPS->setPredDepthMapGeneration( uiCode, true ); 777 } 778 else 779 { 780 UInt uiViewIndex; 781 READ_UVLC( uiViewIndex, "view_idx" ); uiViewIndex++; 782 UInt uiPredDepthMapGeneration = 0; 783 UInt uiMultiviewMvPredMode = 0; 784 785 READ_UVLC( uiPredDepthMapGeneration, "Pdm_generation" ); 786 if( uiPredDepthMapGeneration ) 787 { 788 READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" ); 789 } 790 791 pcSPS->setPredDepthMapGeneration( uiViewIndex, false, uiPredDepthMapGeneration, uiMultiviewMvPredMode); 792 793 } 794 } 795 #endif 761 796 } 762 797 } … … 1414 1449 { 1415 1450 READ_UVLC( uiCode, "five_minus_max_num_merge_cand"); 1451 #if H_3D_IV_MERGE 1452 rpcSlice->setMaxNumMergeCand(((rpcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) == PDM_USE_FOR_MERGE ? MRG_MAX_NUM_CANDS_MEM: MRG_MAX_NUM_CANDS) - uiCode); 1453 #else 1416 1454 rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode); 1455 #endif 1417 1456 } 1418 1457 -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCu.cpp
r455 r476 320 320 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 321 321 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 322 m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx); 323 #if H_3D_IV_MERGE 324 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 325 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; 326 #else 322 327 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists 323 328 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 329 #endif 324 330 Int numValidMergeCand = 0; 325 331 for( UInt ui = 0; ui < m_ppcCU[uiDepth]->getSlice()->getMaxNumMergeCand(); ++ui ) -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
r324 r476 156 156 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4; 157 157 158 #if H_3D_IV_MERGE 159 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 160 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; 161 #else 158 162 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists 159 163 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 164 #endif 160 165 161 166 for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ ) … … 168 173 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 169 174 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 175 #if H_3D_IV_MERGE 176 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 177 #endif 170 178 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 171 179 { -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.cpp
r455 r476 84 84 TComLoopFilter* pcLoopFilter, 85 85 TComSampleAdaptiveOffset* pcSAO 86 #if H_3D_IV_MERGE 87 ,TComDepthMapGenerator* pcDepthMapGenerator 88 #endif 86 89 ) 87 90 { … … 93 96 m_pcLoopFilter = pcLoopFilter; 94 97 m_pcSAO = pcSAO; 98 #if H_3D_IV_MERGE 99 m_pcDepthMapGenerator = pcDepthMapGenerator; 100 #endif 95 101 } 96 102 … … 152 158 m_LFCrossSliceBoundaryFlag.push_back( pcSlice->getLFCrossSliceBoundaryFlag()); 153 159 } 160 161 #if H_3D_IV_MERGE 162 if( uiStartCUAddr == 0 ) 163 { 164 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 165 } 166 #endif 167 154 168 #if H_3D_NBDV 155 169 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. -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.h
r324 r476 51 51 #include "TLibCommon/TComSampleAdaptiveOffset.h" 52 52 53 #if H_3D_IV_MERGE 54 #include "TLibCommon/TComDepthMapGenerator.h" 55 #endif 56 53 57 #include "TDecEntropy.h" 54 58 #include "TDecSlice.h" … … 79 83 TComLoopFilter* m_pcLoopFilter; 80 84 85 #if H_3D_IV_MERGE 86 TComDepthMapGenerator* m_pcDepthMapGenerator; 87 #endif 88 81 89 TComSampleAdaptiveOffset* m_pcSAO; 82 90 Double m_dDecTime; … … 98 106 TComLoopFilter* pcLoopFilter, 99 107 TComSampleAdaptiveOffset* pcSAO 108 #if H_3D_IV_MERGE 109 ,TComDepthMapGenerator* pcDepthMapGenerator 110 #endif 100 111 ); 101 112 Void create (); -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp
r446 r476 37 37 38 38 #include "NALread.h" 39 #if H_3D_IV_MERGE 40 #include "../../App/TAppDecoder/TAppDecTop.h" 41 #endif 39 42 #include "TDecTop.h" 40 43 … … 389 392 } 390 393 394 #if H_3D_IV_MERGE 395 Void TDecTop::init(TAppDecTop* pcTAppDecTop) 396 #else 391 397 Void TDecTop::init() 398 #endif 392 399 { 393 400 // initialize ROM … … 395 402 initROM(); 396 403 #endif 397 m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO); 404 m_cGopDecoder.init( &m_cEntropyDecoder, &m_cSbacDecoder, &m_cBinCABAC, &m_cCavlcDecoder, &m_cSliceDecoder, &m_cLoopFilter, &m_cSAO 405 #if H_3D_IV_MERGE 406 , &m_cDepthMapGenerator 407 #endif 408 ); 398 409 m_cSliceDecoder.init( &m_cEntropyDecoder, &m_cCuDecoder ); 399 410 m_cEntropyDecoder.init(&m_cPrediction); 411 412 #if H_3D_IV_MERGE 413 m_tAppDecTop = pcTAppDecTop; 414 m_cDepthMapGenerator.init( &m_cPrediction, m_tAppDecTop->getVPSAccess(), m_tAppDecTop->getSPSAccess(), m_tAppDecTop->getAUPicAccess() ); 415 #endif 400 416 } 401 417 … … 754 770 755 771 m_cSliceDecoder.create(); 772 #if H_3D_IV_MERGE 773 UInt uiPdm = ( m_apcSlicePilot->getSPS()->getViewIndex() ? m_apcSlicePilot->getSPS()->getPredDepthMapGeneration() : m_tAppDecTop->getSPSAccess()->getPdm() ); 774 m_cDepthMapGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(uiPdm), PDM_SUB_SAMP_EXP_Y(uiPdm) ); 775 TComDepthMapGenerator* pcDMG0 = m_tAppDecTop->getDecTop0()->getDepthMapGenerator(); 776 if( m_apcSlicePilot->getSPS()->getViewIndex() == 1 && ( pcDMG0->getSubSampExpX() != PDM_SUB_SAMP_EXP_X(uiPdm) || pcDMG0->getSubSampExpY() != PDM_SUB_SAMP_EXP_Y(uiPdm) ) ) 777 { 778 pcDMG0->create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(uiPdm), PDM_SUB_SAMP_EXP_Y(uiPdm) ); 779 } 780 #endif 756 781 } 757 782 else … … 893 918 #endif 894 919 920 #endif 921 922 #if H_3D_IV_MERGE 923 TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView( m_viewIndex, pcSlice->getPOC(), false ) : NULL; 924 assert( !m_isDepth || pcTexturePic != NULL ); 925 pcSlice->setTexturePic( pcTexturePic ); 895 926 #endif 896 927 // For generalized B -
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.h
r446 r476 45 45 #include "TLibCommon/TComTrQuant.h" 46 46 #include "TLibCommon/SEI.h" 47 #if H_3D_IV_MERGE 48 #include "TLibCommon/TComDepthMapGenerator.h" 49 #endif 47 50 48 51 #include "TDecGop.h" … … 222 225 Bool m_isDepth; 223 226 CamParsCollector* m_pcCamParsCollector; 227 #if H_3D_IV_MERGE 228 TComDepthMapGenerator m_cDepthMapGenerator; 229 TAppDecTop* m_tAppDecTop; 230 #endif 224 231 #endif 225 232 #endif … … 234 241 void setDecodedPictureHashSEIEnabled(Int enabled) { m_cGopDecoder.setDecodedPictureHashSEIEnabled(enabled); } 235 242 243 #if H_3D_IV_MERGE 244 Void init(TAppDecTop* pcTAppDecTop); 245 #else 236 246 Void init(); 247 #endif 237 248 #if H_MV 238 249 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer ); … … 265 276 Bool getIsDepth () { return m_isDepth; } 266 277 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 278 #if H_3D_IV_MERGE 279 TComDepthMapGenerator* getDepthMapGenerator () { return &m_cDepthMapGenerator; } 280 #endif 267 281 #endif 268 282 #endif -
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.