Changeset 28 in 3DVCSoftware for branches/0.3-poznan-univ/source/App/TAppEncoder
- Timestamp:
- 24 Feb 2012, 20:22:58 (15 years ago)
- Location:
- branches/0.3-poznan-univ/source/App/TAppEncoder
- Files:
-
- 4 edited
-
TAppEncCfg.cpp (modified) (11 diffs)
-
TAppEncCfg.h (modified) (3 diffs)
-
TAppEncTop.cpp (modified) (12 diffs)
-
TAppEncTop.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/App/TAppEncoder/TAppEncCfg.cpp
r21 r28 341 341 #endif 342 342 343 #if POZNAN_DBMP 344 ("DBMP", m_uiDBMP, (UInt)0, "usage of Depth-Based Motion Prediction" ) 345 #endif 346 347 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 348 ("CUSkip", m_uiUseCUSkip, (UInt)1, "encode only disoccluded CUs in dependend view" ) 349 #endif 350 343 351 ("QpChangeFrame", m_iQpChangeFrame, PicOrderCnt(0), "start frame for QP change") 344 352 ("QpChangeOffsetVideo", m_iQpChangeOffsetVideo, 0, "QP change offset for video") … … 350 358 #endif 351 359 #endif 360 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 361 ("TDdQP", m_bUseTexDqpAccordingToDepth, false, "texture TU blocks QP param modification according to depth map's values") 362 #endif 363 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 364 ("TDdQPOffset", m_dTexDqpAccordingToDepthOffset, (Double)(-2.6), "texture block QP changing tool based on coresponding depth block values - offset parameter" ) 365 ("TDdQPMul", m_dTexDqpAccordingToDepthMul, (Double)(1), "texture block QP changing tool based on coresponding depth block values - multiplicative parameter" ) 366 ("TDdQPTopBottomRow", m_iTexDqpAccordingToDepthTopBottomRow, (Int)2, "texture block QP changing tool - top and bottom CU rows delta QP parameter" ) 367 #endif 368 #if POZNAN_NONLINEAR_DEPTH 369 ("DepthPower,-dpow", m_fDepthPower, (Double)1.0, "Depth power value (for non-linear processing)") 370 #endif 371 352 372 353 373 /* Compatability with old style -1 FOO or -0 FOO options. */ … … 437 457 #endif 438 458 459 #if POZNAN_NONLINEAR_DEPTH 460 if (m_fDepthPower<=0) 461 { 462 Float fDepthQP = m_adQP[ m_adQP.size() < 2 ? 0 : 1]; 463 m_fDepthPower = (fDepthQP-30) *0.25/20.0 + 1.25; 464 if (m_fDepthPower<=1.0) m_fDepthPower = 1.0; 465 // QP = 30 = 1.25 466 // QP = 50 = 1.5 467 if (m_fDepthPower>=1.66) m_fDepthPower = 1.66; 468 }; 469 470 #if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE 471 m_fDepthPower = dequantizeDepthPower(quantizeDepthPower((Float)m_fDepthPower)); 472 #endif 473 474 #endif 475 439 476 xCleanUpVectors(); 440 477 … … 516 553 NULL, 517 554 m_cRenModStrParser.getSynthViews(), 518 LOG2_DISP_PREC_LUT ); 555 LOG2_DISP_PREC_LUT 556 #if POZNAN_NONLINEAR_DEPTH 557 ,m_fDepthPower 558 #endif 559 ); 519 560 } 520 561 else if ( m_bUseVSO && m_uiVSOMode != 4 ) … … 529 570 m_pchVSOConfig, 530 571 NULL, 531 LOG2_DISP_PREC_LUT ); 572 LOG2_DISP_PREC_LUT 573 #if POZNAN_NONLINEAR_DEPTH 574 ,m_fDepthPower 575 #endif 576 ); 532 577 } 533 578 else … … 542 587 NULL, 543 588 NULL, 544 LOG2_DISP_PREC_LUT ); 589 LOG2_DISP_PREC_LUT 590 #if POZNAN_NONLINEAR_DEPTH 591 ,m_fDepthPower 592 #endif 593 ); 545 594 } 546 595 #else … … 554 603 NULL, 555 604 NULL, 556 LOG2_DISP_PREC_LUT ); 605 LOG2_DISP_PREC_LUT 606 #if POZNAN_NONLINEAR_DEPTH 607 ,m_fDepthPower 608 #endif 609 ); 557 610 #endif 558 611 … … 665 718 #endif 666 719 720 #if POZNAN_DBMP 721 xConfirmPara ( m_uiDBMP > 1, "DBMP must be less than or equal to 1" ); 722 #endif 723 724 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 725 xConfirmPara ( m_uiUseCUSkip > 1, "CU-Skip must be less than or equal to 1" ); 726 #endif 727 667 728 #if HHI_INTERVIEW_SKIP 668 729 xConfirmPara ( m_uiInterViewSkip > 1, "RenderingSkipMode > 1 not supported" ); … … 933 994 #if MTK_SAO 934 995 #endif 996 997 #if POZNAN_MP 998 printf("POZNAN_MP(1){ "); 999 1000 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 1001 printf("dmg=1 "); 1002 #else 1003 printf("dmg=0 "); 1004 #endif 1005 1006 #if POZNAN_MP_FILL 1007 printf("fill=%d ",POZNAN_MP_FILL_TYPE); 1008 #else 1009 printf("fill=- "); 1010 #endif 1011 1012 #if POZNAN_DBMP 1013 printf("DBMP:%d ", m_uiDBMP); 1014 if(m_uiDBMP) 1015 { 1016 printf("cand=%d ",POZNAN_DBMP_MERGE_POS); 1017 #if POZNAN_DBMP_CALC_PRED_DATA 1018 printf("pr=1 "); 1019 #else 1020 printf("pr=0 "); 1021 #endif 1022 #if POZNAN_DBMP_COMPRESS_ME_DATA 1023 printf("comp=1 "); 1024 #else 1025 printf("comp=0 "); 1026 #endif 1027 #if POZNAN_DBMP_USE_IN_NONANCHOR_PIC_ONLY 1028 printf("na=1 "); 1029 #else 1030 printf("na=0 "); 1031 #endif 1032 } 1033 #endif 1034 printf("} "); 1035 #endif 1036 1037 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 1038 printf("CU-Skip:%d ", m_uiUseCUSkip); 1039 #endif 1040 935 1041 printf("\n"); 936 1042 printf("TOOL CFG VIDEO : "); … … 938 1044 printf("SAO:%d ", (m_abUseSAO [0] ? 1 : 0)); 939 1045 printf("RDQ:%d ", (m_abUseRDOQ[0] ? 1 : 0) ); 1046 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1047 printf("TDdQP:%d ", m_bUseTexDqpAccordingToDepth); 1048 #endif 1049 940 1050 printf("\n"); 941 1051 … … 952 1062 #if HHI_MPI 953 1063 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1064 #endif 1065 #if POZNAN_NONLINEAR_DEPTH 1066 printf("DepthPower:%f ", m_fDepthPower); 954 1067 #endif 955 1068 printf("\n"); -
branches/0.3-poznan-univ/source/App/TAppEncoder/TAppEncCfg.h
r5 r28 178 178 #endif 179 179 180 #if POZNAN_DBMP 181 UInt m_uiDBMP; ///< using Depth-Based Motion Prediction 182 #endif 183 184 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 185 UInt m_uiUseCUSkip; ///< using CU-Skip - Encode only disoccluded CUs in dependend view 186 #endif 187 180 188 #if HHI_INTERVIEW_SKIP 181 189 UInt m_uiInterViewSkip; ///< usage of interview skip mode ( do not transmit residual) … … 246 254 #endif 247 255 256 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 257 Bool m_bUseTexDqpAccordingToDepth; ///< flag for using texture QP param modyfication according to depth map's values 258 #endif 248 259 // internal member functions 249 260 Void xSetGlobal (); ///< set global variables … … 271 282 TRenModSetupStrParser m_cRenModStrParser; 272 283 #endif 284 285 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 286 Double m_dTexDqpAccordingToDepthOffset; 287 Double m_dTexDqpAccordingToDepthMul; 288 Int m_iTexDqpAccordingToDepthTopBottomRow; 289 #endif 290 291 #if POZNAN_NONLINEAR_DEPTH 292 Double m_fDepthPower; ///< Depth power value 293 #endif 294 273 295 public: 274 296 -
branches/0.3-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp
r21 r28 141 141 m_acTEncTopList[iViewIdx]->setUseFastEnc ( m_bUseFastEnc ); 142 142 143 #if POZNAN_NONLINEAR_DEPTH 144 m_acTEncTopList[iViewIdx]->setDepthPower ( (Float)m_fDepthPower ); 145 #endif 146 143 147 #if HHI_VSO 144 148 m_acTEncTopList[iViewIdx]->setUseVSO ( false ); //GT: might be enabled later for VSO Mode 4 … … 167 171 #endif 168 172 173 #if POZNAN_DBMP 174 m_acTEncTopList[iViewIdx]->setDBMP ( m_uiDBMP ); 175 #endif 176 177 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 178 m_acTEncTopList[iViewIdx]->setUseCUSkip ( m_uiUseCUSkip ); 179 #endif 169 180 170 181 #if HHI_INTERVIEW_SKIP … … 222 233 m_acTEncTopList[iViewIdx]->setQpChangeOffsetVideo( m_iQpChangeOffsetVideo ); 223 234 m_acTEncTopList[iViewIdx]->setQpChangeOffsetDepth( m_iQpChangeOffsetDepth ); 235 236 237 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 238 m_acTEncTopList[iViewIdx]->setUseTexDqpAccordingToDepth ( m_bUseTexDqpAccordingToDepth ); 239 #endif 240 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 241 m_acTEncTopList[iViewIdx]->setTexDqpAccordingToDepthOffset( m_dTexDqpAccordingToDepthOffset ); 242 m_acTEncTopList[iViewIdx]->setTexDqpAccordingToDepthMul( m_dTexDqpAccordingToDepthMul ); 243 m_acTEncTopList[iViewIdx]->setTexDqpAccordingToDepthTopBottomRow( m_iTexDqpAccordingToDepthTopBottomRow ); 244 #endif 224 245 } 225 246 if( m_bUsingDepthMaps ) … … 382 403 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 383 404 #endif 405 #if POZNAN_DBMP 406 m_acTEncDepthTopList[iViewIdx]->setDBMP ( m_uiDBMP ); 407 #endif 408 #if POZNAN_ENCODE_ONLY_DISOCCLUDED_CU 409 m_acTEncDepthTopList[iViewIdx]->setUseCUSkip ( m_uiUseCUSkip ); 410 #endif 411 #if POZNAN_NONLINEAR_DEPTH 412 m_acTEncDepthTopList[iViewIdx]->setDepthPower ( (Float)m_fDepthPower ); 413 #endif 384 414 385 415 m_acTEncDepthTopList[iViewIdx]->setPictureDigestEnabled(m_pictureDigestEnabled); … … 435 465 #endif 436 466 467 #if POZNAN_SYNTH 468 //m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,0,true, 0,0,0,0,0,0,0,1,0,0 ); //GT: simplest configuration 469 m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 ); //GT: simplest configuration 470 #endif 471 437 472 #if HHI_INTERVIEW_SKIP 438 473 m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 ); 439 474 #endif 475 476 #if POZNAN_MP 477 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 478 m_pcMP = new TComMP(m_iSourceHeight, m_iSourceWidth); 479 #else 480 //m_pcMP = new TComMP(m_iSourceHeight, m_iSourceWidth, &m_cCameraData); 481 m_pcMP = new TComMP(m_iSourceHeight, m_iSourceWidth, m_cCameraData.getBaseViewShiftLUTI()); 482 #endif 483 #endif 484 440 485 } 441 486 … … 485 530 486 531 m_cTVideoIOBitsFile.closeBits(); 532 533 #if POZNAN_MP 534 if (m_pcMP) { delete m_pcMP; m_pcMP=NULL; }; 535 #endif 487 536 488 537 #if HHI_VSO … … 640 689 { 641 690 m_acTVideoIOYuvDepthInputFileList[iViewIdx]->read( pcPdmDepthOrg, m_aiPad, m_bUsingDepthMaps ); 691 #if POZNAN_NONLINEAR_DEPTH 692 pcPdmDepthOrg->nonlinearDepthForward(pcPdmDepthOrg, m_fDepthPower); 693 #endif 642 694 } 643 695 #endif … … 661 713 // read input YUV file 662 714 m_acTVideoIOYuvDepthInputFileList[iViewIdx]->read( pcDepthPicYuvOrg, m_aiPad ) ; 715 #if POZNAN_NONLINEAR_DEPTH 716 pcDepthPicYuvOrg->nonlinearDepthForward(pcDepthPicYuvOrg, m_fDepthPower); 717 #endif 663 718 bDepthEos[iViewIdx] = ( m_acTVideoIOYuvDepthInputFileList[iViewIdx]->isEof() == 1 ? true : false ); 664 719 bDepthEos[iViewIdx] = ( m_iDepthFrameRcvdVector[iViewIdx] == (m_iFrameToBeEncoded - 1) ? true : bDepthEos[iViewIdx] ); … … 692 747 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) // Start encoding 693 748 { 749 #if POZNAN_SYNTH 750 if( m_uiUseCUSkip ) 751 { 752 xStoreSynthPicsInBuffer(iViewIdx,false); 753 } 754 #endif 755 //* 756 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 757 if(m_bUseTexDqpAccordingToDepth) 758 { 759 xStoreDepthSynthPicsInBuffer(iViewIdx); 760 } 761 #endif 762 //*/ 694 763 bool bThisViewContinueReadingPics = bContinueReadingPics[iViewIdx]; 695 764 m_acTEncTopList[iViewIdx]->encode( bEos[iViewIdx], m_cListPicYuvRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingPics ); … … 708 777 if( m_bUsingDepthMaps ) 709 778 { 779 #if POZNAN_SYNTH 780 if( m_uiUseCUSkip ) 781 { 782 xStoreSynthPicsInBuffer(iViewIdx,true); 783 } 784 #endif 710 785 bool bThisViewContinueReadingDepthPics = bContinueReadingDepthPics[iViewIdx]; 711 786 m_acTEncDepthTopList[iViewIdx]->encode( bDepthEos[iViewIdx], m_cListPicYuvDepthRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingDepthPics ); … … 928 1003 { 929 1004 riNextPocToDump++; 1005 #if POZNAN_NONLINEAR_DEPTH 1006 if(isDepth) 1007 { 1008 TComPicYuv *pcPicOrg = i->second; 1009 TComPicYuv *pcPicPow = new TComPicYuv; 1010 //pcPicYuvRec->createCompatibleAs(*iterPicYuvRec); 1011 pcPicPow->create( pcPicOrg->getWidth(), pcPicOrg->getHeight(), pcPicOrg->getMaxCuWidth(), pcPicOrg->getMaxCuHeight(), pcPicOrg->getMaxCuDepth() ); 1012 //cPicPower.create(pcSPS->getWidth(), pcSPS->getHeight(), pcSPS->getMaxCUWidth(), pcSPS->getMaxCUHeight(), pcSPS->getMaxCUDepth() ); 1013 pcPicOrg->nonlinearDepthBackward(pcPicPow, m_fDepthPower); 1014 rpcTVideoIOYuvReconFile->write( pcPicPow, m_aiPad ); 1015 // to do destroy pcPicow 1016 } else 1017 #endif 930 1018 rpcTVideoIOYuvReconFile->write( i->second, m_aiPad ); 931 1019 rcMap.erase( i ); … … 1177 1265 #endif 1178 1266 1267 #if POZNAN_SYNTH 1268 Void TAppEncTop::xStoreSynthPicsInBuffer(Int iCoddedViewIdx,Bool bDepth) 1269 { 1270 Int iCurPoc; 1271 if(bDepth) 1272 { 1273 iCurPoc = m_acTEncDepthTopList[ iCoddedViewIdx ]->getNextFrameId(); 1274 if (!(m_acTEncDepthTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1275 } 1276 else 1277 { 1278 iCurPoc = m_acTEncTopList[ iCoddedViewIdx ]->getNextFrameId(); 1279 if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1280 } 1281 1282 Int iNumberOfReferenceViews = 0; 1283 Int iNearestViewIdx = -1; 1284 Bool bRenderFromLeft; 1285 1286 Int iRelDistToLeft; 1287 if(iCoddedViewIdx==0) //First on View Coded List 1288 { 1289 //TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, false ); 1290 return; 1291 } 1292 m_cCameraData.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft); 1293 1294 m_cAvailabilityRenderer.setShiftLUTs( 1295 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 1296 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1297 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1298 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 1299 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1300 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1301 iRelDistToLeft 1302 ); 1303 1304 1305 TComPicYuv* pcPicYuvERView = new TComPicYuv; 1306 pcPicYuvERView->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1307 1308 TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, bDepth ); 1309 pcPic->addSynthesisBuffer(); 1310 pcPic->addAvailabilityBuffer(); 1311 // usun to i wykorzystaj synteze która robi krzysztof dla glebi - tylko najpierw ja przeson przed kodowanie tekstury //to do 1312 /* 1313 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1314 if(!bDepth) 1315 { 1316 pcPic->addSynthesisDepthBuffer(); 1317 TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 1318 m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPic->getPicYuvAvail(), bRenderFromLeft ); 1319 #if POZNAN_OUTPUT_SYNTH 1320 Char acFilenameBaseD[1024]; 1321 //printf("\niNearestViewIdx: %d, iCurPoc: %d, bRenderFromLeft: %s\n", iNearestViewIdx, iCurPoc, (bRenderFromLeft)?"true":"false"); 1322 ::sprintf( acFilenameBaseD, "SynthInputDepth_%s_V%d.yuv", ( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1323 xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec()->dump(acFilenameBaseD, iCurPoc!=0); 1324 ::sprintf( acFilenameBaseD, "SynthDepth_%s_V%d.yuv", ( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1325 pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0); 1326 #endif 1327 } 1328 #endif//*/ 1329 TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth(); 1330 TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail(); 1331 1332 //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft ); 1333 m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, bDepth )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft ); 1334 1335 pcPicYuvAvailView->setBorderExtension( false );//Needed?? 1336 pcPicYuvAvailView->extendPicBorder();//Needed?? 1337 1338 pcPicYuvSynthView->setBorderExtension( false );//Needed?? 1339 pcPicYuvSynthView->extendPicBorder();//Needed?? 1340 1341 //TComPic* pcPicDepth = xGetPicFromView( iCoddedViewIdx, iCurPoc, true ); 1342 //pcPicDepth->addAvailabilityBuffer(); 1343 //pcPicDepth->addSynthesisBuffer(); 1344 //pcPicYuvAvailView->copyToPic(pcPicDepth->getPicYuvAvail()); 1345 1346 #if POZNAN_OUTPUT_AVAILABLE_MAP 1347 { 1348 Char acFilenameBase[1024]; 1349 ::sprintf( acFilenameBase, "Available_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1350 pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0); 1351 } 1352 #endif 1353 #if POZNAN_OUTPUT_SYNTH 1354 { 1355 Char acFilenameBase[1024]; 1356 ::sprintf( acFilenameBase, "Synth_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1357 pcPicYuvERView->dump(acFilenameBase, iCurPoc!=0); 1358 } 1359 #endif 1360 1361 //Usun pcPicYuvERView i inne bufforki 1362 } 1363 #endif 1364 1365 //* 1366 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1367 Void TAppEncTop::xStoreDepthSynthPicsInBuffer(Int iCoddedViewIdx) 1368 { 1369 Int iLeftViewIdx = -1; 1370 Int iRightViewIdx = -1; 1371 Int iNearestViewIdx = -1; 1372 Bool bRenderFromLeft; 1373 1374 Int iCurPoc = m_acTEncTopList[ iCoddedViewIdx ]->getNextFrameId(); 1375 if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1376 1377 Int iRelDistToLeft = 128; 1378 if(iCoddedViewIdx==0) //First on View Coded List 1379 { 1380 //TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false ); 1381 return; 1382 } 1383 iNearestViewIdx = 0; 1384 //bRenderFromLeft = iCoddedViewOrderIdx>0?true:false; 1385 //bRenderFromLeft = iCoddedViewOrderIdx<0?true:false; 1386 //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft); 1387 bRenderFromLeft = iCoddedViewIdx>1?true:false; 1388 1389 m_cAvailabilityRenderer.setShiftLUTs( 1390 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 1391 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1392 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1393 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 1394 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1395 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1396 iRelDistToLeft 1397 ); 1398 1399 TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false ); 1400 1401 TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 1402 if(!pcPicYuvSynthDepthView) 1403 { 1404 pcPic->addSynthesisDepthBuffer(); 1405 pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 1406 } 1407 1408 Int iWidth = pcPicYuvSynthDepthView->getWidth (); 1409 Int iHeight = pcPicYuvSynthDepthView->getHeight (); 1410 UInt uiMaxCuWidth = pcPicYuvSynthDepthView->getMaxCuWidth (); 1411 UInt uiMaxCuHeight = pcPicYuvSynthDepthView->getMaxCuHeight(); 1412 UInt uiMaxCuDepth = pcPicYuvSynthDepthView->getMaxCuDepth (); 1413 1414 TComPicYuv* pcPicYuvAvailView = new TComPicYuv; 1415 pcPicYuvAvailView->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 1416 1417 m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPicYuvAvailView, bRenderFromLeft ); 1418 1419 pcPicYuvAvailView->destroy(); 1420 delete pcPicYuvAvailView; 1421 1422 #if POZNAN_OUTPUT_SYNTH 1423 Char acFilenameBaseD[1024]; 1424 //printf("\niNearestViewIdx: %d, iCurPoc: %d, bRenderFromLeft: %s\n", iNearestViewIdx, iCurPoc, (bRenderFromLeft)?"true":"false"); 1425 ::sprintf( acFilenameBaseD, "SynthInputDepth_%s_V%d.yuv", ( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1426 getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec()->dump(acFilenameBaseD, iCurPoc!=0); 1427 ::sprintf( acFilenameBaseD, "SynthDepth_%s_V%d.yuv", ( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1428 pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0); 1429 #endif 1430 1431 } 1432 #endif//*/ 1433 1434 1179 1435 #if HHI_INTERVIEW_SKIP 1180 1436 Void TAppEncTop::getUsedPelsMap( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedSplsMap ) -
branches/0.3-poznan-univ/source/App/TAppEncoder/TAppEncTop.h
r5 r28 51 51 //GT VSO end 52 52 53 #if POZNAN_MP 54 #include "../../Lib/TLibCommon/TComMP.h" 55 #endif 56 53 57 // ==================================================================================================================== 54 58 // Class definition … … 92 96 #endif 93 97 98 #if POZNAN_SYNTH 99 TRenTop m_cAvailabilityRenderer; 100 #endif 101 102 #if POZNAN_MP 103 TComMP* m_pcMP; 104 #endif 94 105 protected: 95 106 // initialization … … 145 156 #endif 146 157 158 #if POZNAN_MP 159 TComMP* getMP() {return m_pcMP;} 160 #endif 161 147 162 #if HHI_VSO 148 163 private: … … 155 170 #endif 156 171 172 173 #if POZNAN_SYNTH 174 private: 175 Void xStoreSynthPicsInBuffer(Int iCoddedViewIdx, Bool bDepth); 176 #endif 177 178 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 179 private: 180 Void xStoreDepthSynthPicsInBuffer(Int iCoddedViewIdx); 181 #endif 182 157 183 };// END CLASS DEFINITION TAppEncTop 158 184
Note: See TracChangeset for help on using the changeset viewer.