Changeset 12 in 3DVCSoftware for branches/0.2-poznan-univ/source/App
- Timestamp:
- 6 Feb 2012, 00:52:17 (13 years ago)
- Location:
- branches/0.2-poznan-univ/source/App
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp
r11 r12 76 76 77 77 radLUT [ uiSourceView ][ uiTargetView ] = new Double*[ 2 ]; 78 radLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ 257];79 radLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ 257];78 radLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Double [ SizeOfLUT+1 ]; 79 radLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Double [ SizeOfLUT+1 ]; 80 80 81 81 raiLUT [ uiSourceView ][ uiTargetView ] = new Int* [ 2 ]; 82 raiLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Int [ 257];83 raiLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Int [ 257];82 raiLUT [ uiSourceView ][ uiTargetView ][ 0 ] = new Int [ SizeOfLUT+1 ]; 83 raiLUT [ uiSourceView ][ uiTargetView ][ 1 ] = new Int [ SizeOfLUT+1 ]; 84 84 } 85 85 } … … 877 877 radShiftParams[ uiSourceView][ uiTargetView ][ 1 ] = dOffset; 878 878 879 for( UInt uiDepthValue = 0; uiDepthValue < 256; uiDepthValue++ ) 880 { 879 #if POZNAN_NONLINEAR_DEPTH 880 TComPowerConverter power(m_fDepthPower, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0); 881 #endif 882 883 for( UInt uiDepthValue = 0; uiDepthValue < SizeOfLUT; uiDepthValue++ ) 884 { 885 Double dDepthValue = (Double)uiDepthValue; 886 Int64 iDepthValue = (Int64)uiDepthValue; 887 #if POZNAN_NONLINEAR_DEPTH 888 dDepthValue = power(dDepthValue); 889 iDepthValue = (Int64)(dDepthValue+0.5); 890 #endif 891 #if POZNAN_LUT_INCREASED_PRECISION 892 dDepthValue /= (1<<g_uiBitIncrement); 893 #endif 881 894 // real-valued look-up tables 882 Double dShiftLuma = ( (Double)uiDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision ); 895 896 Double dShiftLuma = ( dDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision ); 883 897 Double dShiftChroma = dShiftLuma / 2; 884 898 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma; … … 886 900 887 901 // integer-valued look-up tables 888 Int64 iTempScale = (Int64)uiDepthValue * iScale; 902 //Int64 iDepthValue = (Int64)uiDepthValue; 903 Int64 iTempScale = iDepthValue * iScale; 904 #if POZNAN_LUT_INCREASED_PRECISION 905 iTempScale >>= g_uiBitIncrement; 906 #endif 889 907 Int64 iTestScale = ( iTempScale + iOffset ); // for checking accuracy of camera parameters 890 908 Int64 iShiftLuma = ( iTempScale + iOffsetLuma ) >> iLog2DivLuma; … … 899 917 } 900 918 901 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255];902 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255];903 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ 255];904 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 256 ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ 255];919 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT-1 ]; 920 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT-1 ]; 921 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT-1 ]; 922 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT-1 ]; 905 923 } 906 924 } … … 1232 1250 Char* pchSynthViewNumbers, 1233 1251 std::vector<Int>* paiSynthViewNumbers, 1234 Int iLog2Precision ) 1252 Int iLog2Precision 1253 #if POZNAN_NONLINEAR_DEPTH 1254 ,Float fDepthPower 1255 #endif 1256 ) 1235 1257 { 1236 1258 //===== set miscellaneous variables ===== … … 1240 1262 m_uiCamParsCodedPrecision = uiCodedCamParsPrecision; 1241 1263 m_iLog2Precision = iLog2Precision; 1264 1265 #if POZNAN_NONLINEAR_DEPTH 1266 m_fDepthPower = fDepthPower; 1267 #endif 1242 1268 1243 1269 xReadCameraParameterFile( pchCfgFileName ); … … 1339 1365 } 1340 1366 1367 xReadCameraParameterFile( pchCfgFileName ); 1368 1369 m_bSetupFromCoded = ( m_aadCameraParameters[ 0 ].size() == 2 ); 1370 1371 if ( m_bSetupFromCoded ) 1372 { 1373 std::cout << "Detected decoded camera parameter file. Overwriting base view settings from cfg file. " << std::endl; 1374 xSetupBaseViewsFromCoded(); 1375 } 1376 else 1377 { 1378 xSetupBaseViews( pchBaseViewNumbers, uiNumBaseViews ); 1379 } 1380 1381 //===== set derived parameters ===== 1382 xGetViewOrderIndices( m_aiBaseId2SortedId, m_aiViewOrderIndex ); 1383 m_bCamParsVaryOverTime = xGetCamParsChangeFlag(); 1384 1385 1386 //===== create arrays ===== 1387 xCreateLUTs ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT, m_adBaseViewShiftParameter, m_aiBaseViewShiftParameter ); 1388 xCreateLUTs ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfSynthViews, m_adSynthViewShiftLUT, m_aiSynthViewShiftLUT, m_adSynthViewShiftParameter, m_aiSynthViewShiftParameter ); 1389 xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_aaiCodedScale ); 1390 xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_aaiCodedOffset ); 1391 xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_aaiScaleAndOffsetSet ); 1392 xInit2dArray ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_aaiScaleAndOffsetSet, 0 ); 1393 1394 xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_aaiPdmScaleNomDelta ); 1395 xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews, m_aaiPdmOffset ); 1396 1397 //===== init disparity to virtual depth conversion parameters ===== 1398 xSetPdmConversionParams(); 1399 1400 //===== init arrays for first frame ===== 1401 xSetShiftParametersAndLUT( m_uiFirstFrameId ); 1402 } 1403 #endif//*/ 1404 1341 1405 Void 1342 1406 TAppComCamPara::check( Bool bCheckViewRange, Bool bCheckFrameRange ) … … 1456 1520 } 1457 1521 1458 #if POZNAN_ SYNTH1522 #if POZNAN_CU_SYNTH||POZNAN_CU_SKIP 1459 1523 Bool 1460 1524 TAppComCamPara::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft) -
branches/0.2-poznan-univ/source/App/TAppCommon/TAppComCamPara.h
r11 r12 104 104 Int**** m_aiSynthViewShiftLUT; ///< Disparity LUT 105 105 106 #if POZNAN_NONLINEAR_DEPTH 107 Float m_fDepthPower; 108 #endif 106 109 107 110 protected: … … 161 164 Char* pchSynthViewNumbers, 162 165 std::vector<Int>* paiSynthViewNumbers, 163 Int iLog2Precision ); 166 Int iLog2Precision 167 #if POZNAN_NONLINEAR_DEPTH 168 ,Float fDepthPower 169 #endif 170 ); 164 171 165 172 Void init ( UInt uiInputBitDepth, … … 170 177 std::vector<Int>* paiSynthViewNumbers, 171 178 Int iLog2Precision 179 #if POZNAN_NONLINEAR_DEPTH 180 ,Float fDepthPower 181 #endif 172 182 ); 173 183 … … 182 192 Int synthRelNum2Idx ( Int iRelNum ); 183 193 Bool getLeftRightBaseView( Int iSynthViewIdx, Int &riLeftViewIdx, Int &riRightViewIdx, Int &riRelDistToLeft, Bool& rbIsBaseView ); 184 #if POZNAN_ SYNTH194 #if POZNAN_CU_SYNTH||POZNAN_CU_SKIP 185 195 Bool getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft); 186 196 #endif … … 189 199 UInt getCurFrameId () { return m_iCurrentFrameId; } 190 200 static Void convertNumberString ( Char* pchViewNumberString, std::vector<Int>& raiViewNumbers, Double dViewNumPrec ); 201 202 #if POZNAN_MP 203 Bool isLeftView( Int iSynthViewIdx, Int iNearestViewIdx); 204 #endif 191 205 192 206 // function for getting parameters and parameter arrays -
branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp
r11 r12 64 64 // m_iPOCLastDisplay = -1; 65 65 m_pScaleOffsetFile = 0; 66 67 #if POZNAN_MP 68 m_pcMP = NULL; 69 #endif 66 70 } 67 71 … … 71 75 72 76 m_apcBitstream->create( BITS_BUF_SIZE ); 77 78 #if POZNAN_MP 79 m_pcMP = new TComMP(); 80 #endif 73 81 } 74 82 … … 89 97 free(m_pchReconFile); 90 98 } 99 100 #if POZNAN_MP 101 if(m_pcMP) { delete m_pcMP; m_pcMP = NULL; }; 102 #endif 91 103 } 92 104 … … 163 175 if( eNalUnitType == NAL_UNIT_SPS ) 164 176 { 165 #if POZNAN_ SYNTH177 #if POZNAN_CU_SKIP||POZNAN_CU_SYNTH 166 178 if(cComSPS.getViewId()==0 && !cComSPS.isDepth()) // it should be called at first view at the begining of the stream 167 179 initRenderer(cComSPS); … … 416 428 if ( m_pchReconFile ) 417 429 { 430 431 #if POZNAN_NONLINEAR_DEPTH 432 TComSPS* pcSPS = pcPic->getSlice(0)->getSPS(); 433 TComPicYuv cPicPower; 434 435 //pcPic->getPicYuvRec() 436 cPicPower.create(pcSPS->getWidth(), pcSPS->getHeight(), pcSPS->getMaxCUWidth(), pcSPS->getMaxCUHeight(), pcSPS->getMaxCUDepth() ); 437 438 pcPic->getPicYuvRec()->power(&cPicPower, 1.0f/pcSPS->getDepthPower()); 439 440 m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write(&cPicPower, pcSPS->getPad()); 441 cPicPower.destroy(); 442 #else 418 443 m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write( pcPic->getPicYuvRec(), pcPic->getSlice(0)->getSPS()->getPad() ); 444 #endif 419 445 } 420 446 … … 544 570 } 545 571 546 #if POZNAN_ SYNTH572 #if POZNAN_CU_SYNTH || POZNAN_CU_SKIP 547 573 Void TAppDecTop::initRenderer(TComSPS &cComSPS) 548 574 { … … 566 592 iNearestViewIdx = 0; 567 593 bRenderFromLeft = iCoddedViewOrderIdx>0?true:false; 568 //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft);569 594 570 595 m_cAvailabilityRenderer.setShiftLUTs( … … 592 617 pcPicYuvAvailView = pcPic->getPicYuvAvail(); 593 618 } 619 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 620 TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 621 if(!pcPicYuvSynthDepthView) 622 { 623 pcPic->addSynthesisDepthBuffer(); 624 pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 625 } 626 m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPicYuvAvailView, bRenderFromLeft ); 627 628 #if POZNAN_OUTPUT_SYNTH 629 Char acFilenameBaseD[1024]; 630 ::sprintf( acFilenameBaseD, "SynthDepth_%s_V%d.yuv", ( true ? "Dec" : "Enc" ),iCoddedViewIdx ); 631 pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0); 632 #endif 633 #endif 594 634 595 635 //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft ); 596 636 m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft ); 597 637 598 638 pcPicYuvAvailView->setBorderExtension( false );//Needed?? 599 639 pcPicYuvAvailView->extendPicBorder();//Needed?? … … 613 653 } 614 654 #endif 615 616 } 617 #endif 655 656 }//*/ 657 #endif -
branches/0.2-poznan-univ/source/App/TAppDecoder/TAppDecTop.h
r11 r12 52 52 #include "../../Lib/TLibCommon/TComDepthMapGenerator.h" 53 53 #include "../../Lib/TLibDecoder/TDecTop.h" 54 #if POZNAN_ SYNTH54 #if POZNAN_CU_SKIP || POZNAN_CU_SYNTH 55 55 #include "../../Lib/TLibRenderer/TRenTop.h" 56 56 #endif 57 57 #include "TAppDecCfg.h" 58 59 #if POZNAN_MP 60 #include "../../Lib/TLibCommon/TComMP.h" 61 #endif 58 62 59 63 // ==================================================================================================================== … … 90 94 #endif 91 95 92 #if POZNAN_ SYNTH96 #if POZNAN_CU_SKIP || POZNAN_CU_SYNTH 93 97 TRenTop m_cAvailabilityRenderer; 94 98 #endif 95 99 100 #if POZNAN_MP 101 TComMP* m_pcMP; 102 #endif 96 103 97 104 public: … … 105 112 Void startUsingDepth() ; 106 113 107 #if POZNAN_ SYNTH114 #if POZNAN_CU_SKIP || POZNAN_CU_SYNTH 108 115 Void initRenderer(TComSPS &cComSPS); 109 116 Void storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth); … … 120 127 #endif 121 128 129 #if POZNAN_MP 130 TComMP* getMP() { return m_pcMP; } 131 #endif 132 122 133 protected: 123 134 Void xCreateDecLib (); ///< create internal classes -
branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncCfg.cpp
r5 r12 127 127 #endif 128 128 129 #if POZNAN_STAT_JK 130 for(Int i = 0; i< m_pchStatFileList.size(); i++ ) 131 { 132 if ( m_pchStatFileList[i] != NULL ) 133 free (m_pchStatFileList[i]); 134 } 135 136 for(Int i = 0; i< m_pchDepthStatFileList.size(); i++ ) 137 { 138 if ( m_pchDepthStatFileList[i] != NULL ) 139 free (m_pchDepthStatFileList[i]); 140 } 141 #endif 142 129 143 } 130 144 … … 346 360 #endif 347 361 #endif 362 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 363 ("textureCuDeltaQpOffset", m_dTextureCuDeltaQpOffset, (Double)(-2.6), "texture block QP changing tool based on coresponding depth block values - offset parameter" ) 364 ("textureCuDeltaQpMul", m_dTextureCuDeltaQpMul, (Double)(1), "texture block QP changing tool based on coresponding depth block values - multiplicative parameter" ) 365 ("textureCuDeltaQpOffsetTopBottomRow", m_iTextureCuDeltaQpTopBottomRow, (Int)2, "texture block QP changing tool - top and bottom CU rows delta QP parameter" ) 366 #endif 367 #if POZNAN_NONLINEAR_DEPTH 368 ("DepthPower,-dpow", m_fDepthPower, 1.0, "Depth power value (for non-linear processing)") 369 #endif 370 348 371 349 372 /* Compatability with old style -1 FOO or -0 FOO options. */ 350 373 ("1", doOldStyleCmdlineOn, "turn option <name> on") 351 374 ("0", doOldStyleCmdlineOff, "turn option <name> off") 375 376 #if POZNAN_STAT_JK 377 ("StatFile_%d,sf_%d", m_pchStatFileList, (char *) 0 , MAX_INPUT_VIEW_NUM , "Mode selection staticstics file name for view %d") 378 ("DepthStatFile_%d,sf_%d", m_pchDepthStatFileList, (char *) 0 , MAX_INPUT_VIEW_NUM , "Mode selection staticstics file name for depth view %d") 379 #endif 352 380 ; 353 381 … … 396 424 // GT FIX END 397 425 426 #if POZNAN_STAT_JK 427 if ( m_bUsingDepthMaps ) 428 { 429 for(Int i = 0; i < m_pchDepthStatFileList.size() ; i++) 430 { 431 if ((m_pchDepthInputFileList[i] != NULL) && (m_pchStatFileList[i] != NULL) && (i < m_iNumberOfViews) ) 432 { 433 if (m_pchDepthStatFileList[i] == NULL ) 434 { 435 xAppendToFileNameEnd( m_pchStatFileList[i], "_depth", m_pchDepthStatFileList[i] ); 436 } 437 } 438 else 439 { 440 m_pchDepthStatFileList[i] = NULL; 441 } 442 }; 443 } 444 #endif 445 398 446 if (m_iRateGOPSize == -1) 399 447 { … … 431 479 #if HHI_VSO 432 480 m_bUseVSO = m_bUseVSO && m_bUsingDepthMaps && (m_uiVSOMode != 0); 481 #endif 482 483 #if POZNAN_NONLINEAR_DEPTH 484 if (m_fDepthPower<=0) 485 { 486 Float fDepthQP = m_adQP[ m_adQP.size() < 2 ? 0 : 1]; 487 m_fDepthPower = (fDepthQP-30) *0.25/20.0 + 1.25; 488 if (m_fDepthPower<=1.0) m_fDepthPower = 1.0; 489 // QP = 30 = 1.25 490 // QP = 50 = 1.5 491 if (m_fDepthPower>=1.66) m_fDepthPower = 1.66; 492 }; 493 494 #if POZNAN_NONLINEAR_DEPTH_SEND_AS_BYTE 495 m_fDepthPower = dequantizeDepthPower(quantizeDepthPower((Float)m_fDepthPower)); 496 #endif 497 433 498 #endif 434 499 … … 498 563 NULL, 499 564 m_cRenModStrParser.getSynthViews(), 500 LOG2_DISP_PREC_LUT ); 565 LOG2_DISP_PREC_LUT 566 #if POZNAN_NONLINEAR_DEPTH 567 ,m_fDepthPower 568 #endif 569 ); 501 570 } 502 571 else if ( m_bUseVSO && m_uiVSOMode != 4 ) … … 511 580 m_pchVSOConfig, 512 581 NULL, 513 LOG2_DISP_PREC_LUT ); 582 LOG2_DISP_PREC_LUT 583 #if POZNAN_NONLINEAR_DEPTH 584 ,m_fDepthPower 585 #endif 586 ); 514 587 } 515 588 else … … 524 597 NULL, 525 598 NULL, 526 LOG2_DISP_PREC_LUT ); 599 LOG2_DISP_PREC_LUT 600 #if POZNAN_NONLINEAR_DEPTH 601 ,m_fDepthPower 602 #endif 603 ); 527 604 } 528 605 #else … … 536 613 NULL, 537 614 NULL, 538 LOG2_DISP_PREC_LUT ); 615 LOG2_DISP_PREC_LUT 616 #if POZNAN_NONLINEAR_DEPTH 617 ,m_fDepthPower 618 #endif 619 ); 539 620 #endif 540 621 … … 668 749 } 669 750 #endif 751 #if POZNAN_NONLINEAR_DEPTH 752 printf("Depth map power : %f\n", m_fDepthPower ); 753 #endif 670 754 } 671 755 … … 820 904 printf("Reconstruction Depth File %i : %s\n", iCounter, m_pchDepthReconFileList[iCounter]); 821 905 } 906 #if POZNAN_STAT_JK 907 for( Int iCounter = 0; iCounter<m_iNumberOfViews; iCounter++) 908 { 909 printf("Statistics File %i : %s\n", iCounter, m_pchStatFileList[iCounter]); 910 } 911 for( Int iCounter = 0; iCounter<m_iNumberOfViews; iCounter++) 912 { 913 printf("Statistics Depth File %i : %s\n", iCounter, m_pchDepthStatFileList[iCounter]); 914 } 915 #endif 822 916 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_aiPad[0], m_iSourceHeight-m_aiPad[1], m_iFrameRate ); 823 917 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); … … 912 1006 #if MTK_SAO 913 1007 #endif 1008 1009 #if POZNAN_MP 1010 printf("POZNAN_MP(1){ "); 1011 1012 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 1013 printf("dmg=1 "); 1014 #else 1015 printf("dmg=0 "); 1016 #endif 1017 1018 #if POZNAN_MP_FILL 1019 printf("fill=%d ",POZNAN_MP_FILL_TYPE); 1020 #else 1021 printf("fill=- "); 1022 #endif 1023 1024 #if POZNAN_EIVD 1025 printf("EIVD(1): "); 1026 printf("cand=%d ",POZNAN_EIVD_MERGE_POS); 1027 #if POZNAN_EIVD_CALC_PRED_DATA 1028 printf("pr=1 "); 1029 #else 1030 printf("pr=0 "); 1031 #endif 1032 #if POZNAN_EIVD_COMPRESS_ME_DATA 1033 printf("comp=1 "); 1034 #else 1035 printf("comp=0 "); 1036 #endif 1037 #if POZNAN_EIVD_USE_IN_NONANCHOR_PIC_ONLY 1038 printf("na=1 "); 1039 #else 1040 printf("na=0 "); 1041 #endif 1042 #else 1043 printf("EIVD(0) "); 1044 #endif 1045 printf("}"); 1046 #else 1047 printf("POZNAN_MP(0) "); 1048 #endif 1049 914 1050 printf("\n"); 915 1051 printf("TOOL CFG VIDEO : "); … … 933 1069 #endif 934 1070 printf("\n"); 1071 1072 1073 printf("POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH("); 1074 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1075 printf("1), "); 1076 #else 1077 printf("0), "); 1078 #endif 935 1079 936 1080 fflush(stdout); -
branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncCfg.h
r5 r12 271 271 TRenModSetupStrParser m_cRenModStrParser; 272 272 #endif 273 274 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 275 Double m_dTextureCuDeltaQpOffset; 276 Double m_dTextureCuDeltaQpMul; 277 Int m_iTextureCuDeltaQpTopBottomRow; 278 #endif 279 280 #if POZNAN_NONLINEAR_DEPTH 281 Double m_fDepthPower; ///< Depth power value 282 #endif 283 284 #if POZNAN_STAT_JK 285 std::vector<char*> m_pchStatFileList; ///< texure statistics file names 286 std::vector<char*> m_pchDepthStatFileList; ///< depth statistics file names 287 #endif 288 273 289 public: 274 290 -
branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp
r11 r12 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 … … 222 226 m_acTEncTopList[iViewIdx]->setQpChangeOffsetVideo( m_iQpChangeOffsetVideo ); 223 227 m_acTEncTopList[iViewIdx]->setQpChangeOffsetDepth( m_iQpChangeOffsetDepth ); 228 229 230 #if POZNAN_TEXTURE_TU_DELTA_QP_PARAM_IN_CFG_FOR_ENC 231 m_acTEncTopList[iViewIdx]->setTextureCuDeltaQpOffset( m_dTextureCuDeltaQpOffset ); 232 m_acTEncTopList[iViewIdx]->setTextureCuDeltaQpMul( m_dTextureCuDeltaQpMul ); 233 m_acTEncTopList[iViewIdx]->setTextureCuDeltaQpTopBottomRow( m_iTextureCuDeltaQpTopBottomRow ); 234 #endif 224 235 } 225 236 if( m_bUsingDepthMaps ) … … 382 393 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 383 394 #endif 395 #if POZNAN_NONLINEAR_DEPTH 396 m_acTEncDepthTopList[iViewIdx]->setDepthPower ( (Float)m_fDepthPower ); 397 #endif 384 398 385 399 m_acTEncDepthTopList[iViewIdx]->setPictureDigestEnabled(m_pictureDigestEnabled); … … 435 449 #endif 436 450 437 #if POZNAN_ SYNTH451 #if POZNAN_CU_SYNTH||POZNAN_CU_SKIP 438 452 //m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,0,true, 0,0,0,0,0,0,0,1,0,0 ); //GT: simplest configuration 439 453 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 … … 443 457 m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 ); 444 458 #endif 459 460 #if POZNAN_MP 461 #if POZNAN_MP_USE_DEPTH_MAP_GENERATION 462 m_pcMP = new TComMP(m_iSourceHeight, m_iSourceWidth); 463 #else 464 //m_pcMP = new TComMP(m_iSourceHeight, m_iSourceWidth, &m_cCameraData); 465 m_pcMP = new TComMP(m_iSourceHeight, m_iSourceWidth, m_cCameraData.getBaseViewShiftLUTI()); 466 #endif 467 #endif 468 445 469 } 446 470 … … 484 508 } 485 509 #endif 510 511 #if POZNAN_STAT_JK 512 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++) 513 { 514 if(m_pchStatFileList[iViewIdx] != NULL) m_cStatFileList.push_back(fopen(m_pchStatFileList[iViewIdx],"w")); 515 else m_cStatFileList.push_back(NULL); 516 517 if ( m_bUsingDepthMaps && m_pchDepthStatFileList[iViewIdx] != NULL) m_cDepthStatFileList.push_back(fopen(m_pchDepthStatFileList[iViewIdx],"w")); 518 else m_cDepthStatFileList.push_back(NULL); 519 } 520 #endif 521 486 522 } 487 523 … … 490 526 491 527 m_cTVideoIOBitsFile.closeBits(); 528 529 #if POZNAN_MP 530 if (m_pcMP) { delete m_pcMP; m_pcMP=NULL; }; 531 #endif 532 533 #if POZNAN_STAT_JK 534 for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfExternalRefs; iViewIdx++ ) 535 { 536 if(m_cStatFileList[iViewIdx]) {fclose(m_cStatFileList[iViewIdx]); m_cStatFileList[iViewIdx]=NULL;} 537 if(m_cDepthStatFileList[iViewIdx]) {fclose(m_cDepthStatFileList[iViewIdx]); m_cDepthStatFileList[iViewIdx]=NULL;} 538 } 539 #endif 492 540 493 541 #if HHI_VSO … … 545 593 m_acTEncTopList[iViewIdx]->setTEncTopList( &m_acTEncTopList ); 546 594 } 595 #if POZNAN_STAT_JK 596 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 597 { 598 m_acTEncTopList[iViewIdx]->setStatFile(m_cStatFileList[iViewIdx]);//JK 599 } 600 #endif 547 601 if ( m_bUsingDepthMaps ) 548 602 { … … 555 609 m_acTEncDepthTopList[iViewIdx]->setTEncTopList( &m_acTEncDepthTopList ); 556 610 } 611 #if POZNAN_STAT_JK 612 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 613 { 614 m_acTEncDepthTopList[iViewIdx]->setStatFile(m_cDepthStatFileList[iViewIdx]);//JK 615 } 616 #endif 557 617 } 558 618 } … … 645 705 { 646 706 m_acTVideoIOYuvDepthInputFileList[iViewIdx]->read( pcPdmDepthOrg, m_aiPad, m_bUsingDepthMaps ); 707 #if POZNAN_NONLINEAR_DEPTH 708 pcPdmDepthOrg->power(pcPdmDepthOrg, m_fDepthPower); 709 #endif 647 710 } 648 711 #endif … … 666 729 // read input YUV file 667 730 m_acTVideoIOYuvDepthInputFileList[iViewIdx]->read( pcDepthPicYuvOrg, m_aiPad ) ; 731 #if POZNAN_NONLINEAR_DEPTH 732 pcDepthPicYuvOrg->power(pcDepthPicYuvOrg, m_fDepthPower); 733 #endif 668 734 bDepthEos[iViewIdx] = ( m_acTVideoIOYuvDepthInputFileList[iViewIdx]->isEof() == 1 ? true : false ); 669 735 bDepthEos[iViewIdx] = ( m_iDepthFrameRcvdVector[iViewIdx] == (m_iFrameToBeEncoded - 1) ? true : bDepthEos[iViewIdx] ); … … 697 763 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) // Start encoding 698 764 { 699 #if POZNAN_ SYNTH765 #if POZNAN_CU_SYNTH||POZNAN_CU_SKIP 700 766 xStoreSynthPicsInBuffer(iViewIdx,false); 701 767 #endif … … 716 782 if( m_bUsingDepthMaps ) 717 783 { 718 #if POZNAN_ SYNTH784 #if POZNAN_CU_SYNTH||POZNAN_CU_SKIP 719 785 xStoreSynthPicsInBuffer(iViewIdx,true); 720 786 #endif … … 939 1005 { 940 1006 riNextPocToDump++; 1007 #if POZNAN_NONLINEAR_DEPTH 1008 if(isDepth) 1009 { 1010 TComPicYuv *pcPicOrg = i->second; 1011 TComPicYuv *pcPicPow = new TComPicYuv; 1012 //pcPicYuvRec->createCompatibleAs(*iterPicYuvRec); 1013 pcPicPow->create( pcPicOrg->getWidth(), pcPicOrg->getHeight(), pcPicOrg->getMaxCuWidth(), pcPicOrg->getMaxCuHeight(), pcPicOrg->getMaxCuDepth() ); 1014 //cPicPower.create(pcSPS->getWidth(), pcSPS->getHeight(), pcSPS->getMaxCUWidth(), pcSPS->getMaxCUHeight(), pcSPS->getMaxCUDepth() ); 1015 pcPicOrg->power(pcPicPow, (Float)(1.0/m_fDepthPower)); 1016 rpcTVideoIOYuvReconFile->write( pcPicPow, m_aiPad ); 1017 } else 1018 #endif 941 1019 rpcTVideoIOYuvReconFile->write( i->second, m_aiPad ); 942 1020 rcMap.erase( i ); … … 1188 1266 #endif 1189 1267 1190 #if POZNAN_ SYNTH1191 Void TAppEncTop::xStoreSynthPicsInBuffer(Int iCoddedViewIdx, Bool bDepth)1268 #if POZNAN_CU_SYNTH||POZNAN_CU_SKIP 1269 Void TAppEncTop::xStoreSynthPicsInBuffer(Int iCoddedViewIdx, Bool bDepth) 1192 1270 { 1193 1271 Int iCurPoc; … … 1200 1278 { 1201 1279 iCurPoc = m_acTEncTopList[ iCoddedViewIdx ]->getNextFrameId(); 1202 if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1203 } 1204 1280 if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1281 1205 1282 Int iNumberOfReferenceViews = 0; 1206 1283 UInt iSynthViewIdx; … … 1221 1298 1222 1299 m_cAvailabilityRenderer.setShiftLUTs( 1223 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 1224 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1225 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1226 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 1227 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1228 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1229 iRelDistToLeft 1230 ); 1231 1300 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 1301 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1302 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1303 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 1304 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1305 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1306 iRelDistToLeft 1307 ); 1232 1308 1233 1309 TComPicYuv* pcPicYuvERView = new TComPicYuv; 1234 1310 pcPicYuvERView->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1235 1236 1311 TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, bDepth ); 1237 1312 pcPic->addSynthesisBuffer(); 1238 1313 pcPic->addAvailabilityBuffer(); 1314 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 1315 pcPic->addSynthesisDepthBuffer(); 1316 TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 1317 m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPic->getPicYuvAvail(), bRenderFromLeft ); 1318 #if POZNAN_OUTPUT_SYNTH 1319 Char acFilenameBaseD[1024]; 1320 ::sprintf( acFilenameBaseD, "SynthDepth_%s_V%d.yuv", ( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1321 pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0); 1322 #endif 1323 #endif 1239 1324 TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth(); 1240 1325 TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail(); 1241 1242 1326 //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft ); 1243 1327 m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, bDepth )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft ); … … 1256 1340 #if POZNAN_OUTPUT_AVAILABLE_MAP 1257 1341 { 1258 Char acFilenameBase[1024];1259 ::sprintf( acFilenameBase, "Available_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx );1260 pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0);1342 Char acFilenameBase[1024]; 1343 ::sprintf( acFilenameBase, "Available_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1344 pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0); 1261 1345 } 1262 1346 #endif … … 1268 1352 } 1269 1353 #endif 1270 1271 //Usun pcPicYuvERView i inne bufforki1272 1354 } 1273 1355 #endif -
branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.h
r11 r12 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 94 #if POZNAN_ SYNTH98 #if POZNAN_CU_SKIP||POZNAN_CU_SYNTH 95 99 TRenTop m_cAvailabilityRenderer; 100 #endif 101 102 #if POZNAN_MP 103 TComMP* m_pcMP; 104 #endif 105 106 #if POZNAN_STAT_JK 107 std::vector<FILE*> m_cStatFileList; ///< texure statistics file handles 108 std::vector<FILE*> m_cDepthStatFileList; ///< depth statistics file handles 96 109 #endif 97 110 … … 149 162 #endif 150 163 164 #if POZNAN_MP 165 TComMP* getMP() {return m_pcMP;} 166 #endif 167 151 168 #if HHI_VSO 152 169 private: … … 160 177 161 178 162 #if POZNAN_ SYNTH179 #if POZNAN_CU_SYNTH 163 180 private: 164 181 Void xStoreSynthPicsInBuffer(Int iCoddedViewIdx, Bool bDepth); -
branches/0.2-poznan-univ/source/App/TAppRenderer/TAppRendererCfg.cpp
r5 r12 186 186 { 187 187 m_cCameraData.init( MAX_INPUT_VIEW_NUM, uiInputBitDepth, uiCamParPrecision, (UInt)m_iFrameSkip, (UInt)m_iFramesToBeRendered, 188 m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, NULL, NULL, m_iLog2SamplingFactor+m_iShiftPrecision ); 188 m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, NULL, NULL, m_iLog2SamplingFactor+m_iShiftPrecision 189 #if POZNAN_NONLINEAR_DEPTH 190 ,1.0f 191 #endif 192 ); 189 193 m_iNumberOfInputViews = (Int) m_cCameraData.getBaseViewNumbers() .size(); 190 194 m_iNumberOfOutputViews = m_iNumberOfInputViews - 1; … … 205 209 206 210 m_cCameraData.init( MAX_INPUT_VIEW_NUM, uiInputBitDepth, uiCamParPrecision, (UInt)m_iFrameSkip, (UInt)m_iFramesToBeRendered, 207 m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, NULL, piaTempViews, m_iLog2SamplingFactor+m_iShiftPrecision ); 211 m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, NULL, piaTempViews, m_iLog2SamplingFactor+m_iShiftPrecision 212 #if POZNAN_NONLINEAR_DEPTH 213 , 1.0f 214 #endif 215 ); 208 216 } 209 217 else 210 218 { 211 219 m_cCameraData.init( MAX_INPUT_VIEW_NUM, uiInputBitDepth, uiCamParPrecision, (UInt)m_iFrameSkip, (UInt)m_iFramesToBeRendered, 212 m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, m_pchSynthViewCameraNumbers, NULL, m_iLog2SamplingFactor+m_iShiftPrecision ); 220 m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, m_pchSynthViewCameraNumbers, NULL, m_iLog2SamplingFactor+m_iShiftPrecision 221 #if POZNAN_NONLINEAR_DEPTH 222 ,1.0f 223 #endif 224 ); 213 225 m_iNumberOfOutputViews = (Int) m_cCameraData.getSynthViewNumbers().size(); 214 226 m_iNumberOfInputViews = (Int) m_cCameraData.getBaseViewNumbers() .size();
Note: See TracChangeset for help on using the changeset viewer.