Changeset 12 in 3DVCSoftware for branches/0.2-poznan-univ/source/Lib/TLibEncoder
- Timestamp:
- 6 Feb 2012, 00:52:17 (13 years ago)
- Location:
- branches/0.2-poznan-univ/source/Lib/TLibEncoder
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.cpp
r11 r12 341 341 xWriteFlag( pcSPS->getUseMVI() ? 1 : 0 ); 342 342 #endif 343 #if POZNAN_NONLINEAR_DEPTH 344 // Depth power coefficient 345 #if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE 346 UInt uiCode = quantizeDepthPower(pcSPS->getDepthPower()); 347 xWriteCode(uiCode, 8); 348 #else 349 float fCode = pcSPS->getDepthPower(); 350 UInt uiCode = *((UInt*)&fCode); 351 //uiCode &= ~0x80000000; 352 xWriteCode(uiCode, sizeof(float)*8); // we do not send sign?; 353 #endif 354 #endif 343 355 } 344 356 else … … 353 365 for( UInt uiId = 0; uiId < pcSPS->getViewId(); uiId++ ) 354 366 { 355 //printf("From ViewID %d To ViewID: %d\n",pcSPS->getViewId(),uiId); 356 xWriteSvlc( pcSPS->getCodedScale ()[ uiId ] ); //printf("SPS Scale: %d\n",pcSPS->getCodedScale ()[ uiId ]); 357 xWriteSvlc( pcSPS->getCodedOffset ()[ uiId ] ); //printf("SPS Offset: %d\n", pcSPS->getCodedOffset ()[ uiId ]); 367 xWriteSvlc( pcSPS->getCodedScale ()[ uiId ] ); 368 xWriteSvlc( pcSPS->getCodedOffset ()[ uiId ] ); 358 369 xWriteSvlc( pcSPS->getInvCodedScale ()[ uiId ] + pcSPS->getCodedScale ()[ uiId ] ); 359 370 xWriteSvlc( pcSPS->getInvCodedOffset()[ uiId ] + pcSPS->getCodedOffset()[ uiId ] ); … … 532 543 for( UInt uiId = 0; uiId < pcSlice->getSPS()->getViewId(); uiId++ ) 533 544 { 534 printf("From ViewID %d To ViewID: %d\n",pcSlice->getSPS()->getViewId(),uiId); 535 xWriteSvlc( pcSlice->getCodedScale ()[ uiId ] ); printf("Slice Scale: %d\n",pcSlice->getCodedScale ()[ uiId ]); 536 xWriteSvlc( pcSlice->getCodedOffset ()[ uiId ] ); printf("Slice Offset: %d\n", pcSlice->getCodedOffset ()[ uiId ]); 545 xWriteSvlc( pcSlice->getCodedScale ()[ uiId ] ); 546 xWriteSvlc( pcSlice->getCodedOffset ()[ uiId ] ); 537 547 xWriteSvlc( pcSlice->getInvCodedScale ()[ uiId ] + pcSlice->getCodedScale ()[ uiId ] ); 538 548 xWriteSvlc( pcSlice->getInvCodedOffset()[ uiId ] + pcSlice->getCodedOffset()[ uiId ] ); … … 729 739 730 740 731 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 741 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_EIVD 732 742 Void 733 743 TEncCavlc::codeMergeIndexMV( TComDataCU* pcCU, UInt uiAbsPartIdx ) … … 735 745 UInt uiNumCand = 0; 736 746 UInt uiMergeIdx = pcCU->getMergeIndex( uiAbsPartIdx ); 747 748 #if POZNAN_EIVD 749 UInt uiModIdx; 750 const Bool bEIVDAvailable = pcCU->getSlice()->getMP()->isEIVDEnabled(); 751 if(bEIVDAvailable) 752 { 753 if(uiMergeIdx==POZNAN_EIVD_MRG_CAND) uiMergeIdx = POZNAN_EIVD_MERGE_POS; 754 else if(uiMergeIdx>=POZNAN_EIVD_MERGE_POS) uiMergeIdx++; 755 } 756 #endif 737 757 #if HHI_MPI 738 758 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; … … 752 772 if( uiIdx < uiMviMergePos ) 753 773 { 774 #if POZNAN_EIVD 775 if(bEIVDAvailable) 776 { 777 if(uiIdx==POZNAN_EIVD_MERGE_POS) uiModIdx = POZNAN_EIVD_MRG_CAND; 778 else if(uiIdx>POZNAN_EIVD_MERGE_POS) uiModIdx = uiIdx--; 779 else uiModIdx = uiIdx; 780 } 781 else uiModIdx = uiIdx; 782 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) == uiModIdx + 1 ) 783 { 784 uiNumCand++; 785 } 786 else if( uiIdx < uiMergeIdx ) 787 { 788 uiUnaryIdx--; 789 } 790 #else 754 791 if( pcCU->getNeighbourCandIdx( uiIdx, uiAbsPartIdx ) == uiIdx + 1 ) 755 792 { … … 760 797 uiUnaryIdx--; 761 798 } 799 #endif 762 800 } 763 801 else if( uiIdx > uiMviMergePos ) 764 802 { 803 #if POZNAN_EIVD 804 if(bEIVDAvailable) 805 { 806 if(uiIdx==POZNAN_EIVD_MERGE_POS) uiModIdx = POZNAN_EIVD_MRG_CAND; 807 else if(uiIdx>POZNAN_EIVD_MERGE_POS) uiModIdx = uiIdx--; 808 else uiModIdx = uiIdx; 809 } 810 else uiModIdx = uiIdx; 811 if( pcCU->getNeighbourCandIdx( uiModIdx-1, uiAbsPartIdx ) == uiModIdx ) 812 { 813 uiNumCand++; 814 } 815 else if( uiIdx < uiMergeIdx ) 816 { 817 uiUnaryIdx--; 818 } 819 #else 765 820 if( pcCU->getNeighbourCandIdx( uiIdx - 1, uiAbsPartIdx ) == uiIdx ) 766 821 { … … 771 826 uiUnaryIdx--; 772 827 } 828 #endif 773 829 } 774 830 } … … 777 833 for( UInt uiIdx = 0; uiIdx < MRG_MAX_NUM_CANDS; uiIdx++ ) 778 834 { 835 #if POZNAN_EIVD 836 if(bEIVDAvailable) 837 { 838 if(uiIdx==POZNAN_EIVD_MERGE_POS) uiModIdx = POZNAN_EIVD_MRG_CAND; 839 else if(uiIdx>POZNAN_EIVD_MERGE_POS) uiModIdx = uiIdx--; 840 else uiModIdx = uiIdx; 841 } 842 else uiModIdx = uiIdx; 843 if( pcCU->getNeighbourCandIdx( uiModIdx, uiAbsPartIdx ) == uiModIdx + 1 ) 844 { 845 uiNumCand++; 846 } 847 else if( uiIdx < uiMergeIdx ) 848 { 849 uiUnaryIdx--; 850 } 851 #else 779 852 if( pcCU->getNeighbourCandIdx( uiIdx, uiAbsPartIdx ) == uiIdx + 1 ) 780 853 { … … 785 858 uiUnaryIdx--; 786 859 } 860 #endif 787 861 } 788 862 #endif … … 808 882 Void TEncCavlc::codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 809 883 { 810 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 811 #if HHI_INTER_VIEW_MOTION_PRED && HHI_MPI 812 if( ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 813 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) ) 814 #elif HHI_MPI 815 if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 816 #else 817 if( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) 818 #endif 884 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_EIVD 885 if( 886 #if HHI_INTER_VIEW_MOTION_PRED 887 ( pcCU->getSlice()->getSPS()->getViewId() > 0 && ( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ) || 888 #endif 889 #if HHI_MPI 890 ( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || 891 #endif 892 #if POZNAN_EIVD 893 ( pcCU->getSlice()->getMP()->isEIVDEnabled() ) || 894 #endif 895 0 896 ) 819 897 { 820 898 codeMergeIndexMV( pcCU, uiAbsPartIdx ); -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCavlc.h
r5 r12 228 228 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 229 229 Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 230 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 230 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_EIVD 231 231 Void codeMergeIndexMV ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 232 232 #endif -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCfg.h
r5 r12 217 217 #endif 218 218 219 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 220 Double m_dTextureCuDeltaQpOffset; 221 Double m_dTextureCuDeltaQpMul; 222 Int m_iTextureCuDeltaQpTopBottomRow; 223 #endif 224 #if POZNAN_NONLINEAR_DEPTH 225 Float m_fDepthPower; 226 #endif 227 219 228 public: 220 229 TEncCfg() {} … … 226 235 Void setSourceHeight ( Int i ) { m_iSourceHeight = i; } 227 236 Void setFrameToBeEncoded ( Int i ) { m_iFrameToBeEncoded = i; } 237 238 #if POZNAN_STAT_JK 239 FILE* m_pcStatFile; 240 Void setStatFile(FILE* a) {m_pcStatFile = a;} 241 #endif 228 242 229 243 //====== Coding Structure ======== … … 306 320 Void setAllowNegDist ( Bool b ) { m_bAllowNegDist = b; }; 307 321 #endif 322 #endif 323 324 #if POZNAN_NONLINEAR_DEPTH 325 inline Float getDepthPower() { return m_fDepthPower; } 326 inline Void setDepthPower(Float p) { m_fDepthPower = p; } 327 #else 328 inline Float getDepthPower() { return 1.0f; } 308 329 #endif 309 330 -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.cpp
r11 r12 67 67 m_ppcOrigYuv = new TComYuv*[m_uhTotalDepth-1]; 68 68 m_ppcResPredTmp = new TComYuv*[m_uhTotalDepth-1]; 69 #if POZNAN_ AVAIL_MAP69 #if POZNAN_CU_SKIP 70 70 m_ppcAvailYuv = new TComYuv*[m_uhTotalDepth-1]; 71 71 #endif 72 #if POZNAN_ SYNTH_VIEW72 #if POZNAN_CU_SYNTH 73 73 m_ppcSynthYuv = new TComYuv*[m_uhTotalDepth-1]; 74 74 #endif … … 100 100 m_ppcOrigYuv [i] = new TComYuv; m_ppcOrigYuv [i]->create(uiWidth, uiHeight); 101 101 102 #if POZNAN_ AVAIL_MAP102 #if POZNAN_CU_SKIP 103 103 m_ppcAvailYuv [i] = new TComYuv; m_ppcAvailYuv [i]->create(uiWidth, uiHeight); 104 104 #endif 105 #if POZNAN_ SYNTH_VIEW105 #if POZNAN_CU_SYNTH 106 106 m_ppcSynthYuv [i] = new TComYuv; m_ppcSynthYuv [i]->create(uiWidth, uiHeight); 107 107 #endif … … 165 165 if(m_ppcOrigYuv[i]) 166 166 { 167 m_ppcOrigYuv[i]->destroy(); delete m_ppcOrigYuv[i]; m_ppcOrigYuv[i] 168 } 169 #if POZNAN_ AVAIL_MAP167 m_ppcOrigYuv[i]->destroy(); delete m_ppcOrigYuv[i]; m_ppcOrigYuv[i] = NULL; 168 } 169 #if POZNAN_CU_SKIP 170 170 if(m_ppcAvailYuv[i]) 171 171 { 172 m_ppcAvailYuv[i]->destroy(); delete m_ppcAvailYuv[i]; m_ppcAvailYuv[i]= NULL;173 } 174 #endif 175 #if POZNAN_ SYNTH_VIEW172 m_ppcAvailYuv[i]->destroy(); delete m_ppcAvailYuv[i]; m_ppcAvailYuv[i] = NULL; 173 } 174 #endif 175 #if POZNAN_CU_SYNTH 176 176 if(m_ppcSynthYuv[i]) 177 177 { 178 m_ppcSynthYuv[i]->destroy(); delete m_ppcSynthYuv[i]; m_ppcSynthYuv[i]= NULL;178 m_ppcSynthYuv[i]->destroy(); delete m_ppcSynthYuv[i]; m_ppcSynthYuv[i] = NULL; 179 179 } 180 180 #endif … … 230 230 m_ppcOrigYuv = NULL; 231 231 } 232 #if POZNAN_ AVAIL_MAP232 #if POZNAN_CU_SKIP 233 233 if(m_ppcAvailYuv) 234 234 { … … 237 237 } 238 238 #endif 239 #if POZNAN_ SYNTH_VIEW239 #if POZNAN_CU_SYNTH 240 240 if(m_ppcSynthYuv) 241 241 { … … 395 395 } 396 396 } 397 398 #if POZNAN_EIVD & !POZNAN_EIVD_COMPRESS_ME_DATA 399 //save motion data for every CU point 400 xSaveEIVDData(m_ppcBestCU[0]); 401 #endif 402 397 403 } 398 404 … … 467 473 // get Original YUV data from picture 468 474 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 469 #if POZNAN_ AVAIL_MAP475 #if POZNAN_CU_SKIP 470 476 if (pcPic->getPicYuvAvail()) m_ppcAvailYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 471 477 #endif 472 #if POZNAN_ SYNTH_VIEW478 #if POZNAN_CU_SYNTH 473 479 if (pcPic->getPicYuvSynth()) m_ppcSynthYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvSynth(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 474 480 #endif 475 481 476 #if POZNAN_ ENCODE_ONLY_DISOCCLUDED_CU482 #if POZNAN_CU_SKIP 477 483 Bool bWholeCUCanBeSynthesized = false; 478 484 Bool bOneSubCUCanNotBeSynthesied = false; … … 569 575 { 570 576 // do CU Skip 571 #if POZNAN_ ENCODE_ONLY_DISOCCLUDED_CU577 #if POZNAN_CU_SKIP 572 578 if(bWholeCUCanBeSynthesized) 573 579 { 580 // printf("CUSkip %d %d %d\n",rpcBestCU->getCUPelX(),rpcBestCU->getCUPelY(),rpcBestCU->getWidth()); 574 581 rpcBestCU->getTotalCost() = 0; // Cost of synthesised CU is zero 575 582 rpcBestCU->getTotalBits() = 0; // Cost of synthesised CU is zero … … 577 584 rpcBestCU->setPredModeSubParts( MODE_SYNTH, 0, uiDepth ); 578 585 rpcBestCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 579 #if POZNAN_ FILL_OCCLUDED_CU_WITH_SYNTHESIS586 #if POZNAN_CU_SYNTH 580 587 m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvSynth(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure 581 #else 582 m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure 588 //m_ppcRecoYuvBest[uiDepth]->copyFromPicYuv(pcPic->getPicYuvAvail(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU()); // First copy synthesis YUV part to CU encoder reconstruction YUV structure 583 589 #endif 584 590 UInt uiInitTrDepth = rpcBestCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1; … … 1065 1071 TComPic* pcPic = pcCU->getPic(); 1066 1072 1067 #if POZNAN_ ENCODE_ONLY_DISOCCLUDED_CU1073 #if POZNAN_CU_SKIP 1068 1074 if( pcCU->isCUSkiped( uiAbsPartIdx ) && uiDepth == pcCU->getDepth( uiAbsPartIdx )) //If CU Skiped no information is coded into stream 1069 1075 return; … … 1076 1082 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 1077 1083 1078 #if POZNAN_ ENCODE_ONLY_DISOCCLUDED_CU1084 #if POZNAN_CU_SKIP 1079 1085 Bool bDontSendSplitFlag = false; 1080 1086 if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < (g_uiMaxCUDepth-g_uiAddCUDepth) ) ) || bBoundary ) //check if CU has 3 synthesied subCU - no split flag is send in that case … … 1099 1105 if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) 1100 1106 { 1101 #if POZNAN_ ENCODE_ONLY_DISOCCLUDED_CU1107 #if POZNAN_CU_SKIP 1102 1108 if(!bDontSendSplitFlag) 1103 1109 #endif … … 1141 1147 #endif 1142 1148 xRestoreDepthWidthHeight( pcCU ); 1149 1150 #if POZNAN_STAT_JK 1151 if(m_bStatFileEnabled) xStatFile(pcCU, uiAbsPartIdx, uiDepth); 1152 #endif 1153 1143 1154 return; 1144 1155 } … … 1167 1178 return; 1168 1179 } 1180 1181 #if POZNAN_STAT_JK 1182 if(m_bStatFileEnabled) xStatFile(pcCU, uiAbsPartIdx, uiDepth); 1183 #endif 1169 1184 1170 1185 #if TSB_ALF_HEADER … … 1277 1292 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 1278 1293 UInt uiNeighbourCandIdx[MRG_MAX_NUM_CANDS]; //MVs with same idx => same cand 1294 #if POZNAN_EIVD_CALC_PRED_DATA 1295 TComMP* pcMP = rpcTempCU->getSlice()->getMP(); 1296 #endif 1279 1297 1280 1298 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1333 1351 rpcTempCU->setNeighbourCandIdxSubParts( uiInner, uiNeighbourCandIdx[uiInner], 0, 0,uhDepth ); 1334 1352 } 1353 #if POZNAN_EIVD_CALC_PRED_DATA 1354 if(uiMergeCand==POZNAN_EIVD_MRG_CAND) 1355 { 1356 rpcTempCU->getCUMvField2nd( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[0 + 2*uiMergeCand].getRefIdx(), SIZE_2Nx2N, 0, 0, 0 ); // interprets depth relative to rpcTempCU level 1357 rpcTempCU->getCUMvField2nd( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[1 + 2*uiMergeCand].getRefIdx(), SIZE_2Nx2N, 0, 0, 0 ); // interprets depth relative to rpcTempCU level 1358 } 1359 else 1360 #endif 1361 { 1335 1362 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[0 + 2*uiMergeCand].getRefIdx(), SIZE_2Nx2N, 0, 0, 0 ); // interprets depth relative to rpcTempCU level 1336 1363 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[1 + 2*uiMergeCand].getRefIdx(), SIZE_2Nx2N, 0, 0, 0 ); // interprets depth relative to rpcTempCU level 1364 } 1337 1365 1338 1366 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1348 1376 if ( uiNoResidual == 0 ){ 1349 1377 #endif 1378 1379 #if POZNAN_EIVD 1380 if(uiMergeCand==POZNAN_EIVD_MRG_CAND){ 1381 m_pcPredSearch->motionCompensation_EIVD ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 1382 #if POZNAN_EIVD_CALC_PRED_DATA 1383 pcMP->setEIVDPredMVField(REF_PIC_LIST_0, rpcTempCU); 1384 pcMP->setEIVDPredMVField(REF_PIC_LIST_1, rpcTempCU); 1385 #endif 1386 } 1387 else 1350 1388 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 1389 #else 1390 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 1391 #endif 1351 1392 // save pred adress 1352 1393 pcPredYuvTemp = m_ppcPredYuvTemp[uhDepth]; … … 1358 1399 pcPredYuvTemp = m_ppcPredYuvBest[uhDepth]; 1359 1400 } 1401 #if POZNAN_EIVD_CALC_PRED_DATA 1402 if(uiMergeCand==POZNAN_EIVD_MRG_CAND) 1403 { 1404 //copy motion data representing CU with EIVD for uiNoResidual==0 case 1405 rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->copyFrom(pcMP->getEIVDPredMVField(REF_PIC_LIST_0),rpcTempCU->getTotalNumPart(),0); 1406 rpcTempCU->getCUMvField( REF_PIC_LIST_1 )->copyFrom(pcMP->getEIVDPredMVField(REF_PIC_LIST_1),rpcTempCU->getTotalNumPart(),0); 1407 } 1408 #endif 1360 1409 } 1361 1410 #if HHI_VSO … … 1381 1430 Bool bQtRootCbf = rpcTempCU->getQtRootCbf(0) == 1; 1382 1431 #else 1432 #if POZNAN_EIVD 1383 1433 // do MC 1434 if(uiMergeCand==POZNAN_EIVD_MRG_CAND){ 1435 m_pcPredSearch->motionCompensation_EIVD ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 1436 #if POZNAN_EIVD_CALC_PRED_DATA 1437 pcMP->setEIVDPredMVField(REF_PIC_LIST_0, rpcTempCU); 1438 pcMP->setEIVDPredMVField(REF_PIC_LIST_1, rpcTempCU); 1439 #endif 1440 } 1441 else 1384 1442 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 1443 1444 #endif 1385 1445 1386 1446 // estimate residual and encode everything … … 1671 1731 { 1672 1732 if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) 1673 #if POZNAN_ ENCODE_ONLY_DISOCCLUDED_CU1733 #if POZNAN_CU_SKIP 1674 1734 || pcTextureCU->isCUSkiped( rpcTempCU->getZorderIdxInCU() + ui ) 1675 1735 #endif -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncCu.h
r11 r12 78 78 TComYuv** m_ppcOrigYuv; ///< Original Yuv for each depth 79 79 TComYuv** m_ppcResPredTmp; ///< Temporary residual prediction for each depth 80 #if POZNAN_ AVAIL_MAP80 #if POZNAN_CU_SKIP 81 81 TComYuv** m_ppcAvailYuv; ///< Avaiability map for each depth 82 82 #endif 83 #if POZNAN_ SYNTH_VIEW83 #if POZNAN_CU_SYNTH 84 84 TComYuv** m_ppcSynthYuv; ///< Synthetized Yuv for each depth 85 85 #endif 86 86 87 87 // Data : encoder control 88 88 Int m_iQp; ///< Last QP … … 113 113 #endif 114 114 115 #if POZNAN_STAT_JK 116 Bool m_bStatFileEnabled; 117 #endif 118 115 119 public: 116 120 /// copy parameters from encoder class … … 131 135 /// set QP value 132 136 Void setQpLast ( Int iQp ) { m_iQp = iQp; } 137 138 #if POZNAN_STAT_JK 139 Void setStatFileEnabled(Bool bStatFileEnabled){m_bStatFileEnabled = bStatFileEnabled;} 140 #endif 133 141 134 142 protected: … … 162 170 Void xRestoreDepthWidthHeight( TComDataCU* pcCU ); 163 171 #endif 172 173 #if POZNAN_EIVD & !POZNAN_EIVD_COMPRESS_ME_DATA 174 Void xSaveEIVDData(TComDataCU* pcCU) { pcCU->getSlice()->getMP()->saveEIVDData(pcCU);} 175 #endif 176 177 #if POZNAN_STAT_JK 178 Void xStatFile ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 #endif 164 180 }; 165 181 -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncGOP.cpp
r11 r12 293 293 #endif 294 294 295 #if POZNAN_MP 296 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 297 pcSlice->getMP()->setDepthMapGenerator(m_pcDepthMapGenerator); 298 #else 299 std::vector<TComPic*> apcSpatDepthRefPics = m_pcEncTop->getEncTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), true ); 300 pcSlice->getMP()->setDepthRefPicsList(&apcSpatDepthRefPics); 301 #endif 302 std::vector<TComPic*> apcSpatDataRefPics = m_pcEncTop->getEncTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_pcEncTop->isDepthCoder() ); 303 pcSlice->getMP()->setRefPicsList(&apcSpatDataRefPics); 304 pcSlice->getMP()->pairMultiview(pcPic); 305 #endif 306 295 307 while(uiNextCUAddr<pcPic->getPicSym()->getNumberOfCUsInFrame()) // determine slice boundaries 296 308 { … … 615 627 pcBitstreamOut->convertRBSPToPayload(0); 616 628 629 #if POZNAN_MP 630 pcSlice->getMP()->disable(); 631 #endif 632 617 633 /*#if AMVP_BUFFERCOMPRESS 618 634 pcPic->compressMotion(); // moved to end of access unit … … 822 838 if(pAvail) 823 839 { 824 825 826 827 840 for( y = 0; y < iHeight; y++ ) 841 { 842 for( x = 0; x < iWidth; x++ ) 843 { 828 844 if(pAvail[x]==0) //If pixel was codded 829 845 { … … 847 863 for( x = 0; x < iWidth; x++ ) 848 864 { 849 850 851 852 853 854 865 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 866 uiSSDY += iDiff * iDiff; 867 } 868 pOrg += iStride; 869 pRec += iStride; 870 } 855 871 } 856 872 … … 869 885 { 870 886 #if POZNAN_CU_SKIP_PSNR 871 if(pAvail) 872 { 873 iHeight >>= 1; 874 iWidth >>= 1; 875 iStride >>= 1; 876 877 pOrg = pcPic ->getPicYuvOrg()->getCbAddr(); 878 pRec = pcPicD->getCbAddr(); 879 pAvail = pcPic ->getPicYuvAvail()->getLumaAddr(); 880 iPixelsCnt = 0; 881 882 for( y = 0; y < iHeight; y++ ) 883 { 884 for( x = 0; x < iWidth; x++ ) 885 { 886 if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0|| 887 pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded 888 { 889 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 890 uiSSDU += iDiff * iDiff; 891 iPixelsCnt++; 892 } 893 } 894 pOrg += iStride; 895 pRec += iStride; 896 pAvail+= (iStride<<2); 897 } 898 899 fRefValueC = (double) maxval * maxval * iPixelsCnt; 900 901 pOrg = pcPic ->getPicYuvOrg()->getCrAddr(); 902 pRec = pcPicD->getCrAddr(); 903 pAvail = pcPic ->getPicYuvAvail()->getLumaAddr(); 904 for( y = 0; y < iHeight; y++ ) 905 { 906 for( x = 0; x < iWidth; x++ ) 907 { 908 if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0|| 909 pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded 910 { 911 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 912 uiSSDV += iDiff * iDiff; 913 } 914 } 915 pOrg += iStride; 916 pRec += iStride; 917 pAvail+= iStride<<2; 918 } 919 } 920 else 921 #endif 922 { 923 iHeight >>= 1; 924 iWidth >>= 1; 925 iStride >>= 1; 926 927 pOrg = pcPic ->getPicYuvOrg()->getCbAddr(); 928 pRec = pcPicD->getCbAddr(); 929 930 for( y = 0; y < iHeight; y++ ) 931 { 932 for( x = 0; x < iWidth; x++ ) 887 if(pAvail) 888 { 889 iHeight >>= 1; 890 iWidth >>= 1; 891 iStride >>= 1; 892 893 pOrg = pcPic ->getPicYuvOrg()->getCbAddr(); 894 pRec = pcPicD->getCbAddr(); 895 pAvail = pcPic ->getPicYuvAvail()->getLumaAddr(); 896 iPixelsCnt = 0; 897 898 for( y = 0; y < iHeight; y++ ) 899 { 900 for( x = 0; x < iWidth; x++ ) 901 { 902 if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0|| 903 pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded 933 904 { 934 905 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 935 906 uiSSDU += iDiff * iDiff; 936 } 937 pOrg += iStride; 938 pRec += iStride; 939 } 940 941 pOrg = pcPic ->getPicYuvOrg()->getCrAddr(); 942 pRec = pcPicD->getCrAddr(); 943 944 for( y = 0; y < iHeight; y++ ) 945 { 946 for( x = 0; x < iWidth; x++ ) 907 iPixelsCnt++; 908 } 909 } 910 pOrg += iStride; 911 pRec += iStride; 912 pAvail+= (iStride<<2); 913 } 914 915 fRefValueC = (double) maxval * maxval * iPixelsCnt; 916 917 pOrg = pcPic ->getPicYuvOrg()->getCrAddr(); 918 pRec = pcPicD->getCrAddr(); 919 pAvail = pcPic ->getPicYuvAvail()->getLumaAddr(); 920 for( y = 0; y < iHeight; y++ ) 921 { 922 for( x = 0; x < iWidth; x++ ) 923 { 924 if(pAvail[x<<1]==0||pAvail[(x<<1)+1]==0|| 925 pAvail[(x+iStride)<<1]==0||pAvail[((x+iStride)<<1)+1]==0) //If pixel was codded 947 926 { 948 927 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 949 928 uiSSDV += iDiff * iDiff; 950 929 } 951 pOrg += iStride; 952 pRec += iStride; 953 } 954 } 955 956 dYPSNR = ( uiSSDY ? 10.0 * log10( fRefValueY / (Double)uiSSDY ) : 99.99 ); 957 dUPSNR = ( uiSSDU ? 10.0 * log10( fRefValueC / (Double)uiSSDU ) : 99.99 ); 958 dVPSNR = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 ); 930 } 931 pOrg += iStride; 932 pRec += iStride; 933 pAvail+= iStride<<2; 934 } 935 } 936 else 937 #endif 938 { 939 iHeight >>= 1; 940 iWidth >>= 1; 941 iStride >>= 1; 942 943 pOrg = pcPic ->getPicYuvOrg()->getCbAddr(); 944 pRec = pcPicD->getCbAddr(); 945 946 for( y = 0; y < iHeight; y++ ) 947 { 948 for( x = 0; x < iWidth; x++ ) 949 { 950 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 951 uiSSDU += iDiff * iDiff; 952 } 953 pOrg += iStride; 954 pRec += iStride; 955 } 956 957 pOrg = pcPic ->getPicYuvOrg()->getCrAddr(); 958 pRec = pcPicD->getCrAddr(); 959 960 for( y = 0; y < iHeight; y++ ) 961 { 962 for( x = 0; x < iWidth; x++ ) 963 { 964 Int iDiff = (Int)( pOrg[x] - pRec[x] ); 965 uiSSDV += iDiff * iDiff; 966 } 967 pOrg += iStride; 968 pRec += iStride; 969 } 970 } 971 972 dYPSNR = ( uiSSDY ? 10.0 * log10( fRefValueY / (Double)uiSSDY ) : 99.99 ); 973 dUPSNR = ( uiSSDU ? 10.0 * log10( fRefValueC / (Double)uiSSDU ) : 99.99 ); 974 dVPSNR = ( uiSSDV ? 10.0 * log10( fRefValueC / (Double)uiSSDV ) : 99.99 ); 959 975 } 960 976 // fix: total bits should consider slice size bits (32bit) -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncSbac.h
r5 r12 166 166 Void codeMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 167 167 Void codeMergeIndex ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 168 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI 168 #if HHI_INTER_VIEW_MOTION_PRED || HHI_MPI || POZNAN_EIVD 169 169 Void codeMergeIndexMV ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 170 170 #endif -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncSearch.cpp
r5 r12 1042 1042 UInt uiAbsSum = 0; 1043 1043 pcCU ->setTrIdxSubParts ( uiTrDepth, uiAbsPartIdx, uiFullDepth ); 1044 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1045 m_pcTrQuant->setQPforQuant ( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 1046 #else 1044 1047 m_pcTrQuant->setQPforQuant ( pcCU->getQP( 0 ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 1048 #endif 1045 1049 m_pcTrQuant->transformNxN ( pcCU, piResi, uiStride, pcCoeff, uiWidth, uiHeight, uiAbsSum, TEXT_LUMA, uiAbsPartIdx ); 1046 1050 … … 1208 1212 //--- transform and quantization --- 1209 1213 UInt uiAbsSum = 0; 1214 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1215 m_pcTrQuant->setQPforQuant ( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, true), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 1216 #else 1210 1217 m_pcTrQuant->setQPforQuant ( pcCU->getQP( 0 ), !pcCU->getSlice()->getDepth(), pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 1218 #endif 1211 1219 m_pcTrQuant->transformNxN ( pcCU, piResi, uiStride, pcCoeff, uiWidth, uiHeight, uiAbsSum, eText, uiAbsPartIdx ); 1212 1220 //--- set coded block flag --- … … 2814 2822 } 2815 2823 2824 #if POZNAN_EIVD 2825 Void TEncSearch::xGetInterPredictionError_EIVD( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, UInt& ruiErr, Bool bHadamard ) 2826 { 2827 TComYuv cYuvPred; 2828 cYuvPred.create( pcYuvOrg->getWidth(), pcYuvOrg->getHeight() ); 2829 2830 #ifdef WEIGHT_PRED 2831 UInt uiAbsPartIdx = 0; 2832 Int iWidth = 0; 2833 Int iHeight = 0; 2834 //Int iRefIdx[2]; 2835 pcCU->getPartIndexAndSize( iPartIdx, uiAbsPartIdx, iWidth, iHeight ); 2836 2837 //??????????????????????????????????????????????????????????????????????????????????? 2838 //iRefIdx[0] = pcCU->getCUMvField( REF_PIC_LIST_0 )->getRefIdx( uiAbsPartIdx ); 2839 //iRefIdx[1] = pcCU->getCUMvField( REF_PIC_LIST_1 )->getRefIdx( uiAbsPartIdx ); 2840 //if ( iRefIdx[0]>=0 && iRefIdx[1]<1 ) 2841 // setWpScalingDistParam( pcCU, iRefIdx[0], iRefIdx[1], REF_PIC_LIST_0); 2842 //else 2843 // setWpScalingDistParam( pcCU, iRefIdx[0], iRefIdx[1], REF_PIC_LIST_1); 2844 setWpScalingDistParam( pcCU, -1, -1, REF_PIC_LIST_X);//??? 2845 //??????????????????????????????????????????????????????????????????????????????????? 2846 motionCompensation_EIVD( pcCU, &cYuvPred, REF_PIC_LIST_X, iPartIdx ); 2847 #else 2848 motionCompensation_EIVD( pcCU, &cYuvPred, REF_PIC_LIST_X, iPartIdx ); 2849 2850 UInt uiAbsPartIdx = 0; 2851 Int iWidth = 0; 2852 Int iHeight = 0; 2853 pcCU->getPartIndexAndSize( iPartIdx, uiAbsPartIdx, iWidth, iHeight ); 2854 #endif 2855 2856 DistParam cDistParam; 2857 #ifdef WEIGHT_PRED 2858 cDistParam.applyWeight = false; 2859 #endif 2860 m_pcRdCost->setDistParam( cDistParam, 2861 pcYuvOrg->getLumaAddr( uiAbsPartIdx ), pcYuvOrg->getStride(), 2862 cYuvPred .getLumaAddr( uiAbsPartIdx ), cYuvPred .getStride(), 2863 iWidth, iHeight, m_pcEncCfg->getUseHADME() ); 2864 ruiErr = cDistParam.DistFunc( &cDistParam ); 2865 2866 cYuvPred.destroy(); 2867 } 2868 #endif 2869 2816 2870 /** estimation of best merge coding 2817 2871 * \param pcCU … … 2875 2929 PartSize ePartSize = pcCU->getPartitionSize( 0 ); 2876 2930 2931 #if POZNAN_EIVD_CALC_PRED_DATA 2932 if(uiMergeCand==POZNAN_EIVD_MRG_CAND) 2933 { 2934 pcCU->getCUMvField2nd( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[0 + 2*uiMergeCand].getRefIdx(), ePartSize, uiAbsPartIdx, iPUIdx, 0 ); 2935 pcCU->getCUMvField2nd( REF_PIC_LIST_1 )->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[1 + 2*uiMergeCand].getRefIdx(), ePartSize, uiAbsPartIdx, iPUIdx, 0 ); 2936 } 2937 else 2938 #endif 2939 { 2877 2940 pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[0 + 2*uiMergeCand].getRefIdx(), ePartSize, uiAbsPartIdx, iPUIdx, 0 ); 2878 2941 pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand].getMv(), cMvFieldNeighbours[1 + 2*uiMergeCand].getRefIdx(), ePartSize, uiAbsPartIdx, iPUIdx, 0 ); 2879 2942 } 2943 2944 #if POZNAN_EIVD 2945 if(uiMergeCand==POZNAN_EIVD_MRG_CAND) 2946 xGetInterPredictionError_EIVD( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() ); 2947 else 2880 2948 xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() ); 2949 #else 2950 xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() ); 2951 #endif 2881 2952 2882 2953 if( uiNumCand == 1 ) … … 2886 2957 else 2887 2958 { 2888 if( uiMergeCand == 0 || uiNumCand == 2 ) 2959 UInt uiMergeCandIdx = uiMergeCand; 2960 #if POZNAN_EIVD 2961 if(pcCU->getSlice()->getMP()->isEIVDEnabled()) 2962 { 2963 if(uiMergeCand == POZNAN_EIVD_MRG_CAND) uiMergeCandIdx = POZNAN_EIVD_MERGE_POS; 2964 else if(uiMergeCand >= POZNAN_EIVD_MERGE_POS) uiMergeCandIdx++; 2965 } 2966 #endif 2967 2968 if( uiMergeCandIdx == 0 || uiNumCand == 2 ) 2889 2969 { 2890 2970 uiBitsCand = 2; 2891 2971 } 2892 else if( uiMergeCand == 1 || uiNumCand == 3 )2972 else if( uiMergeCandIdx == 1 || uiNumCand == 3 ) 2893 2973 { 2894 2974 uiBitsCand = 3; 2895 2975 } 2896 else if( uiMergeCand == 2 || uiNumCand == 4 )2976 else if( uiMergeCandIdx == 2 || uiNumCand == 4 ) 2897 2977 { 2898 2978 uiBitsCand = 4; 2899 2979 } 2980 else if( uiMergeCandIdx == 3 || uiNumCand == 5 ) 2981 { 2982 uiBitsCand = 5; 2983 } 2900 2984 else 2901 2985 { 2902 uiBitsCand = 5;2986 uiBitsCand = 6; 2903 2987 } 2904 2988 } … … 2910 2994 pacMvField[0] = cMvFieldNeighbours[0 + 2*uiMergeCand]; 2911 2995 pacMvField[1] = cMvFieldNeighbours[1 + 2*uiMergeCand]; 2996 2997 #if POZNAN_EIVD_CALC_PRED_DATA 2998 if(uiMergeCand==POZNAN_EIVD_MRG_CAND) 2999 { 3000 TComCUMvField* pcEIVDPredMvField; 3001 3002 pcEIVDPredMvField = pcCU->getSlice()->getMP()->getEIVDPredMVField(REF_PIC_LIST_0); 3003 pcEIVDPredMvField->setMv(pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(uiAbsPartIdx),0); 3004 pcEIVDPredMvField->setRefIdx(pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(uiAbsPartIdx),0); 3005 3006 pcEIVDPredMvField = pcCU->getSlice()->getMP()->getEIVDPredMVField(REF_PIC_LIST_1); 3007 pcEIVDPredMvField->setMv(pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(uiAbsPartIdx),0); 3008 pcEIVDPredMvField->setRefIdx(pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(uiAbsPartIdx),0); 3009 } 3010 #endif 3011 2912 3012 uiInterDir = uhInterDirNeighbours[uiMergeCand]; 2913 3013 uiMergeIndex = uiMergeCand; … … 3604 3704 pcCU->setMergeIndexSubParts( uiMRGIndex, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 3605 3705 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 3706 3707 #if POZNAN_EIVD_CALC_PRED_DATA 3708 if(uiMRGIndex==POZNAN_EIVD_MRG_CAND) 3709 { 3710 TComCUMvField* pcEIVDPredMvField; 3711 pcEIVDPredMvField = pcCU->getSlice()->getMP()->getEIVDPredMVField(REF_PIC_LIST_0); 3712 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( pcEIVDPredMvField->getMv(0), pcEIVDPredMvField->getRefIdx(0), ePartSize, uiPartAddr, iPartIdx, 0 ); 3713 pcEIVDPredMvField = pcCU->getSlice()->getMP()->getEIVDPredMVField(REF_PIC_LIST_1); 3714 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( pcEIVDPredMvField->getMv(0), pcEIVDPredMvField->getRefIdx(0), ePartSize, uiPartAddr, iPartIdx, 0 ); 3715 3716 pcCU->getCUMvField2nd( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0].getMv(), cMRGMvField[0].getRefIdx(), ePartSize, uiPartAddr, iPartIdx, 0 ); 3717 pcCU->getCUMvField2nd( REF_PIC_LIST_1 )->setAllMvField( cMRGMvField[1].getMv(), cMRGMvField[1].getRefIdx(), ePartSize, uiPartAddr, iPartIdx, 0 ); 3718 } 3719 else 3720 #endif 3606 3721 { 3607 3722 pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMRGMvField[0].getMv(), cMRGMvField[0].getRefIdx(), ePartSize, uiPartAddr, iPartIdx, 0 ); … … 4998 5113 m_pcEntropyCoder->estimateBit(m_pcTrQuant->m_pcEstBitsSbac, 1<< uiLog2TrSize, TEXT_LUMA ); 4999 5114 } 5115 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 5116 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false), false, pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 5117 #else 5000 5118 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), false, pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 5119 #endif 5001 5120 m_pcTrQuant->transformNxN( pcCU, pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride (), pcCoeffCurrY, 1<< uiLog2TrSize, 1<< uiLog2TrSize, uiAbsSumY, TEXT_LUMA, uiAbsPartIdx ); 5002 5121 … … 5009 5128 m_pcEntropyCoder->estimateBit(m_pcTrQuant->m_pcEstBitsSbac, 1<<uiLog2TrSizeC, TEXT_CHROMA ); 5010 5129 } 5130 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 5131 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false), false, pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 5132 #else 5011 5133 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), false, pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 5134 #endif 5012 5135 m_pcTrQuant->transformNxN( pcCU, pcResi->getCbAddr( uiAbsPartIdx ), pcResi->getCStride(), pcCoeffCurrU, 1<<uiLog2TrSizeC, 1<<uiLog2TrSizeC, uiAbsSumU, TEXT_CHROMA_U, uiAbsPartIdx ); 5013 5136 m_pcTrQuant->transformNxN( pcCU, pcResi->getCrAddr( uiAbsPartIdx ), pcResi->getCStride(), pcCoeffCurrV, 1<<uiLog2TrSizeC, 1<<uiLog2TrSizeC, uiAbsSumV, TEXT_CHROMA_V, uiAbsPartIdx ); … … 5072 5195 { 5073 5196 Pel *pcResiCurrY = m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( uiAbsPartIdx ); 5197 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 5198 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false), false, pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 5199 #else 5074 5200 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), false, pcCU->getSlice()->getSliceType(), TEXT_LUMA ); 5201 #endif 5075 5202 #if INTRA_DST_TYPE_7 // Inside Inter Encoder Search. So use conventional DCT. 5076 5203 m_pcTrQuant->invtransformNxN( TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, 1<< uiLog2TrSize, 1<< uiLog2TrSize );//this is for inter mode only … … 5150 5277 { 5151 5278 Pel *pcResiCurrU = m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( uiAbsPartIdx ); 5279 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 5280 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false), false, pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 5281 #else 5152 5282 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), false, pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 5283 #endif 5153 5284 #if INTRA_DST_TYPE_7 // Inside Inter Encoder Search. So use conventional DCT. 5154 5285 m_pcTrQuant->invtransformNxN( TEXT_CHROMA,REG_DCT, pcResiCurrU, m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), pcCoeffCurrU, 1<<uiLog2TrSizeC, 1<<uiLog2TrSizeC); … … 5195 5326 if( !uiAbsSumU ) 5196 5327 { 5328 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 5329 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ) + pcCU->getQpOffsetForTextCU(uiAbsPartIdx, false), false, pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 5330 #else 5197 5331 m_pcTrQuant->setQPforQuant( pcCU->getQP( 0 ), false, pcCU->getSlice()->getSliceType(), TEXT_CHROMA ); 5332 #endif 5198 5333 } 5199 5334 #if INTRA_DST_TYPE_7 // Inside Inter Encoder Search. So use conventional DCT. -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncSearch.h
r5 r12 185 185 186 186 Void xGetInterPredictionError( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, UInt& ruiSAD, Bool Hadamard ); 187 #if POZNAN_EIVD 188 Void xGetInterPredictionError_EIVD( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPartIdx, UInt& ruiSAD, Bool Hadamard ); 189 #endif 187 190 188 191 public: -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncSlice.cpp
r5 r12 475 475 m_pcEntropyCoder->setMaxAlfCtrlDepth(0); //unnecessary 476 476 477 #if POZNAN_STAT_JK 478 m_pcCuEncoder->setStatFileEnabled(false); 479 #endif 480 477 481 // for every CU in slice 478 482 for( uiCUAddr = uiStartCUAddr; uiCUAddr < uiBoundingCUAddr; uiCUAddr++ ) … … 611 615 #endif 612 616 617 #if POZNAN_STAT_JK 618 m_pcCuEncoder->setStatFileEnabled(true); 619 #endif 620 613 621 for( uiCUAddr = uiStartCUAddr; uiCUAddr<uiBoundingCUAddr; uiCUAddr++ ) 614 622 { … … 618 626 g_bJustDoIt = g_bEncDecTraceEnable; 619 627 #endif 628 629 // JK { 630 DTRACE_CABAC_V( g_nSymbolCounter++ ); 631 DTRACE_CABAC_T( "\tCU: " ); 632 DTRACE_CABAC_V( uiCUAddr ); 633 DTRACE_CABAC_T( "\n" ); 634 // JK } 635 620 636 if ( (m_pcCfg->getSliceMode()!=0 || m_pcCfg->getEntropySliceMode()!=0) && uiCUAddr==uiBoundingCUAddr-1 ) 621 637 { -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncTop.cpp
r11 r12 63 63 m_bSeqFirst = true; 64 64 m_iFrameNumInCodingOrder = 0; 65 66 #if POZNAN_MP 67 m_pcMP=NULL; 68 #endif 69 65 70 } 66 71 … … 98 103 #endif 99 104 105 #if POZNAN_MP 106 m_pcMP = NULL; 107 #endif 108 100 109 #if MQT_BA_RA && MQT_ALF_NPASS 101 110 if(m_bUseALF) … … 163 172 #endif 164 173 174 #if POZNAN_MP 175 m_pcMP=NULL; 176 #endif 177 165 178 // SBAC RD 166 179 if( m_bUseSBACRD ) … … 205 218 // initialize PPS 206 219 xInitPPS(); 220 #endif 221 222 #if POZNAN_MP 223 m_pcMP = pcTAppEncTop->getMP(); 207 224 #endif 208 225 … … 416 433 { 417 434 pcPic->removeOriginalBuffer (); 418 #if POZNAN_ AVAIL_MAP435 #if POZNAN_CU_SKIP 419 436 pcPic->removeAvailabilityBuffer(); 420 437 #endif 421 #if POZNAN_ SYNTH_VIEW438 #if POZNAN_CU_SYNTH 422 439 pcPic->removeSynthesisBuffer(); 440 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 441 pcPic->removeSynthesisDepthBuffer(); 442 #endif 423 443 #endif 424 444 #if HHI_INTER_VIEW_MOTION_PRED … … 514 534 // mark it should be extended 515 535 rpcPic->getPicYuvRec()->setBorderExtension(false); 536 537 #if POZNAN_MP 538 rpcPic->getSlice(0)->setMP(m_pcMP); 539 #endif 540 541 #if POZNAN_STAT_JK 542 rpcPic->getSlice(0)->setStatFile(m_pcStatFile); 543 #endif 516 544 } 517 545 … … 624 652 #if HHI_MPI 625 653 m_cSPS.setUseMVI( m_bUseMVI ); 654 #endif 655 656 #if POZNAN_NONLINEAR_DEPTH 657 m_cSPS.setDepthPower ( m_fDepthPower ); 626 658 #endif 627 659 … … 824 856 825 857 pcPic->setScaleOffset( m_aaiCodedScale, m_aaiCodedOffset ); 826 } 858 859 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 860 pcPic->setTextureCuDeltaQpOffset( getTextureCuDeltaQpOffset() ); 861 pcPic->setTextureCuDeltaQpMul ( getTextureCuDeltaQpMul() ); 862 pcPic->setTextureCuDeltaQpTopBottomRow( getTextureCuDeltaQpTopBottomRow() ); 863 #endif 864 } -
branches/0.2-poznan-univ/source/Lib/TLibEncoder/TEncTop.h
r5 r12 64 64 #include "TEncAnalyze.h" 65 65 66 #if POZNAN_MP 67 #include "../TLibCommon/TComMP.h" 68 #endif 66 69 67 70 // ==================================================================================================================== … … 131 134 132 135 PicOrderCnt m_iFrameNumInCodingOrder; 136 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 137 Double m_dTextureCuDeltaQpOffset; 138 Double m_dTextureCuDeltaQpMul; 139 Int m_iTextureCuDeltaQpTopBottomRow; 140 #endif 141 142 #if POZNAN_MP 143 TComMP* m_pcMP; 144 #endif 133 145 134 146 protected: … … 217 229 Void encode ( bool bEos, std::map<PicOrderCnt, TComPicYuv*>& rcMapPicYuvRecOut, TComBitstream* pcBitstreamOut, Bool& bNewPicNeeded ); 218 230 Void receivePic( bool bEos, TComPicYuv* pcPicYuvOrg, TComPicYuv* pcPicYuvRec, TComPicYuv* pcOrgPdmDepth = 0 ); 231 232 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 233 Double getTextureCuDeltaQpOffset( ) { return m_dTextureCuDeltaQpOffset;} 234 Double getTextureCuDeltaQpMul( ) { return m_dTextureCuDeltaQpMul;} 235 Int getTextureCuDeltaQpTopBottomRow( ){ return m_iTextureCuDeltaQpTopBottomRow;} 236 Void setTextureCuDeltaQpOffset ( Double dTextureCuDeltaQpOffset ){ m_dTextureCuDeltaQpOffset = dTextureCuDeltaQpOffset; } 237 Void setTextureCuDeltaQpMul ( Double dTextureCuDeltaQpMul ){ m_dTextureCuDeltaQpMul = dTextureCuDeltaQpMul; } 238 Void setTextureCuDeltaQpTopBottomRow( Int iTextureCuDeltaQpTopBottomRow ){ m_iTextureCuDeltaQpTopBottomRow = iTextureCuDeltaQpTopBottomRow; } 239 #endif 219 240 }; 220 241
Note: See TracChangeset for help on using the changeset viewer.