Changeset 28 in 3DVCSoftware for branches/0.3-poznan-univ/source/Lib/TLibDecoder
- Timestamp:
- 24 Feb 2012, 20:22:58 (13 years ago)
- Location:
- branches/0.3-poznan-univ/source/Lib/TLibDecoder
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.cpp
r5 r28 237 237 xReadFlag( uiCode ); pcSPS->setUseSAO ( uiCode ? true : false ); 238 238 #endif 239 239 #if POZNAN_DBMP 240 xReadFlag( uiCode ); 241 pcSPS->setDBMP ( uiCode ); 242 #endif 243 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 244 xReadFlag( uiCode ); 245 pcSPS->setUseCUSkip ( uiCode ); 246 #endif 240 247 xReadFlag( uiCode ); // SPS base view flag 241 248 if( uiCode ) … … 270 277 xReadFlag( uiCode ); 271 278 pcSPS->setUseMVI( uiCode ? true : false ); 279 #endif 280 #if POZNAN_NONLINEAR_DEPTH 281 #if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE 282 uiCode = 0; 283 xReadCode(8, uiCode); 284 pcSPS->setDepthPower(dequantizeDepthPower(uiCode)); 285 #else 286 uiCode = 0; 287 xReadCode(sizeof(float)*8, uiCode); // We do not send seign 288 //uiCode &= ~0x80000000; 289 pcSPS->setDepthPower(*((float*)&uiCode)); 290 #endif 291 printf("\nfDepthPower = %f", pcSPS->getDepthPower()); 272 292 #endif 273 293 } … … 325 345 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 326 346 #endif 347 #endif 348 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 349 xReadFlag( uiCode ); 350 pcSPS->setUseTexDqpAccordingToDepth( uiCode ? true : false ); 327 351 #endif 328 352 #if HHI_MPI … … 2621 2645 2622 2646 2623 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 2647 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP 2624 2648 Void 2625 2649 TDecCavlc::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) … … 2632 2656 uiNumCand++; 2633 2657 #endif 2658 #if POZNAN_DBMP 2659 UInt uiModIdx; 2660 const Bool bDBMPAvailable = pcCU->getSlice()->getMP()->isDBMPEnabled(); 2661 #endif 2634 2662 for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ ) 2635 2663 { … … 2656 2684 if( uiIdx > uiMviMergePos ) 2657 2685 { 2686 #if POZNAN_DBMP 2687 if(bDBMPAvailable) 2688 { 2689 if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND; 2690 else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--; 2691 else uiModIdx = uiIdx; 2692 } 2693 else uiModIdx = uiIdx; 2694 if( pcCU->getNeighbourCandIdx( uiModIdx-1, uiAbsPartIdx ) != uiModIdx ) 2695 { 2696 ruiMergeIndex++; 2697 } 2698 #else 2658 2699 if( pcCU->getNeighbourCandIdx( uiIdx - 1, uiAbsPartIdx ) != uiIdx ) 2659 2700 { 2660 2701 ruiMergeIndex++; 2661 2702 } 2703 #endif 2662 2704 } 2663 2705 else if( uiIdx < uiMviMergePos ) 2664 2706 #endif 2707 #if POZNAN_DBMP 2708 if(bDBMPAvailable) 2709 { 2710 if(uiIdx==POZNAN_DBMP_MERGE_POS) uiModIdx = POZNAN_DBMP_MRG_CAND; 2711 else if(uiIdx>POZNAN_DBMP_MERGE_POS) uiModIdx = uiIdx--; 2712 else uiModIdx = uiIdx; 2713 } 2714 else uiModIdx = uiIdx; 2715 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) != uiModIdx + 1 ) 2716 { 2717 ruiMergeIndex++; 2718 } 2719 #else 2665 2720 if( pcCU->getNeighbourCandIdx( uiIdx, uiAbsPartIdx ) != uiIdx + 1 ) 2666 2721 { 2667 2722 ruiMergeIndex++; 2668 2723 } 2724 #endif 2669 2725 } 2670 2726 #if HHI_MPI … … 2676 2732 { 2677 2733 pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth ); 2734 } 2735 #endif 2736 #if POZNAN_DBMP 2737 if(bDBMPAvailable) 2738 { 2739 if(ruiMergeIndex==POZNAN_DBMP_MERGE_POS) ruiMergeIndex = POZNAN_DBMP_MRG_CAND; 2740 else if(ruiMergeIndex>POZNAN_DBMP_MERGE_POS) ruiMergeIndex--; 2678 2741 } 2679 2742 #endif … … 2691 2754 Void TDecCavlc::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 2692 2755 { 2693 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 2756 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP 2694 2757 if( 2695 2758 #if HHI_INTER_VIEW_MOTION_PRED … … 2698 2761 #if HHI_MPI 2699 2762 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || 2763 #endif 2764 #if POZNAN_DBMP 2765 ( pcCU->getSlice()->getMP()->isDBMPEnabled() ) || 2700 2766 #endif 2701 2767 0 -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCAVLC.h
r5 r28 195 195 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 196 196 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 197 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 197 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP 198 198 Void parseMergeIndexMV ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 199 199 #endif -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.cpp
r5 r28 49 49 m_ppcYuvReco = NULL; 50 50 m_ppcYuvResPred = NULL; 51 #if POZNAN_AVAIL_MAP 52 m_ppcYuvAvail = NULL; 53 #endif 54 #if POZNAN_SYNTH_VIEW 55 m_ppcYuvSynth = NULL; 56 #endif 51 57 m_ppcCU = NULL; 52 58 } … … 75 81 m_ppcYuvReco = new TComYuv* [m_uiMaxDepth-1]; 76 82 m_ppcYuvResPred = new TComYuv* [m_uiMaxDepth-1]; 83 #if POZNAN_AVAIL_MAP 84 m_ppcYuvAvail = new TComYuv* [m_uiMaxDepth-1]; 85 #endif 86 #if POZNAN_SYNTH_VIEW 87 m_ppcYuvSynth = new TComYuv* [m_uiMaxDepth-1]; 88 #endif 77 89 m_ppcCU = new TComDataCU* [m_uiMaxDepth-1]; 78 90 … … 87 99 m_ppcYuvReco [ui] = new TComYuv; m_ppcYuvReco [ui]->create( uiWidth, uiHeight ); 88 100 m_ppcYuvResPred[ui] = new TComYuv; m_ppcYuvResPred[ui]->create( uiWidth, uiHeight ); 101 #if POZNAN_AVAIL_MAP 102 m_ppcYuvAvail [ui] = new TComYuv; m_ppcYuvAvail [ui]->create( uiWidth, uiHeight ); 103 #endif 104 #if POZNAN_SYNTH_VIEW 105 m_ppcYuvSynth [ui] = new TComYuv; m_ppcYuvSynth [ui]->create( uiWidth, uiHeight ); 106 #endif 107 89 108 m_ppcCU [ui] = new TComDataCU; m_ppcCU [ui]->create( uiNumPartitions, uiWidth, uiHeight, true ); 90 109 } … … 106 125 m_ppcYuvReco [ui]->destroy(); delete m_ppcYuvReco [ui]; m_ppcYuvReco [ui] = NULL; 107 126 m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL; 127 #if POZNAN_AVAIL_MAP 128 m_ppcYuvAvail [ui]->destroy(); delete m_ppcYuvAvail [ui]; m_ppcYuvAvail [ui] = NULL; 129 #endif 130 #if POZNAN_SYNTH_VIEW 131 m_ppcYuvSynth [ui]->destroy(); delete m_ppcYuvSynth [ui]; m_ppcYuvSynth [ui] = NULL; 132 #endif 108 133 m_ppcCU [ui]->destroy(); delete m_ppcCU [ui]; m_ppcCU [ui] = NULL; 109 134 } … … 112 137 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 113 138 delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL; 139 #if POZNAN_AVAIL_MAP 140 delete [] m_ppcYuvAvail; m_ppcYuvAvail = NULL; 141 #endif 142 #if POZNAN_SYNTH_VIEW 143 delete [] m_ppcYuvSynth; m_ppcYuvSynth = NULL; 144 #endif 145 114 146 delete [] m_ppcCU; m_ppcCU = NULL; 115 147 } … … 184 216 { 185 217 TComPic* pcPic = pcCU->getPic(); 218 219 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 220 Bool bWholeCUCanBeSynthesized = false; 221 Bool bOneSubCUCanNotBeSynthesied = false; 222 Bool bSubCUCanBeSynthesized[4]; 223 Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized; 224 pcPic->checkSynthesisAvailability(pcCU, pcCU->getAddr(), uiAbsPartIdx, uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH 225 Int iSubCUCanNotBeSynthesized = 0; 226 Int iSubCUCanBeSynthesizedCnt = 0; 227 for(Int i = 0; i < 4; i++) 228 { 229 if (!bSubCUCanBeSynthesized[i]) 230 { 231 iSubCUCanNotBeSynthesized = i; 232 } 233 else 234 { 235 iSubCUCanBeSynthesizedCnt ++; 236 } 237 } 238 if(iSubCUCanBeSynthesizedCnt == 4) 239 { 240 bWholeCUCanBeSynthesized = true; 241 } 242 else if(iSubCUCanBeSynthesizedCnt == 3) 243 { 244 bOneSubCUCanNotBeSynthesied = true; 245 } 246 247 if(bWholeCUCanBeSynthesized) 248 { 249 pcCU->setPredModeSubParts( MODE_SYNTH, uiAbsPartIdx, uiDepth ); 250 pcCU->setDepthSubParts( uiDepth, uiAbsPartIdx ); 251 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 252 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 253 //pcCU->setSizeSubParts( pcCU->getSlice()->getSPS()->getMaxCUWidth()>>uiDepth, pcCU->getSlice()->getSPS()->getMaxCUHeight()>>uiDepth, uiAbsPartIdx, uiDepth ); 254 return; 255 } 256 #endif 257 186 258 UInt uiCurNumParts = pcPic->getNumPartInCU() >> (uiDepth<<1); 187 259 UInt uiQNumParts = uiCurNumParts>>2; … … 195 267 if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) 196 268 { 269 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 270 if(bOneSubCUCanNotBeSynthesied && (uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth )) // Check if CU has 3 synthesied subCU - no split flag is send in that case and CU split is assumed 271 { 272 pcCU->setDepthSubParts( uiDepth + 1, uiAbsPartIdx ); 273 } 274 else 275 #endif 197 276 #if HHI_MPI 198 277 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) … … 367 446 { 368 447 TComPic* pcPic = pcCU->getPic(); 448 #if POZNAN_SYNTH_VIEW 449 if(pcPic->getPicYuvSynth()) m_ppcYuvSynth[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx ); 450 #endif 451 #if POZNAN_AVAIL_MAP 452 if(pcPic->getPicYuvAvail()) m_ppcYuvAvail[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx ); 453 #endif 369 454 370 455 Bool bBoundary = false; … … 411 496 xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 412 497 break; 498 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 499 case MODE_SYNTH: 500 // break; 501 #if POZNAN_FILL_OCCLUDED_CU_WITH_SYNTHESIS 502 m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), pcCU->getAddr(), uiAbsPartIdx); 503 #else 504 m_ppcYuvReco[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), pcCU->getAddr(), uiAbsPartIdx); //Poprawiæ 505 #endif 506 //m_ppcYuvReco[uiDepth]->clear(); 507 break; 508 #endif 413 509 default: 414 510 assert(0); … … 485 581 m_pcPrediction->predIntraLumaAng( pcPattern, pcCU->getLumaIntraDir(uiPartIdx), pPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); 486 582 583 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 584 m_pcTrQuant->setQPforQuant( pcCU->getQP(uiPartIdx) + pcCU->getQpOffsetForTextCU(uiPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 585 #else 487 586 m_pcTrQuant->setQPforQuant( pcCU->getQP(uiPartIdx), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 587 #endif 488 588 #if INTRA_DST_TYPE_7 489 589 m_pcTrQuant->invtransformNxN(TEXT_LUMA, pcCU->getLumaIntraDir(uiPartIdx), pResi, uiStride, pCoeff, uiWidth, uiHeight ); … … 682 782 } 683 783 //===== inverse transform ===== 784 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 785 m_pcTrQuant->setQPforQuant( pcCU->getQP(0) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 786 #else 684 787 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 788 #endif 685 789 #if INTRA_DST_TYPE_7 686 790 m_pcTrQuant->invtransformNxN( TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight ); … … 789 893 790 894 //===== inverse transform ===== 895 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 896 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText ); 897 #else 791 898 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), eText ); 899 #endif 792 900 #if INTRA_DST_TYPE_7 793 901 m_pcTrQuant->invtransformNxN( eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight ); … … 965 1073 piCoeff = pcCU->getCoeffY(); 966 1074 pResi = m_ppcYuvResi[uiDepth]->getLumaAddr(); 1075 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1076 Int QPoffset = pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false); 1077 m_pcTrQuant->setQPforQuant ( pcCU->getQP(uiAbsPartIdx) + QPoffset, !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 1078 #else 967 1079 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 1080 #endif 968 1081 m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, uiLumaTrMode, 0, piCoeff ); 969 1082 970 1083 // Cb and Cr 1084 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1085 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ) + QPoffset, !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 1086 #else 971 1087 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 1088 #endif 972 1089 973 1090 uiWidth >>= 1; -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecCu.h
r5 r28 61 61 TComYuv** m_ppcYuvReco; ///< array of prediction & reconstruction buffer 62 62 TComYuv** m_ppcYuvResPred; ///< residual prediction buffer 63 #if POZNAN_AVAIL_MAP 64 TComYuv** m_ppcYuvAvail; ///< array of available map buffer 65 #endif 66 #if POZNAN_SYNTH_VIEW 67 TComYuv** m_ppcYuvSynth; ///< array of synth buffer 68 #endif 63 69 TComDataCU** m_ppcCU; ///< CU data array 64 70 -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecEntropy.cpp
r5 r28 430 430 pcCU->setInterDirSubParts( puhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, uiPartIdx, uiDepth ); 431 431 432 #if POZNAN_DBMP_CALC_PRED_DATA 433 Int ref_idx0_DBMP,ref_idx1_DBMP; 434 TComMv cMv0_DBMP( 0, 0 ),cMv1_DBMP( 0, 0 ); 435 if(uiMergeIndex==POZNAN_DBMP_MRG_CAND) 436 { 437 pcCU->getCUMvField2nd( REF_PIC_LIST_0 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 438 pcCU->getCUMvField2nd( REF_PIC_LIST_1 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 439 pcCU->getSlice()->getMP()->calcDBMPPredData(pcCU, uiAbsPartIdx, ref_idx0_DBMP, cMv0_DBMP, ref_idx1_DBMP, cMv1_DBMP); 440 } 441 #endif 442 432 443 TComMv cTmpMv( 0, 0 ); 433 444 if ( pcCU->getSlice()->getNumRefIdx( REF_PIC_LIST_0 ) > 0 ) //if ( ref. frame list0 has at least 1 entry ) … … 436 447 pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_0, uiAbsPartIdx, uiPartIdx, uiDepth); 437 448 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvd( cTmpMv, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 449 #if POZNAN_DBMP_CALC_PRED_DATA 450 if(uiMergeIndex==POZNAN_DBMP_MRG_CAND) 451 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMv0_DBMP, ref_idx0_DBMP, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 452 else 453 #endif 438 454 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 439 455 … … 444 460 pcCU->setMVPNumSubParts( 0, REF_PIC_LIST_1, uiAbsPartIdx, uiPartIdx, uiDepth); 445 461 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvd( cTmpMv, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 462 #if POZNAN_DBMP_CALC_PRED_DATA 463 if(uiMergeIndex==POZNAN_DBMP_MRG_CAND) 464 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMv1_DBMP, ref_idx1_DBMP, eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 465 else 466 #endif 446 467 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getMv(), pcMvFieldNeighbours[ 2*uiMergeIndex + 1 ].getRefIdx(), eCUMode, uiAbsPartIdx, uiPartIdx, uiDepth ); 447 468 } -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecGop.cpp
r5 r28 199 199 #endif 200 200 201 #if POZNAN_MP 202 if( uiStartCUAddr == 0 ) 203 { 204 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 205 pcSlice->getMP()->setDepthMapGenerator(m_pcDepthMapGenerator); 206 #endif 207 pcSlice->getMP()->pairMultiview(rpcPic); 208 } 209 #endif 210 201 211 // decode slice 202 212 m_pcSliceDecoder->decompressSlice(pcBitstream, rpcPic); -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.cpp
r5 r28 579 579 580 580 581 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 581 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP 582 582 Void TDecSbac::parseMergeIndexMV( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 583 583 { … … 585 585 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 586 586 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : MRG_MAX_NUM_CANDS; 587 #endif 588 #if POZNAN_DBMP 589 const Bool bDBMPAvailable = pcCU->getSlice()->getMP()->isDBMPEnabled(); 590 Bool bDBMPModifyMergeIdx = true; 587 591 #endif 588 592 //--- set number of candidates and availability --- … … 611 615 } 612 616 } 617 618 #if POZNAN_DBMP 619 if(bDBMPAvailable) 620 { 621 UInt uiDBMPMergePos = POZNAN_DBMP_MERGE_POS; 622 #if HHI_MPI 623 if(bMVIAvailable && uiDBMPMergePos>=uiMviMergePos) uiDBMPMergePos++; 624 #endif 625 for( Int iIdx = MRG_MAX_NUM_CANDS-2; iIdx >= (Int)uiDBMPMergePos; iIdx-- ) 626 { 627 Int iWrIdx = iIdx+1; 628 #if HHI_MPI 629 if(bMVIAvailable) 630 { 631 if(iIdx==(Int)uiMviMergePos) continue; 632 if(iWrIdx==(Int)uiMviMergePos) iWrIdx++; 633 } 634 #endif 635 if(iWrIdx>=MRG_MAX_NUM_CANDS) continue; 636 637 abAvailable[ iWrIdx ] = abAvailable[ iIdx ]; 638 } 639 abAvailable[ uiDBMPMergePos ] = ( pcCU->getNeighbourCandIdx( POZNAN_DBMP_MRG_CAND, uiAbsPartIdx ) == POZNAN_DBMP_MRG_CAND + 1 ); 640 641 uiNumCand = 0; for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ ) if(abAvailable[ uiIdx ]) uiNumCand++; 642 } 643 #endif 644 613 645 AOF( uiNumCand > 1 ); 614 646 … … 665 697 { 666 698 pcCU->setTextureModeDepthSubParts( uiDepth, uiAbsPartIdx, uiDepth ); 699 #if POZNAN_DBMP 700 bDBMPModifyMergeIdx = false; 701 #endif 702 } 703 #endif 704 705 #if POZNAN_DBMP 706 if(bDBMPAvailable && bDBMPModifyMergeIdx) 707 { 708 if(ruiMergeIndex==POZNAN_DBMP_MERGE_POS) ruiMergeIndex = POZNAN_DBMP_MRG_CAND; 709 else if(ruiMergeIndex>POZNAN_DBMP_MERGE_POS) ruiMergeIndex--; 667 710 } 668 711 #endif … … 694 737 Void TDecSbac::parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ) 695 738 { 696 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 739 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP 697 740 if( 698 741 #if HHI_INTER_VIEW_MOTION_PRED … … 701 744 #if HHI_MPI 702 745 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || 746 #endif 747 #if POZNAN_DBMP 748 ( pcCU->getSlice()->getMP()->isDBMPEnabled() ) || 703 749 #endif 704 750 0 -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecSbac.h
r5 r28 144 144 Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); 145 145 Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 146 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 146 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_DBMP 147 147 Void parseMergeIndexMV ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth ); 148 148 #endif -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.cpp
r21 r28 53 53 m_aaiCodedScale [ uiId ] = new Int [ MAX_NUMBER_VIEWS ]; 54 54 } 55 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 56 xCreateLUTs ( (UInt)MAX_NUMBER_VIEWS, (UInt)MAX_NUMBER_VIEWS, m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 57 58 m_iLog2Precision = LOG2_DISP_PREC_LUT; 59 m_uiBitDepthForLUT = 8; //fixed 60 #endif 55 61 } 56 62 … … 66 72 delete [] m_aiViewOrderIndex; 67 73 delete [] m_aiViewReceived; 74 75 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 76 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS, 2 ); 77 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUMBER_VIEWS, MAX_NUMBER_VIEWS, 2 ); 78 #endif 68 79 } 69 80 … … 78 89 m_iLastPOC = -1; 79 90 m_uiMaxViewId = 0; 80 } 91 #if POZNAN_NONLINEAR_DEPTH 92 m_fDepthPower = 1.0; 93 #endif 94 } 95 96 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 97 Void 98 CamParsCollector::xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT) 99 { 100 //AOF( m_uiBitDepthForLUT == 8 ); 101 //AOF(radLUT == NULL && raiLUT == NULL ); 102 103 uiNumberSourceViews = Max( 1, uiNumberSourceViews ); 104 uiNumberTargetViews = Max( 1, uiNumberTargetViews ); 105 106 radLUT = new Double***[ uiNumberSourceViews ]; 107 raiLUT = new Int ***[ uiNumberSourceViews ]; 108 109 for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ ) 110 { 111 radLUT [ uiSourceView ] = new Double**[ uiNumberTargetViews ]; 112 raiLUT [ uiSourceView ] = new Int **[ uiNumberTargetViews ]; 113 114 for( UInt uiTargetView = 0; uiTargetView < uiNumberTargetViews; uiTargetView++ ) 115 { 116 radLUT [ uiSourceView ][ uiTargetView ] = new Double*[ 2 ]; 117 radLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ 257 ]; 118 radLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ 257 ]; 119 120 raiLUT [ uiSourceView ][ uiTargetView ] = new Int* [ 2 ]; 121 raiLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Int [ 257 ]; 122 raiLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Int [ 257 ]; 123 } 124 } 125 } 126 127 Void 128 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 129 { 130 Int iLog2DivLuma = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 131 Int iLog2DivChroma = iLog2DivLuma + 1; 132 133 iOffset <<= m_uiBitDepthForLUT; 134 135 Double dScale = (Double) iScale / (( Double ) ( 1 << iLog2DivLuma )); 136 Double dOffset = (Double) iOffset / (( Double ) ( 1 << iLog2DivLuma )); 137 138 // offsets including rounding offsets 139 Int64 iOffsetLuma = iOffset + ( ( 1 << iLog2DivLuma ) >> 1 ); 140 Int64 iOffsetChroma = iOffset + ( ( 1 << iLog2DivChroma ) >> 1 ); 141 142 #if POZNAN_NONLINEAR_DEPTH 143 TComNonlinearDepthBackward cNonlinearDepthBwd(m_fDepthPower, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0); 144 #endif 145 146 for( UInt uiDepthValue = 0; uiDepthValue < 256; uiDepthValue++ ) 147 { 148 Double dDepthValue = (Double)uiDepthValue; 149 Int64 iDepthValue = (Int64)uiDepthValue; 150 #if POZNAN_NONLINEAR_DEPTH 151 dDepthValue = cNonlinearDepthBwd(dDepthValue); 152 iDepthValue = (Int64)(dDepthValue+0.5); 153 #endif 154 #if POZNAN_LUT_INCREASED_PRECISION 155 dDepthValue /= (1<<g_uiBitIncrement); 156 #endif 157 158 // real-valued look-up tables 159 Double dShiftLuma = ( dDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision ); 160 Double dShiftChroma = dShiftLuma / 2; 161 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma; 162 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = dShiftChroma; 163 164 // integer-valued look-up tables 165 Int64 iTempScale = iDepthValue * iScale; 166 #if POZNAN_LUT_INCREASED_PRECISION 167 iTempScale >>= g_uiBitIncrement; 168 #endif 169 Int64 iTestScale = ( iTempScale + iOffset ); // for checking accuracy of camera parameters 170 Int64 iShiftLuma = ( iTempScale + iOffsetLuma ) >> iLog2DivLuma; 171 Int64 iShiftChroma = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma; 172 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = (Int)iShiftLuma; 173 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ uiDepthValue ] = (Int)iShiftChroma; 174 175 // maximum deviation 176 //dMaxDispDev = Max( dMaxDispDev, fabs( Double( (Int) iTestScale ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) ); 177 //dMaxRndDispDvL = Max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma ) - dShiftLuma ) ); 178 //dMaxRndDispDvC = Max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) ); 179 } 180 181 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ]; 182 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ]; 183 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255 ]; 184 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255 ]; 185 } 186 187 Bool 188 CamParsCollector::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft) 189 { 190 /* 191 riNearestViewIdx = 0; 192 193 Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] ); 194 Int iFactor = ( bDecencdingVN ? -1 : 1 ); 195 196 if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor <= 0 ) 197 { 198 rbRenderFromLeft = true; 199 } 200 else 201 { 202 rbRenderFromLeft = false; 203 } 204 205 riRelDistToLeft = 128; //Not used for now; 206 //*/ 207 return true; 208 } 209 210 #endif 81 211 82 212 Void … … 102 232 if ( pcSlice->getSPS()->isDepth () ) 103 233 { 234 #if POZNAN_NONLINEAR_DEPTH 235 m_fDepthPower = pcSlice->getSPS()->getDepthPower(); 236 #endif 104 237 return; 238 } 239 else 240 { 241 #if POZNAN_NONLINEAR_DEPTH 242 pcSlice->getSPS()->setDepthPower(m_fDepthPower); // OLGIERD: ToDo - QP-Tex should not use getDepthPower() from texture SPS. 243 #endif 105 244 } 106 245 Bool bFirstAU = ( pcSlice->getPOC() == 0 ); … … 161 300 m_aaiCodedScale [ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedScale () [ uiBaseId ]; 162 301 m_aaiCodedOffset[ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedOffset() [ uiBaseId ]; 302 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 303 xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT); 304 xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT); 305 #endif 163 306 } 164 307 else … … 168 311 m_aaiCodedScale [ uiViewId ][ uiBaseId ] = pcSlice->getSPS()->getInvCodedScale () [ uiBaseId ]; 169 312 m_aaiCodedOffset[ uiViewId ][ uiBaseId ] = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseId ]; 313 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 314 xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT); 315 xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT); 316 #endif 170 317 } 171 318 } … … 182 329 m_aaiCodedScale [ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedScale () [ uiBaseId ]; 183 330 m_aaiCodedOffset[ uiViewId ][ uiBaseId ] = pcSlice->getInvCodedOffset() [ uiBaseId ]; 331 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 332 xInitLUTs(uiBaseId,uiViewId,m_aaiCodedScale [ uiBaseId ][ uiViewId ],m_aaiCodedOffset[ uiBaseId ][ uiViewId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT); 333 xInitLUTs(uiViewId,uiBaseId,m_aaiCodedScale [ uiViewId ][ uiBaseId ],m_aaiCodedOffset[ uiViewId ][ uiBaseId ],m_adBaseViewShiftLUT,m_aiBaseViewShiftLUT); 334 #endif 184 335 } 185 336 } … … 269 420 m_bFirstSliceInSequence = true; 270 421 m_pcCamParsCollector = 0; 422 #if POZNAN_MP 423 m_pcMP = NULL; 424 #endif 271 425 } 272 426 … … 299 453 #if HHI_INTER_VIEW_RESIDUAL_PRED 300 454 m_cResidualGenerator.destroy(); 455 #endif 456 457 #if POZNAN_MP 458 m_pcMP = NULL; 301 459 #endif 302 460 } … … 336 494 m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator ); 337 495 #endif 496 497 #if POZNAN_MP 498 m_pcMP = pcTAppDecTop->getMP(); 499 #endif 338 500 } 339 501 … … 462 624 #if HHI_INTERVIEW_SKIP 463 625 pcPic->removeUsedPelsMapBuffer(); 626 #endif 627 #if POZNAN_AVAIL_MAP 628 pcPic->removeAvailabilityBuffer(); 629 #endif 630 #if POZNAN_SYNTH_VIEW 631 pcPic->removeSynthesisBuffer(); 632 #endif 633 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 634 pcPic->removeSynthesisDepthBuffer(); 464 635 #endif 465 636 } … … 549 720 else 550 721 { 722 #if POZNAN_NONLINEAR_DEPTH 723 // For texture complete depth power information. Depth power is sended, for example, for base view depth map and it should be available prior non-base texture decoding 724 if(!cTempSPS.isDepth() && cTempSPS.getViewId()) 725 { 726 Float fDepthPower = getDecTop()->getPicFromView( 0, pcPic->getPOC(), true )->getSPS()->getDepthPower(); 727 cTempSPS.setDepthPower(fDepthPower); 728 } 729 #endif 551 730 cComSPS = cTempSPS; 552 731 return false; … … 563 742 } 564 743 m_uiValidPS |= 1; 744 745 #if POZNAN_MP 746 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 747 m_pcMP->init( m_cSPS.getHeight(), m_cSPS.getWidth() ); 748 #else 749 m_pcMP->init( m_cSPS.getHeight(), m_cSPS.getWidth(), m_pcCamParsCollector->getBaseViewShiftLUTI()); 750 #endif 751 #endif 565 752 566 753 return false; … … 686 873 m_apcSlicePilot = pcPic->getPicSym()->getSlice(m_uiSliceIdx); 687 874 pcPic->getPicSym()->setSlice(pcSlice, m_uiSliceIdx); 875 876 #if POZNAN_MP 877 pcSlice->setMP(m_pcMP); 878 #endif 688 879 689 880 if (bNextSlice) … … 744 935 #endif 745 936 937 #if POZNAN_SYNTH 938 if( m_pcCamParsCollector) 939 { 940 m_pcCamParsCollector->setSlice( pcSlice ); 941 } 942 //if(!getIsDepth()) 943 if(pcSlice->getSPS()->getUseCUSkip()) 944 { 945 getDecTop()->storeSynthPicsInBuffer(pcSlice->getViewIdx(),pcSlice->getSPS()->getViewOrderIdx(),pcSlice->getPOC(),getIsDepth()); 946 } 947 #endif 948 949 //* 950 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 951 if(!getIsDepth() && pcSlice->getSPS()->getUseTexDqpAccordingToDepth()) 952 { 953 getDecTop()->storeDepthSynthPicsInBuffer(pcSlice->getViewIdx(),pcSlice->getSPS()->getViewOrderIdx(),pcSlice->getPOC()); 954 } 955 #endif 956 //*/ 957 958 #if POZNAN_MP 959 std::vector<TComPic*> apcSpatDataRefPics = getDecTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_cSPS.isDepth() ); 960 pcSlice->getMP()->setRefPicsList(&apcSpatDataRefPics); 961 #if !POZNAN_MP_USE_DEPTH_MAP_GENERATION 962 std::vector<TComPic*> apcSpatDepthRefPics = getDecTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), true ); 963 pcSlice->getMP()->setDepthRefPicsList(&apcSpatDepthRefPics); 964 #endif 965 #endif 966 746 967 // Decode a picture 747 968 m_cGopDecoder.decompressGop ( bEos, pcBitstream, pcPic, false ); 969 970 #if POZNAN_MP 971 //pcSlice->getMP()->disable(); 972 #endif 748 973 749 974 if( m_pcCamParsCollector ) -
branches/0.3-poznan-univ/source/Lib/TLibDecoder/TDecTop.h
r21 r28 55 55 #include "TDecCAVLC.h" 56 56 57 #if POZNAN_MP 58 #include "../TLibCommon/TComMP.h" 59 #endif 60 57 61 // ==================================================================================================================== 58 62 // Class definition … … 71 75 Void uninit (); 72 76 Void setSlice ( TComSlice* pcSlice ); 77 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 78 Double**** getBaseViewShiftLUTD () { return m_adBaseViewShiftLUT; } 79 Int**** getBaseViewShiftLUTI () { return m_aiBaseViewShiftLUT; } 80 81 Int** getBaseViewOffsetI () { return m_aaiCodedOffset; } 82 Int** getBaseViewScaleI () { return m_aaiCodedScale; } 83 84 Bool getNearestBaseView ( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft); 85 #endif 73 86 74 87 private: … … 89 102 Int m_iLastPOC; 90 103 UInt m_uiMaxViewId; 104 105 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 106 107 UInt m_uiBitDepthForLUT; 108 UInt m_iLog2Precision; 109 UInt m_uiInputBitDepth; 110 111 // look-up tables 112 Double**** m_adBaseViewShiftLUT; ///< Disparity LUT 113 Int**** m_aiBaseViewShiftLUT; ///< Disparity LUT 114 115 Void xCreateLUTs( UInt uiNumberSourceViews, UInt uiNumberTargetViews, Double****& radLUT, Int****& raiLUT); 116 Void xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT); 117 118 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 ); 119 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize1, UInt uiSize2 ); 120 template<class T> Void xDeleteArray ( T*& rpt, UInt uiSize ); 121 #endif 122 #if POZNAN_NONLINEAR_DEPTH 123 Float m_fDepthPower; 124 #endif 125 126 91 127 }; 128 129 #if POZNAN_SYNTH || (POZNAN_MP && !POZNAN_MP_USE_DEPTH_MAP_GENERATION) 130 template <class T> 131 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2, UInt uiSize3 ) 132 { 133 if( rpt ) 134 { 135 for( UInt uiK = 0; uiK < uiSize1; uiK++ ) 136 { 137 for( UInt uiL = 0; uiL < uiSize2; uiL++ ) 138 { 139 for( UInt uiM = 0; uiM < uiSize3; uiM++ ) 140 { 141 delete[] rpt[ uiK ][ uiL ][ uiM ]; 142 } 143 delete[] rpt[ uiK ][ uiL ]; 144 } 145 delete[] rpt[ uiK ]; 146 } 147 delete[] rpt; 148 } 149 rpt = NULL; 150 }; 151 152 153 template <class T> 154 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize1, UInt uiSize2 ) 155 { 156 if( rpt ) 157 { 158 for( UInt uiK = 0; uiK < uiSize1; uiK++ ) 159 { 160 for( UInt uiL = 0; uiL < uiSize2; uiL++ ) 161 { 162 delete[] rpt[ uiK ][ uiL ]; 163 } 164 delete[] rpt[ uiK ]; 165 } 166 delete[] rpt; 167 } 168 rpt = NULL; 169 }; 170 171 172 template <class T> 173 Void CamParsCollector::xDeleteArray( T*& rpt, UInt uiSize ) 174 { 175 if( rpt ) 176 { 177 for( UInt uiK = 0; uiK < uiSize; uiK++ ) 178 { 179 delete[] rpt[ uiK ]; 180 } 181 delete[] rpt; 182 } 183 rpt = NULL; 184 }; 185 #endif 92 186 93 187 … … 138 232 #endif 139 233 234 #if POZNAN_MP 235 TComMP* m_pcMP; 236 #endif 237 140 238 Bool m_bIsDepth; 141 239 Int m_iViewIdx;
Note: See TracChangeset for help on using the changeset viewer.