Changeset 28 in 3DVCSoftware for branches/0.3-poznan-univ/source/App
- Timestamp:
- 24 Feb 2012, 20:22:58 (13 years ago)
- Location:
- branches/0.3-poznan-univ/source/App
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp
r21 r28 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 TComNonlinearDepthBackward cNonlinearDepthBwd(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 = cNonlinearDepthBwd(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 iTempScale = iDepthValue * iScale; 903 #if POZNAN_LUT_INCREASED_PRECISION 904 iTempScale >>= g_uiBitIncrement; 905 #endif 889 906 Int64 iTestScale = ( iTempScale + iOffset ); // for checking accuracy of camera parameters 890 907 Int64 iShiftLuma = ( iTempScale + iOffsetLuma ) >> iLog2DivLuma; … … 899 916 } 900 917 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];918 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT ] = radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT-1 ]; 919 radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT ] = radLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT-1 ]; 920 raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT ] = raiLUT[ uiSourceView ][ uiTargetView ][ 0 ][ SizeOfLUT-1 ]; 921 raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT ] = raiLUT[ uiSourceView ][ uiTargetView ][ 1 ][ SizeOfLUT-1 ]; 905 922 } 906 923 } … … 1235 1252 Char* pchSynthViewNumbers, 1236 1253 std::vector<Int>* paiSynthViewNumbers, 1237 Int iLog2Precision ) 1254 Int iLog2Precision 1255 #if POZNAN_NONLINEAR_DEPTH 1256 ,Float fDepthPower 1257 #endif 1258 ) 1238 1259 { 1239 1260 //===== set miscellaneous variables ===== … … 1243 1264 m_uiCamParsCodedPrecision = uiCodedCamParsPrecision; 1244 1265 m_iLog2Precision = iLog2Precision; 1266 1267 #if POZNAN_NONLINEAR_DEPTH 1268 m_fDepthPower = fDepthPower; 1269 #endif 1245 1270 1246 1271 xReadCameraParameterFile( pchCfgFileName ); … … 1460 1485 } 1461 1486 1487 #if POZNAN_SYNTH 1488 Bool 1489 TAppComCamPara::getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft) 1490 { 1491 riNearestViewIdx = 0; 1492 1493 Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] ); 1494 Int iFactor = ( bDecencdingVN ? -1 : 1 ); 1495 1496 if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[riNearestViewIdx] ) * iFactor <= 0 ) 1497 { 1498 rbRenderFromLeft = true; 1499 } 1500 else 1501 { 1502 rbRenderFromLeft = false; 1503 } 1504 1505 riRelDistToLeft = 128; //Not used for now; 1506 1507 return true; 1508 } 1509 #endif 1510 1511 1512 1462 1513 Int TAppComCamPara::getRelDistLeft( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx ) 1463 1514 { … … 1474 1525 return xGetViewId(m_aiRelSynthViewsNum, iRelNum ); 1475 1526 } 1527 1528 1529 #if POZNAN_MP 1530 Bool 1531 TAppComCamPara::isLeftView( Int iSynthViewIdx, Int iNearestViewIdx) 1532 { 1533 Bool bDecencdingVN = ( m_aiSortedBaseViews.size() >= 2 && m_aiSortedBaseViews[ 0 ] > m_aiSortedBaseViews[ 1 ] ); 1534 Int iFactor = ( bDecencdingVN ? -1 : 1 ); 1535 1536 if( ( m_aiBaseId2SortedId[iSynthViewIdx] - m_aiBaseId2SortedId[iNearestViewIdx] ) * iFactor <= 0 ) return true; 1537 else return false; 1538 } 1539 #endif -
branches/0.3-poznan-univ/source/App/TAppCommon/TAppComCamPara.h
r5 r28 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 ); 194 #if POZNAN_SYNTH 195 Bool getNearestBaseView( Int iSynthViewIdx, Int &riNearestViewIdx, Int &riRelDistToLeft, Bool& rbRenderFromLeft); 196 #endif 197 184 198 Int getRelDistLeft ( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx ); 185 199 UInt getCurFrameId () { return m_iCurrentFrameId; } 186 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 187 205 188 206 // function for getting parameters and parameter arrays -
branches/0.3-poznan-univ/source/App/TAppDecoder/TAppDecTop.cpp
r21 r28 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 { 177 #if POZNAN_SYNTH 178 if(cComSPS.getViewId()==0 && !cComSPS.isDepth()) // it should be called at first view at the begining of the stream 179 initRenderer(cComSPS); 180 #endif 165 181 if( cComSPS.isDepth() && (m_bUsingDepth==false) ) // expected not using depth, but bitstream are using depth 166 182 { // know from sps … … 415 431 if ( m_pchReconFile ) 416 432 { 433 434 #if POZNAN_NONLINEAR_DEPTH 435 TComSPS* pcSPS = pcPic->getSlice(0)->getSPS(); 436 TComPicYuv cPicPower; 437 438 //pcPic->getPicYuvRec() 439 cPicPower.create(pcSPS->getWidth(), pcSPS->getHeight(), pcSPS->getMaxCUWidth(), pcSPS->getMaxCUHeight(), pcSPS->getMaxCUDepth() ); 440 441 pcPic->getPicYuvRec()->nonlinearDepthBackward(&cPicPower, pcSPS->getDepthPower()); 442 443 m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write(&cPicPower, pcSPS->getPad()); 444 cPicPower.destroy(); 445 #else 417 446 m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write( pcPic->getPicYuvRec(), pcPic->getSlice(0)->getSPS()->getPad() ); 447 #endif 418 448 } 419 449 … … 542 572 return pcRefPic; 543 573 } 574 575 #if POZNAN_SYNTH 576 Void TAppDecTop::initRenderer(TComSPS &cComSPS) 577 { 578 m_cAvailabilityRenderer.init(cComSPS.getWidth(), cComSPS.getHeight(),true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 ); //GT: simplest configuration 579 } 580 //* 581 Void TAppDecTop::storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc, Bool bDepth) 582 { 583 Int iLeftViewIdx = -1; 584 Int iRightViewIdx = -1; 585 Int iNearestViewIdx = -1; 586 Bool bRenderFromLeft; 587 588 Int iRelDistToLeft = 128; 589 if(iCoddedViewIdx==0) //First on View Coded List 590 { 591 //TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false ); 592 return; 593 } 594 iNearestViewIdx = 0; 595 //bRenderFromLeft = iCoddedViewOrderIdx>0?true:false; 596 //bRenderFromLeft = iCoddedViewOrderIdx<0?true:false; 597 //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft); 598 bRenderFromLeft = iCoddedViewIdx>1?true:false; 599 600 m_cAvailabilityRenderer.setShiftLUTs( 601 m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 602 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 603 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 604 m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 605 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 606 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 607 iRelDistToLeft 608 ); 609 610 TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, bDepth ); 611 612 TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth(); 613 TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail(); 614 if(!pcPicYuvSynthView) 615 { 616 pcPic->addSynthesisBuffer(); 617 pcPicYuvSynthView = pcPic->getPicYuvSynth(); 618 } 619 if(!pcPicYuvAvailView) 620 { 621 pcPic->addAvailabilityBuffer(); 622 pcPicYuvAvailView = pcPic->getPicYuvAvail(); 623 } 624 // usun i uzyj syntezy Krzysztofa tylko przesun ja przed dekodowanie tekstury to do 625 /* 626 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 627 if(!bDepth) 628 { 629 TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 630 if(!pcPicYuvSynthDepthView) 631 { 632 pcPic->addSynthesisDepthBuffer(); 633 pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 634 } 635 m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPicYuvAvailView, bRenderFromLeft ); 636 637 #if POZNAN_OUTPUT_SYNTH 638 Char acFilenameBaseD[1024]; 639 //printf("\niNearestViewIdx: %d, iCurPoc: %d, bRenderFromLeft: %s\n", iNearestViewIdx, iCurPoc, (bRenderFromLeft)?"true":"false"); 640 ::sprintf( acFilenameBaseD, "SynthInputDepth_%s_V%d.yuv", ( true ? "Dec" : "Enc" ),iCoddedViewIdx ); 641 getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec()->dump(acFilenameBaseD, iCurPoc!=0); 642 ::sprintf( acFilenameBaseD, "SynthDepth_%s_V%d.yuv", ( true ? "Dec" : "Enc" ),iCoddedViewIdx ); 643 pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0); 644 #endif 645 } 646 #endif//*/ 647 648 //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft ); 649 m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, bDepth )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft ); 650 651 pcPicYuvAvailView->setBorderExtension( false );//Needed?? 652 pcPicYuvAvailView->extendPicBorder();//Needed?? 653 654 #if POZNAN_OUTPUT_AVAILABLE_MAP 655 { 656 Char acFilenameBase[1024]; 657 ::sprintf( acFilenameBase, "Available_%s_%s_V%d.yuv", (bDepth ? "Depth":"Tex"),( true ? "Dec" : "Enc" ), iCoddedViewIdx); 658 pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0); 659 } 660 #endif 661 #if POZNAN_OUTPUT_SYNTH 662 { 663 Char acFilenameBase[1024]; 664 ::sprintf( acFilenameBase, "Synth_%s_%s_V%d.yuv", (bDepth ? "Depth":"Tex"),( true ? "Dec" : "Enc" ), iCoddedViewIdx ); 665 pcPicYuvSynthView->dump(acFilenameBase, iCurPoc!=0); 666 } 667 #endif 668 } 669 #endif 670 671 //* 672 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 673 Void TAppDecTop::storeDepthSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc) 674 { 675 Int iLeftViewIdx = -1; 676 Int iRightViewIdx = -1; 677 Int iNearestViewIdx = -1; 678 Bool bRenderFromLeft; 679 680 Int iRelDistToLeft = 128; 681 if(iCoddedViewIdx==0) //First on View Coded List 682 { 683 //TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false ); 684 return; 685 } 686 iNearestViewIdx = 0; 687 //bRenderFromLeft = iCoddedViewOrderIdx>0?true:false; 688 //bRenderFromLeft = iCoddedViewOrderIdx<0?true:false; 689 //m_cCamParsCollector.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft); 690 bRenderFromLeft = iCoddedViewIdx>1?true:false; 691 692 m_cAvailabilityRenderer.setShiftLUTs( 693 m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 694 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 695 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 696 m_cCamParsCollector.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 697 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 698 m_cCamParsCollector.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 699 iRelDistToLeft 700 ); 701 702 TComPic* pcPic = getPicFromView( iCoddedViewIdx, iCurPoc, false ); 703 704 TComPicYuv* pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 705 if(!pcPicYuvSynthDepthView) 706 { 707 pcPic->addSynthesisDepthBuffer(); 708 pcPicYuvSynthDepthView = pcPic->getPicYuvSynthDepth(); 709 } 710 711 Int iWidth = pcPicYuvSynthDepthView->getWidth (); 712 Int iHeight = pcPicYuvSynthDepthView->getHeight (); 713 UInt uiMaxCuWidth = pcPicYuvSynthDepthView->getMaxCuWidth (); 714 UInt uiMaxCuHeight = pcPicYuvSynthDepthView->getMaxCuHeight(); 715 UInt uiMaxCuDepth = pcPicYuvSynthDepthView->getMaxCuDepth (); 716 717 TComPicYuv* pcPicYuvAvailView = new TComPicYuv; 718 pcPicYuvAvailView->create( iWidth, iHeight, uiMaxCuWidth, uiMaxCuHeight, uiMaxCuDepth ); 719 720 m_cAvailabilityRenderer.extrapolateAvailabilityView( getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthDepthView, pcPicYuvAvailView, bRenderFromLeft ); 721 722 pcPicYuvAvailView->destroy(); 723 delete pcPicYuvAvailView; 724 725 #if POZNAN_OUTPUT_SYNTH 726 Char acFilenameBaseD[1024]; 727 //printf("\niNearestViewIdx: %d, iCurPoc: %d, bRenderFromLeft: %s\n", iNearestViewIdx, iCurPoc, (bRenderFromLeft)?"true":"false"); 728 ::sprintf( acFilenameBaseD, "SynthInputDepth_%s_V%d.yuv", ( true ? "Dec" : "Enc" ),iCoddedViewIdx ); 729 getPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec()->dump(acFilenameBaseD, iCurPoc!=0); 730 ::sprintf( acFilenameBaseD, "SynthDepth_%s_V%d.yuv", ( true ? "Dec" : "Enc" ),iCoddedViewIdx ); 731 pcPicYuvSynthDepthView->dump(acFilenameBaseD, iCurPoc!=0); 732 #endif 733 734 } 735 #endif//*/ -
branches/0.3-poznan-univ/source/App/TAppDecoder/TAppDecTop.h
r21 r28 52 52 #include "../../Lib/TLibCommon/TComDepthMapGenerator.h" 53 53 #include "../../Lib/TLibDecoder/TDecTop.h" 54 #if POZNAN_SYNTH 55 #include "../../Lib/TLibRenderer/TRenTop.h" 56 #endif 54 57 #include "TAppDecCfg.h" 58 59 #if POZNAN_MP 60 #include "../../Lib/TLibCommon/TComMP.h" 61 #endif 55 62 56 63 // ==================================================================================================================== … … 87 94 #endif 88 95 96 #if POZNAN_SYNTH 97 TRenTop m_cAvailabilityRenderer; 98 #endif 99 100 #if POZNAN_MP 101 TComMP* m_pcMP; 102 #endif 103 89 104 public: 90 105 TAppDecTop(); … … 97 112 Void startUsingDepth() ; 98 113 99 // GT FIX 114 #if POZNAN_SYNTH 115 Void initRenderer(TComSPS &cComSPS); 116 Void storeSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx,Int iCurPoc,Bool bDepth); 117 #endif 118 119 #if POZNAN_TEXTURE_TU_DELTA_QP_ACCORDING_TO_DEPTH 120 Void storeDepthSynthPicsInBuffer(Int iCoddedViewIdx,Int iCoddedViewOrderIdx, Int iCurPoc); 121 #endif 122 123 // GT FIX 100 124 std::vector<TComPic*> getSpatialRefPics( Int iViewIdx, Int iPoc, Bool bIsDepth ); 101 125 TComPic* getPicFromView( Int iViewIdx, Int iPoc, bool bDepth ); … … 106 130 TComAUPicAccess* getAUPicAccess() { return &m_cAUPicAccess; } 107 131 TDecTop* getDecTop0 () { return m_acTDecTopList[0]; } 132 #endif 133 134 #if POZNAN_MP 135 TComMP* getMP() { return m_pcMP; } 108 136 #endif 109 137 -
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 -
branches/0.3-poznan-univ/source/App/TAppRenderer/TAppRendererCfg.cpp
r5 r28 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.