Ignore:
Timestamp:
26 May 2013, 16:22:23 (12 years ago)
Author:
tech
Message:

Added missing parts.

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  
    3333
    3434
    35 
    3635#include <time.h>
     36#include "../../Lib/TLibCommon/TypeDef.h"
     37#if H_3D
    3738#include "TAppRendererTop.h"
    38 
    3939// ====================================================================================================================
    4040// Main function
     
    4343int main(int argc, char* argv[])
    4444  {
    45 #if !QC_MVHEVC_B0046
     45
    4646  TAppRendererTop  cTAppRendererTop;
    4747
     
    7979
    8080  return 0;
    81 #endif
     81}
     82#else
     83
     84#include <iostream>
     85int 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;
    8289}
    8390
     91#endif // H_3D
    8492
  • branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererCfg.cpp

    r438 r446  
    3434
    3535
     36
    3637#include <stdlib.h>
    3738#include <math.h>
     
    4041#include <string>
    4142
    42 
    43 
    4443#include "TAppRendererCfg.h"
    4544#include "../../Lib/TAppCommon/program_options_lite.h"
    4645
     46#if H_3D
    4747
    4848using namespace std;
     
    5959// Constructor / destructor / initialization / destroy
    6060// ====================================================================================================================
    61 #if !QC_MVHEVC_B0046
     61
     62
    6263TAppRendererCfg::TAppRendererCfg()
    6364{
    64 
     65 
    6566}
    6667
     
    129130    ("DepthInputFile_%d,d_%d",  m_pchDepthInputFileList ,    (Char *) 0, MAX_INPUT_VIEW_NUM , "Original Yuv depth input file name %d")
    130131    ("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)")
    131140
    132141    /* Source Specification */
     
    176185  */
    177186
     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
    178194  xSetGlobal();
    179195
     
    258274  xConfirmPara( m_iFramesToBeRendered <  0,                   "Total Number Of Frames rendered must be more than 1" );
    259275
     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" );
    260280
    261281  // camera specification
     
    500520    iCurPrec = 0;
    501521    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 );
    503523    iPrecAfter = max(iPrecAfter, iCurPrec );
    504524  }
     
    507527Void TAppRendererCfg::xSetGlobal()
    508528{
    509   // set max CU width & height
    510   Int iInternalBitDepth = 8;
     529  // set max CU width & height 
    511530  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
    518534#endif
  • branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererCfg.h

    r438 r446  
    3232 */
    3333
    34 
     34#ifndef __TAppRENDERERCFG__
     35#define __TAppRENDERERCFG__
    3536
    3637#include <list>
     
    3839#include <fcntl.h>
    3940#include <assert.h>
    40 
    41 
    42 
    43 #ifndef __TAppRENDERERCFG__
    44 #define __TAppRENDERERCFG__
    4541
    4642#include "../../Lib/TAppCommon/TAppComCamPara.h"
     
    5046#include <string>
    5147#include <vector>
    52 #if !QC_MVHEVC_B0046
     48
     49#if H_3D
     50
    5351// ====================================================================================================================
    5452// Class definition
     
    6664  Bool               m_bContOutputFileNumbering;       ///< use continous numbering instead of view numbering
    6765  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
    6876
    6977  // derived
     
    133141};// END CLASS DEFINITION TAppRendererCfg
    134142
    135 
    136 #endif
    137143#endif // __TAppRENDERERCFG__
    138 
     144#endif // H_3D
  • branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererTop.cpp

    r438 r446  
    3333
    3434
    35 
    3635#include <list>
    3736#include <stdio.h>
     
    4241#include "TAppRendererTop.h"
    4342
     43#if H_3D
     44
    4445// ====================================================================================================================
    4546// Constructor / destructor / initialization / destroy
    4647// ====================================================================================================================
    47 #if !QC_MVHEVC_B0046
     48
    4849TAppRendererTop::TAppRendererTop()
    4950{
     
    5960Void TAppRendererTop::xCreateLib()
    6061{
    61   Int iInteralBitDepth = g_uiBitDepth + g_uiBitIncrement;
    62   Int iFileBitDepth    = 8;
    6362  m_pcRenTop = new TRenTop();
    6463
     
    6867    TVideoIOYuv* pcDepthInput = new TVideoIOYuv;
    6968
    70     pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, iFileBitDepth, iInteralBitDepth );  // read mode
    71     pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, iFileBitDepth, iInteralBitDepth );  // read mode
     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
    7271    pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight  );
    7372    pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight  );
     
    8079  {
    8180    TVideoIOYuv* pcSynthOutput = new TVideoIOYuv;
    82     pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, iFileBitDepth, iInteralBitDepth );  // write mode
     81    pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepthY, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC );  // write mode
    8382    m_apcTVideoIOYuvSynthOutput.push_back( pcSynthOutput );
    8483  }
     
    469468    render();
    470469    break;
     470#if H_3D_VSO
    471471  case 1:
    472472    renderModel();
    473473    break;
     474#endif
    474475  case 10:
    475476    renderUsedPelsMap( );
     
    481482}
    482483
     484#if H_3D_VSO
    483485Void TAppRendererTop::renderModel()
    484486{
     
    493495}
    494496
     497
     498
    495499Void TAppRendererTop::xRenderModelFromString()
    496500{
    497 
    498501    xCreateLib();
    499502    xInitLib();
     
    522525
    523526    AOT( m_iLog2SamplingFactor != 0 );
    524 #if LGE_VSO_EARLY_SKIP_A0093
     527#if H_3D_VSO_EARLY_SKIP
    525528    cCurModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false );
    526529#else
     
    683686}
    684687
     688
    685689Void TAppRendererTop::xRenderModelFromNums()
    686690{
     
    700704  AOT( m_iLog2SamplingFactor != 0 );
    701705  cCurModel.setupPart( 0, m_iSourceHeight  );
    702 #if LGE_VSO_EARLY_SKIP_A0093
     706#if H_3D_VSO_EARLY_SKIP
    703707  cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false );
    704708#else
     
    880884
    881885}
     886#endif
    882887
    883888Void TAppRendererTop::renderUsedPelsMap( )
  • branches/HTM-DEV-0.2-dev/source/App/TAppRenderer/TAppRendererTop.h

    r438 r446  
    3232 */
    3333
    34 
    35 
    3634#include <list>
    3735#include <stdio.h>
     
    3937#include <assert.h>
    4038
    41 
    4239#ifndef __TAppRendererTOP__
    4340#define __TAppRendererTOP__
    44 
    45 
     41#include "../../Lib/TLibCommon/TypeDef.h"
     42#if H_3D
    4643#include "../../Lib/TLibRenderer/TRenTop.h"
    4744#include "../../Lib/TLibVideoIO/TVideoIOYuv.h"
     
    5047#include "../../Lib/TLibRenderer/TRenModel.h"
    5148
    52 #if !QC_MVHEVC_B0046
    5349// ====================================================================================================================
    5450// Class definition
     
    7268  Void  xInitLib          ();                               ///< initialize renderer class
    7369  Void  xDestroyLib       ();                               ///< destroy renderer class and video io
     70#if H_3D_VSO
    7471  Void  xRenderModelFromString();                           ///< render using model using setup string
    7572  Void  xRenderModelFromNums();                             ///< render using model using synth view numbers
    76 
     73#endif
    7774
    7875public:
     
    8178
    8279  Void  render      ();                               ///< main encoding function
     80#if H_3D_VSO
    8381  Void  renderModel ();
     82#endif
    8483  Void  go          ();
    8584  Void  renderUsedPelsMap();
     
    8786};// END CLASS DEFINITION TAppRendererTop
    8887
    89 #endif
    9088
    91 #endif
     89#endif // H_3D
     90#endif // __TAppRendererTOP__
Note: See TracChangeset for help on using the changeset viewer.