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

Added missing parts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.