Changeset 1313 in 3DVCSoftware for trunk/source/App/TAppRenderer/TAppRendererTop.cpp
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppRenderer/TAppRendererTop.cpp
r1179 r1313 41 41 #include "TAppRendererTop.h" 42 42 43 #if H_3D43 #if NH_3D 44 44 45 45 // ==================================================================================================================== … … 67 67 TVideoIOYuv* pcDepthInput = new TVideoIOYuv; 68 68 69 pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC); // read mode 70 pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // read mode 71 pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight ); 72 pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight ); 69 // ( Char* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] ) 70 71 pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, m_inputBitDepth, m_internalBitDepth, m_internalBitDepth ); // read mode 72 pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, m_inputBitDepth, m_internalBitDepth, m_internalBitDepth ); // read mode 73 pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight, CHROMA_420 ); 74 pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight, CHROMA_420 ); 73 75 74 76 m_apcTVideoIOYuvVideoInput.push_back( pcVideoInput ); … … 79 81 { 80 82 TVideoIOYuv* pcSynthOutput = new TVideoIOYuv; 81 pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepth Y, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC); // write mode83 pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepth, m_internalBitDepth, m_internalBitDepth ); // write mode 82 84 m_apcTVideoIOYuvSynthOutput.push_back( pcSynthOutput ); 83 85 } … … 148 150 Int aiPad[2] = { 0, 0 }; 149 151 152 TComPicYuv* pcNewOrg = new TComPicYuv; 153 pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 154 150 155 for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ ) 151 156 { … … 153 158 TComPicYuv* pcNewDepthPic = new TComPicYuv; 154 159 155 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);160 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 156 161 apcPicYuvBaseVideo.push_back(pcNewVideoPic); 157 162 158 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);163 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true); 159 164 apcPicYuvBaseDepth.push_back(pcNewDepthPic); 160 165 … … 165 170 pcNewDepthPic = new TComPicYuv; 166 171 167 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);172 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 168 173 apcPicYuvLastBaseVideo.push_back(pcNewVideoPic); 169 174 170 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);175 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 171 176 apcPicYuvLastBaseDepth.push_back(pcNewDepthPic); 172 177 } … … 175 180 // Create Buffer for synthesized View 176 181 TComPicYuv* pcPicYuvSynthOut = new TComPicYuv; 177 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);182 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 178 183 179 184 Bool bAnyEOS = false; … … 189 194 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 190 195 { 191 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad) ;196 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx],pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 192 197 193 198 apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder(); … … 195 200 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 196 201 197 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad) ;202 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx],pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 198 203 apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder(); 199 204 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); … … 428 433 // Write Output 429 434 430 m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, 0, 0, 0,0 );435 m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED, 0, 0, 0, 0, CHROMA_420 ); 431 436 } 432 437 iFrame++; … … 435 440 436 441 // Delete Buffers 442 pcNewOrg->destroy(); 443 delete pcNewOrg; 444 437 445 for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ ) 438 446 { … … 468 476 render(); 469 477 break; 470 #if H_3D_VSO478 #if NH_3D_VSO 471 479 case 1: 472 480 renderModel(); … … 490 498 } 491 499 492 #if H_3D_VSO500 #if NH_3D_VSO 493 501 Void TAppRendererTop::renderModel() 494 502 { … … 520 528 TComPicYuv* pcNewDepthPic = new TComPicYuv; 521 529 522 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);530 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 523 531 apcPicYuvBaseVideo.push_back(pcNewVideoPic); 524 532 525 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);533 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 526 534 apcPicYuvBaseDepth.push_back(pcNewDepthPic); 527 535 } 528 536 529 537 Int aiPad[2] = { 0, 0 }; 538 TComPicYuv* pcNewOrg = new TComPicYuv; 539 pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 530 540 531 541 // Init Model … … 550 560 m_cRenModStrParser.getSingleModelData ( iViewIdx, 1, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ; 551 561 cCurModel .createSingleModel ( iViewIdx, 1, iModelNum, iLeftViewNum, iRightViewNum, false, iBlendMode ); 552 553 562 } 554 563 } … … 556 565 // Create Buffer for synthesized View 557 566 TComPicYuv* pcPicYuvSynthOut = new TComPicYuv; 558 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);567 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 559 568 560 569 Bool bAnyEOS = false; … … 571 580 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 572 581 { 573 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad) ;582 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 574 583 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 575 584 576 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad) ;585 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 577 586 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 578 587 } … … 672 681 673 682 // Write Output 674 m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iModelNum]->write( pcPicYuvSynthOut, 0 ,0 ,0,0 );683 m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iModelNum]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED, 0 ,0 ,0, 0, CHROMA_420 ); 675 684 } 676 685 } … … 706 715 707 716 Int aiPad[2] = { 0, 0 }; 717 TComPicYuv* pcNewOrg = new TComPicYuv; 718 pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 719 708 720 709 721 // Init Model … … 711 723 712 724 AOT( m_iLog2SamplingFactor != 0 ); 713 cCurModel.setupPart( 0, m_iSourceHeight ); 725 714 726 #if H_3D_VSO_EARLY_SKIP 715 727 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); … … 717 729 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin ); 718 730 #endif 731 cCurModel.setupPart( 0, m_iSourceHeight ); 719 732 720 733 for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ ) … … 723 736 TComPicYuv* pcNewDepthPic = new TComPicYuv; 724 737 725 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);738 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 726 739 apcPicYuvBaseVideo.push_back(pcNewVideoPic); 727 740 728 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);741 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 729 742 apcPicYuvBaseDepth.push_back(pcNewDepthPic); 730 743 } … … 768 781 // Create Buffer for synthesized View 769 782 TComPicYuv* pcPicYuvSynthOut = new TComPicYuv; 770 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);783 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 771 784 772 785 Bool bAnyEOS = false; … … 783 796 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 784 797 { 785 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad) ;798 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 786 799 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 787 800 788 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad) ;801 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 789 802 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); 790 803 … … 871 884 872 885 // Write Output 873 m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, 0, 0, 0,0 );886 m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED, 0 ,0 ,0, 0, CHROMA_420 ); 874 887 } 875 888 iFrame++; … … 909 922 Int aiPad[2] = { 0, 0 }; 910 923 924 TComPicYuv* pcNewOrg = new TComPicYuv; 925 pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 926 911 927 for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ ) 912 928 { … … 914 930 TComPicYuv* pcNewDepthPic = new TComPicYuv; 915 931 916 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);932 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight,CHROMA_420, 1, 1, 1, true ); 917 933 apcPicYuvBaseVideo.push_back(pcNewVideoPic); 918 934 919 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);935 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true ); 920 936 apcPicYuvBaseDepth.push_back(pcNewDepthPic); 937 921 938 922 939 //Temporal improvement Filter … … 926 943 pcNewDepthPic = new TComPicYuv; 927 944 928 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);945 pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1 , true); 929 946 apcPicYuvLastBaseVideo.push_back(pcNewVideoPic); 930 947 931 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);948 pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight,CHROMA_420, 1, 1, 1 , true); 932 949 apcPicYuvLastBaseDepth.push_back(pcNewDepthPic); 933 950 } … … 936 953 // Create Buffer for synthesized View 937 954 TComPicYuv* pcPicYuvSynthOut = new TComPicYuv; 938 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, 1, 1, 1);955 pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1 ,1, true); 939 956 940 957 Bool bAnyEOS = false; … … 950 967 for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ ) 951 968 { 952 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], aiPad) ;969 m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 953 970 apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder(); 954 971 bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof(); 955 972 956 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], aiPad) ;973 m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420 ) ; 957 974 apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder(); 958 975 bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof(); … … 997 1014 998 1015 // Write Output 999 m_apcTVideoIOYuvSynthOutput[iViewIdx-1]->write( pcPicYuvSynthOut, 0, 0,0 );1016 m_apcTVideoIOYuvSynthOutput[iViewIdx-1]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED, 0, 0, 0, 0, CHROMA_420 ); 1000 1017 1001 1018 } … … 1005 1022 1006 1023 // Delete Buffers 1024 1025 pcNewOrg->destroy(); 1026 delete pcNewOrg; 1027 1007 1028 for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ ) 1008 1029 {
Note: See TracChangeset for help on using the changeset viewer.