Changeset 476 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon
- Timestamp:
- 18 Jun 2013, 05:16:27 (12 years ago)
- Location:
- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset for help on using the changeset viewer.