Changeset 446 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/App/TAppRenderer
- Timestamp:
- 26 May 2013, 16:22:23 (12 years ago)
- Location:
- branches/HTM-DEV-0.2-dev/source/App/TAppRenderer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/RendererMain.cpp
r438 r446 33 33 34 34 35 36 35 #include <time.h> 36 #include "../../Lib/TLibCommon/TypeDef.h" 37 #if H_3D 37 38 #include "TAppRendererTop.h" 38 39 39 // ==================================================================================================================== 40 40 // Main function … … 43 43 int main(int argc, char* argv[]) 44 44 { 45 #if !QC_MVHEVC_B0046 45 46 46 TAppRendererTop cTAppRendererTop; 47 47 … … 79 79 80 80 return 0; 81 #endif 81 } 82 #else 83 84 #include <iostream> 85 int main(int argc, char* argv[]) 86 { 87 std::cout << "Set H_3D equal to 1 in TypeDef.h to build renderer. " << std::endl; 88 return 1; 82 89 } 83 90 91 #endif // H_3D 84 92 -
branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererCfg.cpp
r438 r446 34 34 35 35 36 36 37 #include <stdlib.h> 37 38 #include <math.h> … … 40 41 #include <string> 41 42 42 43 44 43 #include "TAppRendererCfg.h" 45 44 #include "../../Lib/TAppCommon/program_options_lite.h" 46 45 46 #if H_3D 47 47 48 48 using namespace std; … … 59 59 // Constructor / destructor / initialization / destroy 60 60 // ==================================================================================================================== 61 #if !QC_MVHEVC_B0046 61 62 62 63 TAppRendererCfg::TAppRendererCfg() 63 64 { 64 65 65 66 } 66 67 … … 129 130 ("DepthInputFile_%d,d_%d", m_pchDepthInputFileList , (Char *) 0, MAX_INPUT_VIEW_NUM , "Original Yuv depth input file name %d") 130 131 ("SynthOutputFile_%d,s_%d", m_pchSynthOutputFileList, (Char *) 0, MAX_OUTPUT_VIEW_NUM, "Synthesized Yuv output file name %d") 132 133 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file") 134 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)") 135 ("InternalBitDepth", m_internalBitDepthY, 0, "Bit-depth the renderer operates at. (default:InputBitDepth)" "If different to InputBitDepth, source data will be converted") 136 137 ("InputBitDepthC", m_inputBitDepthC, 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)") 138 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 139 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 131 140 132 141 /* Source Specification */ … … 176 185 */ 177 186 187 /* rules for input, output and internal bitdepths as per help text */ 188 if (!m_internalBitDepthY) { m_internalBitDepthY = m_inputBitDepthY; } 189 if (!m_internalBitDepthC) { m_internalBitDepthC = m_internalBitDepthY; } 190 if (!m_inputBitDepthC) { m_inputBitDepthC = m_inputBitDepthY; } 191 if (!m_outputBitDepthY) { m_outputBitDepthY = m_internalBitDepthY; } 192 if (!m_outputBitDepthC) { m_outputBitDepthC = m_internalBitDepthC; } 193 178 194 xSetGlobal(); 179 195 … … 258 274 xConfirmPara( m_iFramesToBeRendered < 0, "Total Number Of Frames rendered must be more than 1" ); 259 275 276 // bit depth 277 xConfirmPara( m_internalBitDepthC != m_internalBitDepthY, "InternalBitDepth for luma and chroma must be equal. "); 278 xConfirmPara( m_inputBitDepthY < 8, "InputBitDepth must be at least 8" ); 279 xConfirmPara( m_inputBitDepthC < 8, "InputBitDepthC must be at least 8" ); 260 280 261 281 // camera specification … … 500 520 iCurPrec = 0; 501 521 for ( Int iCur = 1; aiIn[uiK] % iCur == 0; iCur *= 10, iCurPrec++); 502 iCurPrec = LOG10_VIEW_NUM_PREC - Min(LOG10_VIEW_NUM_PREC, iCurPrec-1 );522 iCurPrec = LOG10_VIEW_NUM_PREC - std::min((Int) LOG10_VIEW_NUM_PREC, iCurPrec-1 ); 503 523 iPrecAfter = max(iPrecAfter, iCurPrec ); 504 524 } … … 507 527 Void TAppRendererCfg::xSetGlobal() 508 528 { 509 // set max CU width & height 510 Int iInternalBitDepth = 8; 529 // set max CU width & height 511 530 g_uiMaxCUWidth = 0; 512 g_uiMaxCUHeight = 0; 513 g_uiBitDepth = 8; 514 g_uiBitIncrement = iInternalBitDepth - g_uiBitDepth; 515 g_uiBASE_MAX = ((1<<(g_uiBitDepth))-1); 516 g_uiIBDI_MAX = ((1<<(g_uiBitDepth+g_uiBitIncrement))-1); 517 } 531 g_uiMaxCUHeight = 0; 532 } 533 518 534 #endif -
branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererCfg.h
r438 r446 32 32 */ 33 33 34 34 #ifndef __TAppRENDERERCFG__ 35 #define __TAppRENDERERCFG__ 35 36 36 37 #include <list> … … 38 39 #include <fcntl.h> 39 40 #include <assert.h> 40 41 42 43 #ifndef __TAppRENDERERCFG__44 #define __TAppRENDERERCFG__45 41 46 42 #include "../../Lib/TAppCommon/TAppComCamPara.h" … … 50 46 #include <string> 51 47 #include <vector> 52 #if !QC_MVHEVC_B0046 48 49 #if H_3D 50 53 51 // ==================================================================================================================== 54 52 // Class definition … … 66 64 Bool m_bContOutputFileNumbering; ///< use continous numbering instead of view numbering 67 65 Bool m_bSweep; ///< 1: Store view range in file 66 67 68 // bit-depth ( Currently interal luma and chroma bit-depth are required to be equal. ) 69 Int m_inputBitDepthY; ///< bit-depth of input file (luma component) 70 Int m_inputBitDepthC; ///< bit-depth of input file (chroma component) 71 Int m_outputBitDepthY; ///< bit-depth of output file (luma component) 72 Int m_outputBitDepthC; ///< bit-depth of output file (chroma component) 73 Int m_internalBitDepthY; ///< bit-depth renderer operates at in luma (input/output files will be converted) 74 Int m_internalBitDepthC; ///< bit-depth renderer operates at in chroma (input/output files will be converted) 75 68 76 69 77 // derived … … 133 141 };// END CLASS DEFINITION TAppRendererCfg 134 142 135 136 #endif137 143 #endif // __TAppRENDERERCFG__ 138 144 #endif // H_3D -
branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererTop.cpp
r438 r446 33 33 34 34 35 36 35 #include <list> 37 36 #include <stdio.h> … … 42 41 #include "TAppRendererTop.h" 43 42 43 #if H_3D 44 44 45 // ==================================================================================================================== 45 46 // Constructor / destructor / initialization / destroy 46 47 // ==================================================================================================================== 47 #if !QC_MVHEVC_B0046 48 48 49 TAppRendererTop::TAppRendererTop() 49 50 { … … 59 60 Void TAppRendererTop::xCreateLib() 60 61 { 61 Int iInteralBitDepth = g_uiBitDepth + g_uiBitIncrement;62 Int iFileBitDepth = 8;63 62 m_pcRenTop = new TRenTop(); 64 63 … … 68 67 TVideoIOYuv* pcDepthInput = new TVideoIOYuv; 69 68 70 pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, iFileBitDepth, iInteralBitDepth); // read mode71 pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, iFileBitDepth, iInteralBitDepth); // read mode69 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 72 71 pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight ); 73 72 pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight ); … … 80 79 { 81 80 TVideoIOYuv* pcSynthOutput = new TVideoIOYuv; 82 pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, iFileBitDepth, iInteralBitDepth); // write mode81 pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepthY, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // write mode 83 82 m_apcTVideoIOYuvSynthOutput.push_back( pcSynthOutput ); 84 83 } … … 469 468 render(); 470 469 break; 470 #if H_3D_VSO 471 471 case 1: 472 472 renderModel(); 473 473 break; 474 #endif 474 475 case 10: 475 476 renderUsedPelsMap( ); … … 481 482 } 482 483 484 #if H_3D_VSO 483 485 Void TAppRendererTop::renderModel() 484 486 { … … 493 495 } 494 496 497 498 495 499 Void TAppRendererTop::xRenderModelFromString() 496 500 { 497 498 501 xCreateLib(); 499 502 xInitLib(); … … 522 525 523 526 AOT( m_iLog2SamplingFactor != 0 ); 524 #if LGE_VSO_EARLY_SKIP_A0093527 #if H_3D_VSO_EARLY_SKIP 525 528 cCurModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); 526 529 #else … … 683 686 } 684 687 688 685 689 Void TAppRendererTop::xRenderModelFromNums() 686 690 { … … 700 704 AOT( m_iLog2SamplingFactor != 0 ); 701 705 cCurModel.setupPart( 0, m_iSourceHeight ); 702 #if LGE_VSO_EARLY_SKIP_A0093706 #if H_3D_VSO_EARLY_SKIP 703 707 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); 704 708 #else … … 880 884 881 885 } 886 #endif 882 887 883 888 Void TAppRendererTop::renderUsedPelsMap( ) -
branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererTop.h
r438 r446 32 32 */ 33 33 34 35 36 34 #include <list> 37 35 #include <stdio.h> … … 39 37 #include <assert.h> 40 38 41 42 39 #ifndef __TAppRendererTOP__ 43 40 #define __TAppRendererTOP__ 44 45 41 #include "../../Lib/TLibCommon/TypeDef.h" 42 #if H_3D 46 43 #include "../../Lib/TLibRenderer/TRenTop.h" 47 44 #include "../../Lib/TLibVideoIO/TVideoIOYuv.h" … … 50 47 #include "../../Lib/TLibRenderer/TRenModel.h" 51 48 52 #if !QC_MVHEVC_B004653 49 // ==================================================================================================================== 54 50 // Class definition … … 72 68 Void xInitLib (); ///< initialize renderer class 73 69 Void xDestroyLib (); ///< destroy renderer class and video io 70 #if H_3D_VSO 74 71 Void xRenderModelFromString(); ///< render using model using setup string 75 72 Void xRenderModelFromNums(); ///< render using model using synth view numbers 76 73 #endif 77 74 78 75 public: … … 81 78 82 79 Void render (); ///< main encoding function 80 #if H_3D_VSO 83 81 Void renderModel (); 82 #endif 84 83 Void go (); 85 84 Void renderUsedPelsMap(); … … 87 86 };// END CLASS DEFINITION TAppRendererTop 88 87 89 #endif90 88 91 #endif 89 #endif // H_3D 90 #endif // __TAppRendererTOP__
Note: See TracChangeset for help on using the changeset viewer.