Changeset 100 in 3DVCSoftware for trunk/source/App/TAppRenderer
- Timestamp:
- 9 Aug 2012, 12:53:16 (12 years ago)
- Location:
- trunk/source/App/TAppRenderer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppRenderer/RendererMain.cpp
r56 r100 42 42 43 43 int main(int argc, char* argv[]) 44 44 { 45 45 TAppRendererTop cTAppRendererTop; 46 46 -
trunk/source/App/TAppRenderer/TAppRendererCfg.cpp
r56 r100 53 53 // ==================================================================================================================== 54 54 55 #define MAX_INPUT_VIEW_NUM 55 #define MAX_INPUT_VIEW_NUM 10 56 56 #define MAX_OUTPUT_VIEW_NUM 64 57 57 -
trunk/source/App/TAppRenderer/TAppRendererCfg.h
r56 r100 80 80 ////camera specification //// 81 81 Char* m_pchCameraParameterFile; ///< camera parameter file 82 Char* m_pchSynthViewCameraNumbers; 82 Char* m_pchSynthViewCameraNumbers; ///< numbers of views to synthesize 83 83 Char* m_pchViewConfig; ///< String to setup renderer 84 Char* m_pchBaseViewCameraNumbers; 84 Char* m_pchBaseViewCameraNumbers; ///< numbers of base views 85 85 86 86 // derived … … 89 89 Bool m_bUseSetupString; ///< true if setup string is used 90 90 91 Int m_iNumberOfInputViews; 92 Int m_iNumberOfOutputViews; 91 Int m_iNumberOfInputViews; ///< number of input Views 92 Int m_iNumberOfOutputViews; ///< number views to synthesize 93 93 94 94 //// renderer Modes //// 95 Int m_iRenderDirection; 95 Int m_iRenderDirection; ///< 0: interpolate, 1: extrapolate from left, 2: extrapolate from right 96 96 97 97 Int m_iLog2SamplingFactor; ///< factor for horizontal upsampling before processing -
trunk/source/App/TAppRenderer/TAppRendererTop.cpp
r81 r100 70 70 pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, iFileBitDepth, iInteralBitDepth ); // read mode 71 71 pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, iFileBitDepth, iInteralBitDepth ); // read mode 72 #if HHI_FIX73 72 pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight ); 74 73 pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight ); 75 #endif 74 76 75 m_apcTVideoIOYuvVideoInput.push_back( pcVideoInput ); 77 76 m_apcTVideoIOYuvDepthInput.push_back( pcDepthInput ); … … 186 185 while ( ( ( iNumOfRenderedFrames < m_iFramesToBeRendered ) || ( m_iFramesToBeRendered == 0 ) ) && !bAnyEOS ) 187 186 { 188 189 #if HHI_FIX190 187 if ( iFrame >= m_iFrameSkip ) 191 188 { 192 #endif 193 // read in depth and video 194 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 195 { 196 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 197 198 apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder(); 199 200 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 201 202 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 203 apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder(); 204 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 205 206 if ( m_bTempDepthFilter && (iFrame >= m_iFrameSkip) ) 189 // read in depth and video 190 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 207 191 { 208 m_pcRenTop->temporalFilterVSRS( apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], apcPicYuvLastBaseVideo[iBaseViewIdx], apcPicYuvLastBaseDepth[iBaseViewIdx], ( iFrame == m_iFrameSkip) ); 192 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 193 194 apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder(); 195 196 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 197 198 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 199 apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder(); 200 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 201 202 if ( m_bTempDepthFilter && (iFrame >= m_iFrameSkip) ) 203 { 204 m_pcRenTop->temporalFilterVSRS( apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], apcPicYuvLastBaseVideo[iBaseViewIdx], apcPicYuvLastBaseDepth[iBaseViewIdx], ( iFrame == m_iFrameSkip) ); 205 } 209 206 } 210 207 } 211 212 #if HHI_FIX 213 } 214 else 215 #else 216 if ( iFrame < m_iFrameSkip ) // Skip Frames 217 #endif 218 208 else 219 209 { 220 210 std::cout << "Skipping Frame " << iFrame << std::endl; … … 536 526 537 527 AOT( m_iLog2SamplingFactor != 0 ); 528 #if LGE_VSO_EARLY_SKIP_A0093 529 cCurModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); 530 #else 538 531 cCurModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin ); 532 #endif 533 534 #if HHI_VSO_SPEEDUP_A033 535 cCurModel.setHorOffset( 0 ); 536 #endif 539 537 540 538 for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfInputViews; iViewIdx++ ) … … 563 561 { 564 562 565 #if HHI_FIX566 563 if ( iFrame >= m_iFrameSkip ) 567 564 { 568 #endif 569 // read in depth and video 570 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 571 { 572 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 573 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 574 575 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 576 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 577 } 578 #if HHI_FIX 565 // read in depth and video 566 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 567 { 568 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 569 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 570 571 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 572 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 573 } 579 574 } 580 575 else 581 #else582 if ( iFrame < m_iFrameSkip )583 #endif584 576 { 585 #if HHI_FIX586 577 iFrame++; 587 #endif588 578 continue; 589 579 } … … 598 588 } 599 589 600 #if HHI_FIX601 590 m_cCameraData.update( (UInt) ( iFrame - m_iFrameSkip )); 602 #endif603 591 604 592 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 605 593 { 606 #if HHI_FIX607 #else608 m_cCameraData.update( (UInt)iFrame );609 #endif610 611 594 // setup virtual views 612 595 Int iBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iBaseViewIdx]; … … 726 709 727 710 AOT( m_iLog2SamplingFactor != 0 ); 711 #if HHI_VSO_SPEEDUP_A033 712 cCurModel.setHorOffset( 0 ); 713 #endif 714 #if LGE_VSO_EARLY_SKIP_A0093 715 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); 716 #else 728 717 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin ); 718 #endif 729 719 730 720 for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ ) … … 788 778 { 789 779 790 #if HHI_FIX791 780 if ( iFrame >= m_iFrameSkip ) 792 781 { 793 #endif 794 // read in depth and video 795 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 796 { 797 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 798 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 799 800 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 801 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 802 803 if ( iFrame >= m_iFrameSkip ) 782 // read in depth and video 783 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 804 784 { 805 Int iBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iBaseViewIdx]; 806 cCurModel.setBaseView( iBaseViewSIdx, apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], NULL, NULL ); 785 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 786 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 787 788 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 789 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 790 791 if ( iFrame >= m_iFrameSkip ) 792 { 793 Int iBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iBaseViewIdx]; 794 cCurModel.setBaseView( iBaseViewSIdx, apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], NULL, NULL ); 795 } 807 796 } 808 797 } 809 810 #if HHI_FIX811 }812 798 else 813 #else814 if ( iFrame < m_iFrameSkip ) // Skip Frames815 #endif816 799 { 817 800 iFrame++; 818 801 continue; 819 802 } 820 821 #if HHI_FIX822 803 m_cCameraData.update( (UInt) (iFrame - m_iFrameSkip )); 823 #else824 m_cCameraData.update( (UInt)iFrame );825 #endif826 827 804 for(Int iSynthViewIdx=0; iSynthViewIdx < m_iNumberOfOutputViews; iSynthViewIdx++ ) 828 805 { … … 972 949 { 973 950 974 #if HHI_FIX 951 975 952 if ( iFrame >= m_iFrameSkip ) 976 953 { 977 #endif 978 // read in depth and video 979 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 980 { 981 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 982 apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder(); 983 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 984 985 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 986 apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder(); 987 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 988 989 if ( m_bTempDepthFilter && (iFrame >= m_iFrameSkip) ) 954 // read in depth and video 955 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 990 956 { 991 m_pcRenTop->temporalFilterVSRS( apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], apcPicYuvLastBaseVideo[iBaseViewIdx], apcPicYuvLastBaseDepth[iBaseViewIdx], ( iFrame == m_iFrameSkip) ); 957 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad ) ; 958 apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder(); 959 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 960 961 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad ) ; 962 apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder(); 963 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 964 965 if ( m_bTempDepthFilter && (iFrame >= m_iFrameSkip) ) 966 { 967 m_pcRenTop->temporalFilterVSRS( apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], apcPicYuvLastBaseVideo[iBaseViewIdx], apcPicYuvLastBaseDepth[iBaseViewIdx], ( iFrame == m_iFrameSkip) ); 968 } 992 969 } 993 970 } 994 995 #if HHI_FIX996 }997 971 else 998 #else999 if ( iFrame < m_iFrameSkip ) // Skip Frames1000 #endif1001 972 { 1002 973 std::cout << "Skipping Frame " << iFrame << std::endl; … … 1005 976 continue; 1006 977 } 1007 1008 #if HHI_FIX1009 978 m_cCameraData.update( (UInt) ( iFrame - m_iFrameSkip ) ); 1010 #else1011 m_cCameraData.update( (UInt)iFrame );1012 #endif1013 979 1014 980 for(Int iViewIdx=1; iViewIdx < m_iNumberOfInputViews; iViewIdx++ ) -
trunk/source/App/TAppRenderer/TAppRendererTop.h
r56 r100 60 60 private: 61 61 // class interface 62 std::vector<TVideoIOYuv*> 62 std::vector<TVideoIOYuv*> m_apcTVideoIOYuvVideoInput; 63 63 std::vector<TVideoIOYuv*> m_apcTVideoIOYuvDepthInput; 64 std::vector<TVideoIOYuv*> 64 std::vector<TVideoIOYuv*> m_apcTVideoIOYuvSynthOutput; 65 65 66 66 // RendererInterface
Note: See TracChangeset for help on using the changeset viewer.