Changeset 446 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/App


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
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r438 r446  
    4545#include <cassert>
    4646#endif
    47 
    4847#ifdef WIN32
    4948#define strdup _strdup
     
    6968  string cfg_ReconFile;
    7069  string cfg_TargetDecLayerIdSetFile;
     70#if H_3D
     71  string cfg_ScaleOffsetFile;
     72#endif
    7173
    7274  po::Options opts;
     
    7678  ("ReconFile,o",     cfg_ReconFile,     string(""), "reconstructed YUV output file name\n"
    7779                                                     "YUV writing is skipped if omitted")
     80#if H_3D
     81  ("ScaleOffsetFile,p", cfg_ScaleOffsetFile, string(""), "file with coded scales and offsets")
     82#endif
    7883  ("SkipFrames,s", m_iSkipFrame, 0, "number of frames to skip before random access")
    7984  ("OutputBitDepth,d", m_outputBitDepthY, 0, "bit depth of YUV output luma component (default: use 0 for native depth)")
    8085  ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")
    81 
    8286#if H_MV
    8387  ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")
    8488#endif
    85 
    8689  ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
    8790  ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n"
     
    108111  /* convert std::string to c string for compatability */
    109112  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    110 
    111113  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    112114
     115#if H_3D
     116  m_pchScaleOffsetFile = cfg_ScaleOffsetFile.empty() ? NULL : strdup(cfg_ScaleOffsetFile.c_str());
     117#endif
    113118  if (!m_pchBitstreamFile)
    114119  {
     
    191196}
    192197#endif
    193 
    194198//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.h

    r368 r446  
    6363#endif
    6464  Char*         m_pchReconFile;                       ///< output reconstruction file name
     65#if H_3D
     66  Char*         m_pchScaleOffsetFile;                 ///< output coded scale and offset parameters
     67#endif
    6568  Int           m_iSkipFrame;                         ///< counter for frames prior to the random access point to skip
    6669  Int           m_outputBitDepthY;                    ///< bit depth used for writing output (luma)
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r438 r446  
    5454
    5555TAppDecTop::TAppDecTop()
    56 
    5756#if !H_MV
    5857: m_iPOCLastDisplay(-MAX_INT)
     
    6059: m_numDecoders( 0 )
    6160#endif
    62 
    6361{
    6462  ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag));
    6563#if H_MV
    6664  for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) m_layerIdToDecIdx[i] = -1;
     65#endif
     66#if H_3D
     67    m_pScaleOffsetFile  = 0;
    6768#endif
    6869}
     
    7980    m_pchBitstreamFile = NULL;
    8081  }
    81 
    8282#if H_MV
    8383  for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++)
     
    115115  poc = -1;
    116116#endif
    117 
    118117  TComList<TComPic*>* pcListPic = NULL;
    119118
     
    125124  }
    126125
     126#if H_3D
     127  if( m_pchScaleOffsetFile )
     128  {
     129    m_pScaleOffsetFile = ::fopen( m_pchScaleOffsetFile, "wt" );
     130    AOF( m_pScaleOffsetFile );
     131  }
     132  m_cCamParsCollector.init( m_pScaleOffsetFile );
     133#endif
    127134  InputByteStream bytestream(bitstreamFile);
    128135
     
    147154  Bool firstSlice        = true;
    148155#endif
    149 
    150156 
    151157  while (!!bitstreamFile)
     
    156162     * nal unit. */
    157163    streampos location = bitstreamFile.tellg();
     164#if H_MV
     165#if ENC_DEC_TRACE
     166    Int64 symCount = g_nSymbolCounter;
     167#endif
     168#endif
    158169    AnnexBStats stats = AnnexBStats();
    159170#if !H_MV
    160171    Bool bPreviousPictureDecoded = false;
    161172#endif
     173
    162174    vector<uint8_t> nalUnit;
    163175    InputNALUnit nalu;
     
    250262          bitstreamFile.seekg(location-streamoff(3));
    251263          bytestream.reset();
     264#if H_MV
     265#if ENC_DEC_TRACE
     266          g_nSymbolCounter = symCount;
     267#endif
     268#endif
    252269        }
    253270#if !H_MV
     
    276293    }
    277294#endif
     295
    278296    if( pcListPic )
    279297    {
     
    286304        if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
    287305        if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
     306
    288307#if H_MV
    289308        m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
     
    297316      if ( bNewPicture &&
    298317#endif
    299            (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
     318           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
    300319            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
    301320            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
    302             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT
    303             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) )
     321            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     322            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) )
    304323      {
    305324#if H_MV
     
    318337  }
    319338
     339#if H_3D
     340  if( m_cCamParsCollector.isInitialized() )
     341  {
     342    m_cCamParsCollector.setSlice( 0 );
     343  }
     344#endif
    320345  for(UInt decIdx = 0; decIdx < m_numDecoders; decIdx++)
    321346  {
     
    383408  // destroy decoder class
    384409  m_cTDecTop.destroy();
     410#endif
     411#if H_3D
     412  m_cCamParsCollector.uninit();
     413  if( m_pScaleOffsetFile )
     414  {
     415    ::fclose( m_pScaleOffsetFile );
     416  }
    385417#endif
    386418}
     
    593625}
    594626
     627#if H_MV
     628Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ )
     629{
     630  Int decIdx = -1;
     631  if ( m_layerIdToDecIdx[ layerId ] != -1 )
     632  {     
     633    decIdx = m_layerIdToDecIdx[ layerId ];
     634  }
     635  else
     636  {     
     637    assert ( createFlag );
     638    assert( m_numDecoders < MAX_NUM_LAYERS );
     639
     640    decIdx = m_numDecoders;
     641
     642    // Init decoder
     643    m_tDecTop[ decIdx ] =  new TDecTop;
     644    m_tDecTop[ decIdx ]->create();
     645    m_tDecTop[ decIdx ]->init( );
     646    m_tDecTop[ decIdx ]->setLayerId( layerId );
     647    m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     648    m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
     649#if H_3D
     650   m_tDecTop[ decIdx ]->setCamParsCollector( &m_cCamParsCollector );
     651#endif
     652
     653    // append pic list of new decoder to PicLists
     654    assert( m_ivPicLists.size() == m_numDecoders );
     655    m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
     656
     657    // create recon file related stuff     
     658    Char* pchTempFilename = NULL;
     659    if ( m_pchReconFile )
     660    {     
     661      Char buffer[4];     
     662      sprintf(buffer,"_%i", layerId );
     663      assert ( m_pchReconFile );
     664      xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
     665      assert( m_pchReconFiles.size() == m_numDecoders );
     666    }
     667
     668    m_pchReconFiles.push_back( pchTempFilename );   
     669
     670    m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
     671    m_reconOpen           [ decIdx ] = false;
     672
     673    // set others
     674    m_pocLastDisplay      [ decIdx ] = -MAX_INT;
     675    m_layerIdToDecIdx     [ layerId ] = decIdx;
     676
     677    m_numDecoders++;
     678  };
     679  return decIdx;
     680}
     681#endif
    595682//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h

    r438 r446  
    7171  TVideoIOYuv                     m_cTVideoIOYuvReconFile;        ///< reconstruction YUV class
    7272#endif
    73  
    74   // for output control
     73    // for output control
    7574  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
    76 
    7775#if H_MV
    7876  Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
     
    8179  Int                             m_iPOCLastDisplay;              ///< last POC in display order
    8280#endif
    83  
     81#if H_3D
     82  FILE*                           m_pScaleOffsetFile;
     83  CamParsCollector                m_cCamParsCollector;
     84#endif
    8485public:
    8586  TAppDecTop();
     
    9091  Void  decode            (); ///< main decoding function
    9192 
    92 
    9393protected:
    9494  Void  xCreateDecLib     (); ///< create internal classes
     
    9999  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
    100100  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
    101   Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false )
    102   {
    103     Int decIdx = -1;
    104     if ( m_layerIdToDecIdx[ layerId ] != -1 )
    105     {     
    106       decIdx = m_layerIdToDecIdx[ layerId ];
    107     }
    108     else
    109     {     
    110       assert ( createFlag );
    111       assert( m_numDecoders < MAX_NUM_LAYERS );
    112 
    113       decIdx = m_numDecoders;
    114      
    115       // Init decoder
    116       m_tDecTop[ decIdx ] =  new TDecTop;
    117       m_tDecTop[ decIdx ]->create();
    118       m_tDecTop[ decIdx ]->init( );
    119       m_tDecTop[ decIdx ]->setLayerId( layerId );
    120       m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
    121       m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
    122      
    123       // append pic list of new decoder to PicLists
    124       assert( m_ivPicLists.size() == m_numDecoders );
    125       m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
    126 
    127       // create recon file related stuff     
    128       Char* pchTempFilename = NULL;
    129       if ( m_pchReconFile )
    130       {     
    131         Char buffer[4];     
    132         sprintf(buffer,"_%i", layerId );
    133         assert ( m_pchReconFile );
    134         xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
    135         assert( m_pchReconFiles.size() == m_numDecoders );
    136       }
    137 
    138       m_pchReconFiles.push_back( pchTempFilename );   
    139 
    140       m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
    141       m_reconOpen           [ decIdx ] = false;
    142 
    143       // set others
    144       m_pocLastDisplay      [ decIdx ] = -MAX_INT;
    145       m_layerIdToDecIdx     [ layerId ] = decIdx;
    146 
    147       m_numDecoders++;
    148     };
    149     return decIdx;
    150   }
     101  Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false );
    151102#else
    152103  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
    153104  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    154105#endif
    155 
    156106  Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
    157107};
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r438 r446  
    7979  m_aidQP = NULL;
    8080#endif
     81#if J0149_TONE_MAPPING_SEI
     82  m_startOfCodedInterval = NULL;
     83  m_codedPivotValue = NULL;
     84  m_targetPivotValue = NULL;
     85#endif
    8186}
    8287
     
    102107    delete[] m_aidQP;
    103108  }
     109#endif
     110#if J0149_TONE_MAPPING_SEI
     111  if ( m_startOfCodedInterval )
     112  {
     113    delete[] m_startOfCodedInterval;
     114    m_startOfCodedInterval = NULL;
     115  }
     116   if ( m_codedPivotValue )
     117  {
     118    delete[] m_codedPivotValue;
     119    m_codedPivotValue = NULL;
     120  }
     121  if ( m_targetPivotValue )
     122  {
     123    delete[] m_targetPivotValue;
     124    m_targetPivotValue = NULL;
     125  }
     126#endif
     127#if !H_MV
    104128  free(m_pchInputFile);
    105129#endif
    106 
    107130  free(m_pchBitstreamFile);
    108 
    109131#if H_MV
    110132  for(Int i = 0; i< m_pchReconFileList.size(); i++ )
     
    116138  free(m_pchReconFile);
    117139#endif
    118 
    119140  free(m_pchdQPFile);
    120141  free(m_pColumnWidth);
    121142  free(m_pRowHeight);
    122143  free(m_scalingListFile);
    123 
    124144#if H_MV
    125145  for( Int i = 0; i < m_GOPListMvc.size(); i++ )
     
    131151    }
    132152  }
     153#endif
     154#if H_3D
     155#if H_3D_VSO
     156  if (  m_pchVSOConfig != NULL)
     157    free (  m_pchVSOConfig );
     158#endif
     159  if ( m_pchCameraParameterFile != NULL )
     160    free ( m_pchCameraParameterFile );
     161
     162  if ( m_pchBaseViewCameraNumbers != NULL )
     163    free ( m_pchBaseViewCameraNumbers );
    133164#endif
    134165}
     
    300331  string cfg_InputFile;
    301332#endif
    302 
    303333  string cfg_BitstreamFile;
    304 
    305334#if !H_MV
    306335  string cfg_ReconFile;
    307336#endif
    308 
    309337#if H_MV
    310338  vector<Int>   cfg_dimensionLength;
     
    316344#endif
    317345#endif
    318 
    319346  string cfg_dQPFile;
    320347  string cfg_ColumnWidth;
    321348  string cfg_RowHeight;
    322349  string cfg_ScalingListFile;
     350#if J0149_TONE_MAPPING_SEI
     351  string cfg_startOfCodedInterval;
     352  string cfg_codedPivotValue;
     353  string cfg_targetPivotValue;
     354#endif
    323355#if SIGNAL_BITRATE_PICRATE_IN_VPS
    324356  string cfg_bitRateInfoPresentFlag;
     
    335367 
    336368  // File, I/O and source parameters
    337 
    338369#if H_MV
    339370  ("InputFile_%d,i_%d",       m_pchInputFileList,       (char *) 0 , MAX_NUM_LAYER_IDS , "original Yuv input file name %d")
     
    341372  ("InputFile,i",           cfg_InputFile,     string(""), "Original YUV input file name")
    342373#endif
    343 
    344374  ("BitstreamFile,b",       cfg_BitstreamFile, string(""), "Bitstream output file name")
    345 
    346375#if H_MV
    347376  ("ReconFile_%d,o_%d",       m_pchReconFileList,       (char *) 0 , MAX_NUM_LAYER_IDS , "reconstructed Yuv output file name %d")
     
    349378  ("ReconFile,o",           cfg_ReconFile,     string(""), "Reconstructed YUV output file name")
    350379#endif
    351 
    352380#if H_MV
    353381  ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
     
    365393  ("SplittingFlag",         m_splittingFlag      , false                , "Splitting Flag")   
    366394#endif
    367 
    368395  ("SourceWidth,-wdt",      m_iSourceWidth,        0, "Source picture width")
    369396  ("SourceHeight,-hgt",     m_iSourceHeight,       0, "Source picture height")
     
    387414
    388415  // Profile and level
    389 
    390416  ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
    391417  ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
     
    417443  ("DecodingRefreshType,-dr", m_iDecodingRefreshType,       0, "Intra refresh type (0:none 1:CRA 2:IDR)")
    418444  ("GOPSize,g",               m_iGOPSize,                   1, "GOP size of temporal structure")
     445#if !L0034_COMBINED_LIST_CLEANUP
    419446  ("ListCombination,-lc",     m_bUseLComb,               true, "Combined reference list for uni-prediction estimation in B-slices")
     447#endif
    420448  // motion options
    421449  ("FastSearch",              m_iFastSearch,                1, "0:Full search  1:Diamond  2:PMVFAST")
     
    473501  ("LoopFilterTcOffset_div2",        m_loopFilterTcOffsetDiv2,             0 )
    474502  ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false )
     503#if L0386_DB_METRIC
     504  ("DeblockingFilterMetric",         m_DeblockingFilterMetric,         false )
     505#endif
    475506
    476507  // Coding tools
     
    591622  ("SEIBufferingPeriod",             m_bufferingPeriodSEIEnabled,              0, "Control generation of buffering period SEI messages")
    592623  ("SEIPictureTiming",               m_pictureTimingSEIEnabled,                0, "Control generation of picture timing SEI messages")
     624#if J0149_TONE_MAPPING_SEI
     625  ("SEIToneMappingInfo",                       m_toneMappingInfoSEIEnabled,    false, "Control generation of Tone Mapping SEI messages")
     626  ("SEIToneMapId",                             m_toneMapId,                        0, "Specifies Id of Tone Mapping SEI message for a given session")
     627  ("SEIToneMapCancelFlag",                     m_toneMapCancelFlag,            false, "Indicates that Tone Mapping SEI message cancels the persistance or follows")
     628  ("SEIToneMapPersistenceFlag",                m_toneMapPersistenceFlag,        true, "Specifies the persistence of the Tone Mapping SEI message")
     629  ("SEIToneMapCodedDataBitDepth",              m_toneMapCodedDataBitDepth,         8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages")
     630  ("SEIToneMapTargetBitDepth",                 m_toneMapTargetBitDepth,            8, "Specifies Output BitDepth of Tome mapping function")
     631  ("SEIToneMapModelId",                        m_toneMapModelId,                   0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n"
     632                                                                                      "\t0:  linear mapping with clipping\n"
     633                                                                                      "\t1:  sigmoidal mapping\n"
     634                                                                                      "\t2:  user-defined table mapping\n"
     635                                                                                      "\t3:  piece-wise linear mapping\n"
     636                                                                                      "\t4:  luminance dynamic range information ")
     637  ("SEIToneMapMinValue",                              m_toneMapMinValue,                          0, "Specifies the minimum value in mode 0")
     638  ("SEIToneMapMaxValue",                              m_toneMapMaxValue,                       1023, "Specifies the maxmum value in mode 0")
     639  ("SEIToneMapSigmoidMidpoint",                       m_sigmoidMidpoint,                        512, "Specifies the centre point in mode 1")
     640  ("SEIToneMapSigmoidWidth",                          m_sigmoidWidth,                           960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1")
     641  ("SEIToneMapStartOfCodedInterval",                  cfg_startOfCodedInterval,          string(""), "Array of user-defined mapping table")
     642  ("SEIToneMapNumPivots",                             m_numPivots,                                0, "Specifies the number of pivot points in mode 3")
     643  ("SEIToneMapCodedPivotValue",                       cfg_codedPivotValue,               string(""), "Array of pivot point")
     644  ("SEIToneMapTargetPivotValue",                      cfg_targetPivotValue,              string(""), "Array of pivot point")
     645  ("SEIToneMapCameraIsoSpeedIdc",                     m_cameraIsoSpeedIdc,                        0, "Indicates the camera ISO speed for daylight illumination")
     646  ("SEIToneMapCameraIsoSpeedValue",                   m_cameraIsoSpeedValue,                    400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO")
     647  ("SEIToneMapExposureCompensationValueSignFlag",     m_exposureCompensationValueSignFlag,        0, "Specifies the sign of ExposureCompensationValue")
     648  ("SEIToneMapExposureCompensationValueNumerator",    m_exposureCompensationValueNumerator,       0, "Specifies the numerator of ExposureCompensationValue")
     649  ("SEIToneMapExposureCompensationValueDenomIdc",     m_exposureCompensationValueDenomIdc,        2, "Specifies the denominator of ExposureCompensationValue")
     650  ("SEIToneMapRefScreenLuminanceWhite",               m_refScreenLuminanceWhite,                350, "Specifies reference screen brightness setting in units of candela per square metre")
     651  ("SEIToneMapExtendedRangeWhiteLevel",               m_extendedRangeWhiteLevel,                800, "Indicates the luminance dynamic range")
     652  ("SEIToneMapNominalBlackLevelLumaCodeValue",        m_nominalBlackLevelLumaCodeValue,          16, "Specifies luma sample value of the nominal black level assigned decoded pictures")
     653  ("SEIToneMapNominalWhiteLevelLumaCodeValue",        m_nominalWhiteLevelLumaCodeValue,         235, "Specifies luma sample value of the nominal white level assigned decoded pictures")
     654  ("SEIToneMapExtendedWhiteLevelLumaCodeValue",       m_extendedWhiteLevelLumaCodeValue,        300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures")
     655#endif
    593656  ("SEIFramePacking",                m_framePackingSEIEnabled,                 0, "Control generation of frame packing SEI messages")
    594657  ("SEIFramePackingType",            m_framePackingSEIType,                    0, "Define frame packing arrangement\n"
     
    611674  ("SEIGradualDecodingRefreshInfo",  m_gradualDecodingRefreshInfoEnabled,      0, "Control generation of gradual decoding refresh information SEI message")
    612675  ("SEIDecodingUnitInfo",             m_decodingUnitInfoSEIEnabled,                       0, "Control generation of decoding unit information SEI message.")
     676#if L0208_SOP_DESCRIPTION_SEI
     677  ("SEISOPDescription",              m_SOPDescriptionSEIEnabled,              0, "Control generation of SOP description SEI messages")
     678#endif
     679#if K0180_SCALABLE_NESTING_SEI
     680  ("SEIScalableNesting",             m_scalableNestingSEIEnabled,              0, "Control generation of scalable nesting SEI messages")
     681#endif
    613682#if SIGNAL_BITRATE_PICRATE_IN_VPS
    614683  ("BitRatePicRateMaxTLayers",   m_bitRatePicRateMaxTLayers,           0, "Maximum number of sub-layers signalled; can be inferred otherwise; here for easy parsing of config. file")
     
    624693  ("ConstantPicRateIdc",           cfg_constantPicRateIdc,            string(""), "List of constant picture rate IDCs; include non-negative number even if corresponding flag is 0")
    625694#endif
     695#if H_3D
     696  ("CameraParameterFile,cpf", m_pchCameraParameterFile,    (Char *) 0, "Camera Parameter File Name")
     697  ("BaseViewCameraNumbers" ,  m_pchBaseViewCameraNumbers,  (Char *) 0, "Numbers of base views")
     698  ("CodedCamParsPrecision",   m_iCodedCamParPrecision,  STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )
     699/* View Synthesis Optimization */
     700
     701#if H_3D_VSO
     702  ("VSOConfig",                       m_pchVSOConfig            , (Char *) 0    , "VSO configuration")
     703  ("VSO",                             m_bUseVSO                 , false         , "Use VSO" )   
     704  ("VSOMode",                         m_uiVSOMode               , (UInt)   4    , "VSO Mode")
     705  ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 1    , "Lambda Scaling for VSO")
     706  ("VSOLSTable",                      m_bVSOLSTable             , true          , "Depth QP dependent video/depth rate allocation by Lagrange multiplier" )     
     707  ("ForceLambdaScaleVSO",             m_bForceLambdaScaleVSO    , false         , "Force using Lambda Scale VSO also in non-VSO-Mode")
     708  ("AllowNegDist",                    m_bAllowNegDist           , true          , "Allow negative Distortion in VSO")
     709 
     710  ("UseEstimatedVSD",                 m_bUseEstimatedVSD        , true          , "Model based VSD estimation instead of rendering based for some encoder decisions" )     
     711  ("VSOEarlySkip",                    m_bVSOEarlySkip           , true          , "Early skip of VSO computation if synthesis error assumed to be zero" )     
     712 
     713  ("WVSO",                            m_bUseWVSO                , true          , "Use depth fidelity term for VSO" )
     714  ("VSOWeight",                       m_iVSOWeight              , 10            , "Synthesized View Distortion Change weight" )
     715  ("VSDWeight",                       m_iVSDWeight              , 1             , "View Synthesis Distortion estimate weight" )
     716  ("DWeight",                         m_iDWeight                , 1             , "Depth Distortion weight" )
     717
     718#endif //HHI_VSO
     719#endif //H_3D
    626720  ;
    627721 
     
    661755  }
    662756#endif
    663 
    664757  po::setDefaults(opts);
    665758  const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv);
     
    681774   */
    682775  /* convert std::string to c string for compatability */
    683 
    684776#if !H_MV
    685777  m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str());
    686778#endif
    687 
    688779  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
    689 
    690780#if !H_MV
    691781  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    692782#endif
    693 
    694783  m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());
    695784 
     
    755844  free ( pRowHeight   );
    756845#endif
    757 
    758846#if SIGNAL_BITRATE_PICRATE_IN_VPS
    759847  readBoolString(cfg_bitRateInfoPresentFlag, m_bitRatePicRateMaxTLayers, m_bitRateInfoPresentFlag, "bit rate info. present flag" );
     
    839927#if H_3D
    840928  xResizeVector( m_depthFlag );
     929
     930  std::vector<Int> uniqueViewIds;
     931  for( Int layer = 0; layer < m_numberOfLayers; layer++ )
     932  {   
     933    Bool isIn = false;
     934    for ( Int i = 0 ; i < uniqueViewIds.size(); i++ )
     935    {
     936      isIn = isIn || ( m_viewId[ layer ] == uniqueViewIds[ i ] );
     937    }
     938    if ( !isIn )
     939    {
     940      uniqueViewIds.push_back( m_viewId[ layer ] );
     941    }
     942  }
     943  m_iNumberOfViews = (Int) uniqueViewIds.size();
    841944#endif
    842945
     
    9141017  m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1;
    9151018
     1019#if J0149_TONE_MAPPING_SEI
     1020  if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag )
     1021  {
     1022    Char* pcStartOfCodedInterval = cfg_startOfCodedInterval.empty() ? NULL: strdup(cfg_startOfCodedInterval.c_str());
     1023    Char* pcCodedPivotValue = cfg_codedPivotValue.empty() ? NULL: strdup(cfg_codedPivotValue.c_str());
     1024    Char* pcTargetPivotValue = cfg_targetPivotValue.empty() ? NULL: strdup(cfg_targetPivotValue.c_str());
     1025    if( m_toneMapModelId == 2 && pcStartOfCodedInterval )
     1026    {
     1027      char *startOfCodedInterval;
     1028      UInt num = 1u<< m_toneMapTargetBitDepth;
     1029      m_startOfCodedInterval = new Int[num];
     1030      ::memset( m_startOfCodedInterval, 0, sizeof(Int)*num );
     1031      startOfCodedInterval = strtok(pcStartOfCodedInterval, " .");
     1032      int i = 0;
     1033      while( startOfCodedInterval && ( i < num ) )
     1034      {
     1035        m_startOfCodedInterval[i] = atoi( startOfCodedInterval );
     1036        startOfCodedInterval = strtok(NULL, " .");
     1037        i++;
     1038      }
     1039    }
     1040    else
     1041    {
     1042      m_startOfCodedInterval = NULL;
     1043    }
     1044    if( ( m_toneMapModelId == 3 ) && ( m_numPivots > 0 ) )
     1045    {
     1046      if( pcCodedPivotValue && pcTargetPivotValue )
     1047      {
     1048        char *codedPivotValue;
     1049        char *targetPivotValue;
     1050        m_codedPivotValue = new Int[m_numPivots];
     1051        m_targetPivotValue = new Int[m_numPivots];
     1052        ::memset( m_codedPivotValue, 0, sizeof(Int)*( m_numPivots ) );
     1053        ::memset( m_targetPivotValue, 0, sizeof(Int)*( m_numPivots ) );
     1054        codedPivotValue = strtok(pcCodedPivotValue, " .");
     1055        int i=0;
     1056        while(codedPivotValue&&i<m_numPivots)
     1057        {
     1058          m_codedPivotValue[i] = atoi( codedPivotValue );
     1059          codedPivotValue = strtok(NULL, " .");
     1060          i++;
     1061        }
     1062        i=0;
     1063        targetPivotValue = strtok(pcTargetPivotValue, " .");
     1064        while(targetPivotValue&&i<m_numPivots)
     1065        {
     1066          m_targetPivotValue[i]= atoi( targetPivotValue );
     1067          targetPivotValue = strtok(NULL, " .");
     1068          i++;
     1069        }
     1070      }
     1071    }
     1072    else
     1073    {
     1074      m_codedPivotValue = NULL;
     1075      m_targetPivotValue = NULL;
     1076    }
     1077  }
     1078#endif
     1079#if H_3D
     1080  // set global varibles
     1081  xSetGlobal();
     1082#if H_3D_VSO
     1083// Table base optimization
     1084  // Q&D
     1085  Double adLambdaScaleTable[] =
     1086  {  0.031250, 0.031639, 0.032029, 0.032418, 0.032808, 0.033197, 0.033586, 0.033976, 0.034365, 0.034755,
     1087     0.035144, 0.035533, 0.035923, 0.036312, 0.036702, 0.037091, 0.037480, 0.037870, 0.038259, 0.038648,
     1088     0.039038, 0.039427, 0.039817, 0.040206, 0.040595, 0.040985, 0.041374, 0.041764, 0.042153, 0.042542,
     1089     0.042932, 0.043321, 0.043711, 0.044100, 0.044194, 0.053033, 0.061872, 0.070711, 0.079550, 0.088388,
     1090     0.117851, 0.147314, 0.176777, 0.235702, 0.294628, 0.353553, 0.471405, 0.589256, 0.707107, 0.707100,
     1091     0.753550, 0.800000 
     1092  };
     1093  if ( m_bVSOLSTable )
     1094  {
     1095    Int firstDepthLayer = -1;
     1096    for (Int layer = 0; layer < m_numberOfLayers; layer++ )
     1097    {
     1098      if ( m_depthFlag[ layer ])
     1099      {
     1100        firstDepthLayer = layer;
     1101        break;
     1102      }
     1103    }
     1104    AOT( firstDepthLayer == -1 );
     1105    AOT( (m_iQP[firstDepthLayer] < 0) || (m_iQP[firstDepthLayer] > 51));
     1106    m_dLambdaScaleVSO *= adLambdaScaleTable[m_iQP[firstDepthLayer]];
     1107  }
     1108#endif
     1109#if H_3D_VSO
     1110if ( m_bUseVSO && m_uiVSOMode == 4)
     1111{
     1112  m_cRenModStrParser.setString( m_iNumberOfViews, m_pchVSOConfig );
     1113  m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
     1114                                      g_bitDepthY,
     1115                                (UInt)m_iCodedCamParPrecision,
     1116                                      m_FrameSkip,
     1117                                (UInt)m_framesToBeEncoded,
     1118                                      m_pchCameraParameterFile,
     1119                                      m_pchBaseViewCameraNumbers,
     1120                                      NULL,
     1121                                      m_cRenModStrParser.getSynthViews(),
     1122                                      LOG2_DISP_PREC_LUT );
     1123}
     1124else if ( m_bUseVSO && m_uiVSOMode != 4 )
     1125{
     1126  m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
     1127                                      g_bitDepthY,
     1128                                (UInt)m_iCodedCamParPrecision,
     1129                                      m_FrameSkip,
     1130                                (UInt)m_framesToBeEncoded,
     1131                                      m_pchCameraParameterFile,
     1132                                      m_pchBaseViewCameraNumbers,
     1133                                      m_pchVSOConfig,
     1134                                      NULL,
     1135                                      LOG2_DISP_PREC_LUT );
     1136}
     1137else
     1138{
     1139  m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
     1140    g_bitDepthY,
     1141    (UInt) m_iCodedCamParPrecision,
     1142    m_FrameSkip,
     1143    (UInt) m_framesToBeEncoded,
     1144    m_pchCameraParameterFile,
     1145    m_pchBaseViewCameraNumbers,
     1146    NULL,
     1147    NULL,
     1148    LOG2_DISP_PREC_LUT );
     1149}
     1150#else
     1151  m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ),
     1152    g_bitDepthY,
     1153    (UInt) m_iCodedCamParPrecision,
     1154    m_FrameSkip,
     1155    (UInt) m_framesToBeEncoded,
     1156    m_pchCameraParameterFile,
     1157    m_pchBaseViewCameraNumbers,
     1158    NULL,
     1159    NULL,
     1160    LOG2_DISP_PREC_LUT );
     1161#endif
     1162  m_cCameraData.check( false, true );
     1163#endif
    9161164  // check validity of input parameters
    9171165  xCheckParameter();
    918  
     1166
     1167#if !H_3D
    9191168  // set global varibles
    9201169  xSetGlobal();
     1170#endif
    9211171 
    9221172  // print-out parameters
     
    10131263  xConfirmPara( m_iFrameRate <= 0,                                                          "Frame rate must be more than 1" );
    10141264  xConfirmPara( m_framesToBeEncoded <= 0,                                                   "Total Number Of Frames encoded must be more than 0" );
    1015 
    10161265#if H_MV
    10171266  xConfirmPara( m_numberOfLayers > MAX_NUM_LAYER_IDS ,                                      "NumberOfLayers must be less than or equal to MAX_NUM_LAYER_IDS");
     
    10261275  xConfirmPara( m_scalabilityMask != 1 , "Scalability Mask must be equal to 1. ");
    10271276#endif
    1028   
     1277 
    10291278  m_dimIds.push_back( m_viewId );
     1279  const Int viewDimPosition = 0;
    10301280#if H_3D
    10311281  if ( m_scalabilityMask & ( 1 << DEPTH_ID ) )
     
    10371287 for( Int dim = 0; dim < m_dimIds.size(); dim++ )
    10381288 {
    1039    xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers,  "DimensionId must be given for all layers and all dimensions. ");
    1040    xConfirmPara( m_dimIds[dim][0] != 0,                    "DimensionId of layer 0 must be 0 in all dimensions. " );
     1289   xConfirmPara( m_dimIds[dim].size() < m_numberOfLayers,  "DimensionId must be given for all layers and all dimensions. ");   
     1290   xConfirmPara( ( dim != viewDimPosition ) &&  (m_dimIds[dim][0] != 0), "DimensionId of layer 0 must be 0. " );
    10411291   xConfirmPara( m_dimensionIdLen[dim] < 1 || m_dimensionIdLen[dim] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " );
    10421292   for( Int i = 1; i < m_numberOfLayers; i++ )
     
    10731323     {
    10741324       Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ];
    1075        if ( !inc )
     1325       Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ;
     1326       if ( shallBeButIsNotIncreasing )
    10761327       {       
    10771328         printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff);       
    10781329       }
    1079        xConfirmPara( !inc,  "DimensionIds shall be increasing within one dimension. " );
     1330       xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ),  "DimensionIds shall be increasing within one dimension. " );
    10801331     }
    10811332   }
     
    10831334
    10841335#endif
    1085 
    1086 
    10871336  xConfirmPara( m_iGOPSize < 1 ,                                                            "GOP Size must be greater or equal to 1" );
    10881337  xConfirmPara( m_iGOPSize > 1 &&  m_iGOPSize % 2,                                          "GOP Size must be a multiple of 2, if GOP Size is greater than 1" );
     
    11851434  xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling");
    11861435
     1436#if H_3D
     1437  xConfirmPara( m_pchCameraParameterFile    == 0                ,   "CameraParameterFile must be given");
     1438  xConfirmPara( m_pchBaseViewCameraNumbers  == 0                ,   "BaseViewCameraNumbers must be given" );
     1439  xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
     1440  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
     1441#if H_3D_VSO
     1442    if( m_bUseVSO )
     1443    {
     1444      xConfirmPara(   m_pchVSOConfig            == 0                             ,   "VSO Setup string must be given");
     1445      xConfirmPara( m_uiVSOMode > 4 ,                                                "VSO Mode must be less than 5");
     1446    }
     1447#endif
     1448#endif
    11871449  // max CU width and height should be power of 2
    11881450  UInt ui = m_uiMaxCUWidth;
     
    13481610      Int*      m_numReorderPics     = m_numReorderPicsMvc    [layer]; // It is not a member, but this name helps avoiding code duplication !!!
    13491611#endif
    1350 
    13511612  /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure
    13521613   * This permits the ability to omit a GOP structure specification */
     
    16091870  {
    16101871    m_numReorderPics[i] = 0;
     1872#if L0323_DPB
     1873    m_maxDecPicBuffering[i] = 1;
     1874#else
    16111875    m_maxDecPicBuffering[i] = 0;
     1876#endif
    16121877  }
    16131878  for(Int i=0; i<m_iGOPSize; i++)
    16141879  {
     1880#if L0323_DPB
     1881    if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
     1882#else
    16151883    if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId])
    1616     {
     1884#endif
     1885    {
     1886#if L0323_DPB
     1887      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1;
     1888#else
    16171889      m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics;
     1890#endif
    16181891    }
    16191892    Int highestDecodingNumberWithLowerPOC = 0;
     
    16461919      m_numReorderPics[i+1] = m_numReorderPics[i];
    16471920    }
     1921#if L0323_DPB
     1922    // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive
     1923    if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1)
     1924    {
     1925      m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1;
     1926    }
     1927#else
    16481928    // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    16491929    if(m_numReorderPics[i] > m_maxDecPicBuffering[i])
     
    16511931      m_maxDecPicBuffering[i] = m_numReorderPics[i];
    16521932    }
     1933#endif
    16531934    // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer
    16541935    if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i])
     
    16571938    }
    16581939  }
     1940
     1941
     1942#if L0323_DPB
     1943  // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] -  1, inclusive
     1944  if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1)
     1945  {
     1946    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1;
     1947  }
     1948#else
    16591949  // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive
    16601950  if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1])
     
    16621952    m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1];
    16631953  }
     1954#endif
    16641955
    16651956  if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag)
     
    17362027    }
    17372028  }
     2029#if !L0034_COMBINED_LIST_CLEANUP
    17382030  xConfirmPara( m_bUseLComb==false && m_numReorderPics[MAX_TLAYER-1]!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" );  // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1.
     2031#endif
    17392032  xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" );
    17402033  xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" );
     
    17432036  xConfirmPara( m_decodedPictureHashSEIEnabled<0 || m_decodedPictureHashSEIEnabled>3, "this hash type is not correct!\n");
    17442037
     2038#if J0149_TONE_MAPPING_SEI
     2039  if (m_toneMappingInfoSEIEnabled)
     2040  {
     2041    xConfirmPara( m_toneMapCodedDataBitDepth < 8 || m_toneMapCodedDataBitDepth > 14 , "SEIToneMapCodedDataBitDepth must be in rage 8 to 14");
     2042    xConfirmPara( m_toneMapTargetBitDepth < 1 || (m_toneMapTargetBitDepth > 16 && m_toneMapTargetBitDepth < 255) , "SEIToneMapTargetBitDepth must be in rage 1 to 16 or equal to 255");
     2043    xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4");
     2044    xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0");
     2045    xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100");
     2046    xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue");
     2047    xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue");
     2048  }
     2049#endif
     2050
    17452051#if RATE_CONTROL_LAMBDA_DOMAIN
    17462052  if ( m_RCEnableRateControl )
     
    17792085  }
    17802086#endif
    1781 
    17822087#if H_MV
    17832088  }
     
    18272132  printf("Input          File          : %s\n", m_pchInputFile          );
    18282133#endif
    1829 
    18302134  printf("Bitstream      File          : %s\n", m_pchBitstreamFile      );
    1831 
    18322135#if H_MV
    18332136  for( Int layer = 0; layer < m_numberOfLayers; layer++)
     
    18382141  printf("Reconstruction File          : %s\n", m_pchReconFile          );
    18392142#endif
    1840 
    1841 #if H_MV
    1842  xPrintParaVector( "ViewId", m_viewId );
    1843 #endif
    1844 
     2143#if H_MV
     2144  xPrintParaVector( "ViewId", m_viewId );
     2145#endif
    18452146#if H_3D
    1846  xPrintParaVector( "DepthFlag", m_depthFlag );
    1847 #endif
    1848 
     2147  xPrintParaVector( "DepthFlag", m_depthFlag );
     2148  printf("Coded Camera Param. Precision: %d\n", m_iCodedCamParPrecision);
     2149#endif
    18492150#if H_MV 
    18502151  xPrintParaVector( "QP"               , m_fQP                );
     
    18952196#endif
    18962197  printf("Max Num Merge Candidates     : %d\n", m_maxNumMergeCand);
     2198#if H_3D
     2199  printf("BaseViewCameraNumbers        : %s\n", m_pchBaseViewCameraNumbers );
     2200  printf("Coded Camera Param. Precision: %d\n", m_iCodedCamParPrecision);
     2201#if H_3D_VSO
     2202  printf("Force use of Lambda Scale    : %d\n", m_bForceLambdaScaleVSO );
     2203
     2204  if ( m_bUseVSO )
     2205  {   
     2206    printf("VSO Lambda Scale             : %5.2f\n", m_dLambdaScaleVSO );
     2207    printf("VSO Mode                     : %d\n",    m_uiVSOMode       );
     2208    printf("VSO Config                   : %s\n",    m_pchVSOConfig    );
     2209    printf("VSO Negative Distortion      : %d\n",    m_bAllowNegDist ? 1 : 0);
     2210    printf("VSO LS Table                 : %d\n",    m_bVSOLSTable ? 1 : 0);
     2211    printf("VSO Estimated VSD            : %d\n",    m_bUseEstimatedVSD ? 1 : 0);
     2212    printf("VSO Early Skip               : %d\n",    m_bVSOEarlySkip ? 1 : 0);   
     2213    if ( m_bUseWVSO )
     2214    printf("Dist. Weights (VSO/VSD/SAD)  : %d/%d/%d\n ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
     2215  }
     2216#endif //HHI_VSO
     2217#endif //H_3D
    18972218  printf("\n");
    1898  
     2219#if H_MV
     2220  printf("TOOL CFG General: ");
     2221#else
    18992222  printf("TOOL CFG: ");
     2223#endif
    19002224  printf("IBD:%d ", g_bitDepthY > m_inputBitDepthY || g_bitDepthC > m_inputBitDepthC);
    19012225  printf("HAD:%d ", m_bUseHADME           );
     
    19082232  printf("SQP:%d ", m_uiDeltaQpRD         );
    19092233  printf("ASR:%d ", m_bUseASR             );
     2234#if !L0034_COMBINED_LIST_CLEANUP
    19102235  printf("LComb:%d ", m_bUseLComb         );
     2236#endif
    19112237  printf("FEN:%d ", m_bUseFastEnc         );
    19122238  printf("ECU:%d ", m_bUseEarlyCU         );
     
    19432269  printf("TMVPMode:%d ", m_TMVPModeId     );
    19442270#if ADAPTIVE_QP_SELECTION
    1945   printf("AQpS:%d", m_bUseAdaptQpSelect   );
     2271  printf("AQpS:%d ", m_bUseAdaptQpSelect   );
    19462272#endif
    19472273
    19482274  printf(" SignBitHidingFlag:%d ", m_signHideFlag);
    1949   printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 );
    1950   printf("\n\n");
    1951  
     2275  printf("RecalQP:%d ", m_recalculateQPAccordingToLambda ? 1 : 0 );
     2276#if H_3D_VSO
     2277  printf("VSO:%d ", m_bUseVSO   );
     2278  printf("WVSO:%d ", m_bUseWVSO ); 
     2279#endif
     2280  printf("\n\n"); 
     2281
    19522282  fflush(stdout);
    19532283}
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncCfg.h

    r438 r446  
    4343#include "TLibEncoder/TEncCfg.h"
    4444#include <sstream>
     45#if H_3D
     46#include "TAppCommon/TAppComCamPara.h"
     47#include "TLibRenderer/TRenModel.h"
     48#include "TLibRenderer/TRenModSetupStrParser.h"
     49#endif
    4550//! \ingroup TAppEncoder
    4651//! \{
     
    6065  Char*     m_pchInputFile;                                   ///< source file name
    6166#endif
    62 
    6367  Char*     m_pchBitstreamFile;                               ///< output bitstream file
    64 
    6568#if H_MV
    6669  std::vector<char*>     m_pchReconFileList;                  ///< output reconstruction file names
    6770  Int                    m_numberOfLayers;                    ///< number of Layers to Encode
     71#if H_3D
     72  Int                    m_iNumberOfViews;                    ///< number of Layers that are views
     73#endif
    6874#else
    6975  Char*     m_pchReconFile;                                   ///< output reconstruction file
    7076#endif
    71 
    72 
    73   // VPS specification
    74 #if H_MV
     77  #if H_MV
     78// VPS specification
    7579  std::vector< std::vector<Int> > m_dimIds;                   ///< dimension ids ( pointers to m_viewId and m_depthFlag
    7680  std::vector<Int>       m_viewId;                            ///< view id
     
    8387  std::vector<Int>       m_dimensionIdLen;                   ///< Length of scalability dimension s
    8488#endif
    85 
    86 
    8789  Double    m_adLambdaModifier[ MAX_TLAYER ];                 ///< Lambda modifier array for each temporal layer
    8890  // source specification
     
    103105  Level::Tier   m_levelTier;
    104106  Level::Name   m_level;
    105 
    106107#if L0046_CONSTRAINT_FLAGS
    107108  Bool m_progressiveSourceFlag;
     
    124125  GOPEntry  m_GOPList[MAX_GOP];                               ///< the coding structure entries from the config file
    125126  Int       m_numReorderPics[MAX_TLAYER];                     ///< total number of reorder pictures
     127#if L0323_DPB
     128  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of pictures in the decoded picture buffer
     129#else
    126130  Int       m_maxDecPicBuffering[MAX_TLAYER];                 ///< total number of reference pictures needed for decoding
    127131#endif
     132#endif
     133#if !L0034_COMBINED_LIST_CLEANUP
    128134  Bool      m_bUseLComb;                                      ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)
     135#endif
    129136  Bool      m_useTransformSkip;                               ///< flag for enabling intra transform skipping
    130137  Bool      m_useTransformSkipFast;                           ///< flag for enabling fast intra transform skipping
     
    207214  Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
    208215  Bool      m_DeblockingFilterControlPresent;                 ///< deblocking filter control present flag in PPS
     216#if L0386_DB_METRIC
     217  Bool      m_DeblockingFilterMetric;                         ///< blockiness metric in encoder
     218#endif
    209219 
    210220  // coding tools (PCM)
     
    256266  Int       m_bufferingPeriodSEIEnabled;
    257267  Int       m_pictureTimingSEIEnabled;
     268#if J0149_TONE_MAPPING_SEI
     269  Bool      m_toneMappingInfoSEIEnabled;
     270  Int       m_toneMapId;
     271  Bool      m_toneMapCancelFlag;
     272  Bool      m_toneMapPersistenceFlag;
     273  Int       m_toneMapCodedDataBitDepth;
     274  Int       m_toneMapTargetBitDepth;
     275  Int       m_toneMapModelId;
     276  Int       m_toneMapMinValue;
     277  Int       m_toneMapMaxValue;
     278  Int       m_sigmoidMidpoint;
     279  Int       m_sigmoidWidth;
     280  Int       m_numPivots;
     281  Int       m_cameraIsoSpeedIdc;
     282  Int       m_cameraIsoSpeedValue;
     283  Int       m_exposureCompensationValueSignFlag;
     284  Int       m_exposureCompensationValueNumerator;
     285  Int       m_exposureCompensationValueDenomIdc;
     286  Int       m_refScreenLuminanceWhite;
     287  Int       m_extendedRangeWhiteLevel;
     288  Int       m_nominalBlackLevelLumaCodeValue;
     289  Int       m_nominalWhiteLevelLumaCodeValue;
     290  Int       m_extendedWhiteLevelLumaCodeValue;
     291  Int*      m_startOfCodedInterval;
     292  Int*      m_codedPivotValue;
     293  Int*      m_targetPivotValue;
     294#endif
    258295  Int       m_framePackingSEIEnabled;
    259296  Int       m_framePackingSEIType;
     
    265302  Int       m_gradualDecodingRefreshInfoEnabled;
    266303  Int       m_decodingUnitInfoSEIEnabled;
     304#if L0208_SOP_DESCRIPTION_SEI
     305  Int       m_SOPDescriptionSEIEnabled;
     306#endif
     307#if K0180_SCALABLE_NESTING_SEI
     308  Int       m_scalableNestingSEIEnabled;
     309#endif
    267310  // weighted prediction
    268311  Bool      m_useWeightedPred;                    ///< Use of weighted prediction in P slices
     
    332375  Int       m_log2MaxMvLengthVertical;                        ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units
    333376
     377#if H_3D
     378  // Camera parameters
     379  Char*     m_pchCameraParameterFile;                         ///< camera parameter file
     380  Char*     m_pchBaseViewCameraNumbers;
     381  TAppComCamPara m_cCameraData;
     382  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
     383#if H_3D_VSO
     384  Char*     m_pchVSOConfig;
     385  Bool      m_bUseVSO;                                    ///< flag for using View Synthesis Optimization
     386  Bool      m_bVSOLSTable;                                ///< Depth QP dependent Lagrange parameter optimization (m23714)
     387  Bool      m_bVSOEarlySkip;                              ///< Early skip of VSO computation (JCT3V-A0093 modification 4)
     388
     389  //// Used for development by GT, might be removed later
     390  Double    m_dLambdaScaleVSO;                            ///< Scaling factor for Lambda in VSO mode
     391  Bool      m_bForceLambdaScaleVSO;                       ///< Use Lambda Scale for depth even if VSO is turned off
     392  Bool      m_bAllowNegDist;                              ///< Allow negative distortion in VSO
     393  UInt      m_uiVSOMode;                                  ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full 
     394
     395  // SAIT_VSO_EST_A0033
     396  Bool      m_bUseEstimatedVSD;                           ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 
     397
     398  // LGE_WVSO_A0119
     399  Bool      m_bUseWVSO;                                    ///< flag for using View Synthesis Optimization 
     400  Int       m_iVSOWeight;
     401  Int       m_iVSDWeight;
     402  Int       m_iDWeight;
     403
     404  // Ren Model String
     405  TRenModSetupStrParser       m_cRenModStrParser;
     406#endif
     407#endif
    334408  // internal member functions
    335409  Void  xSetGlobal      ();                                   ///< set global variables
     
    337411  Void  xPrintParameter ();                                   ///< print configuration values
    338412  Void  xPrintUsage     ();                                   ///< print usage
    339 
    340413#if H_MV
    341414  template <typename T>
     
    388461  Int*      m_constantPicRateIdc;                                ///< Indicates constant picture rate idc for various sub-layers
    389462#endif
    390  
    391463#if H_MV
    392464  Int   getGOPSize() { return m_iGOPSize; }
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r438 r446  
    7070Void TAppEncTop::xInitLibCfg()
    7171{
     72#if H_MV
     73  TComVPS& vps = m_vps;   
     74#else
    7275  TComVPS vps;
     76#endif
    7377 
    7478#if H_MV
     
    111115  }
    112116#endif
    113 
    114117#if H_MV
    115118  xSetLayerIds             ( vps );   
    116119  xSetDimensionIdAndLength ( vps );
    117120  xSetDirectDependencyFlags( vps );
     121#if H_3D
     122  vps.initViewIndex();
     123  m_ivPicLists.setVPS      ( &vps );
     124#endif
    118125
    119126  for(Int layer = 0; layer < m_numberOfLayers; layer++)
     
    128135    TEncTop& m_cTEncTop = *m_acTEncTopList[ layer ];  // It is not a member, but this name helps avoiding code duplication !!!
    129136   
    130     m_cTEncTop.setLayerIdInVps( layer );
    131     m_cTEncTop.setLayerId     ( vps.getLayerIdInNuh( layer ) );   
    132     m_cTEncTop.setViewId      ( vps.getViewId      ( layer ) );
     137    m_cTEncTop.setLayerIdInVps                 ( layer );
     138    m_cTEncTop.setLayerId                      ( vps.getLayerIdInNuh( layer ) );   
     139    m_cTEncTop.setViewId                       ( vps.getViewId      ( layer ) );
    133140#if H_3D
    134     m_cTEncTop.setIsDepth     ( vps.getDepthId     ( layer ) != 0 );
    135 #endif
    136     m_cTEncTop.setIvPicLists  ( &m_ivPicLists );
    137 #endif
    138 
     141    Bool isDepth = ( vps.getDepthId     ( layer ) != 0 ) ;
     142    m_cTEncTop.setViewIndex                    ( vps.getViewIndex   ( layer ) );
     143    m_cTEncTop.setIsDepth                      ( isDepth );
     144    //====== Camera Parameters =========
     145    m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
     146    m_cTEncTop.setCamParPrecision              ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision  () );
     147    m_cTEncTop.setCamParInSliceHeader          ( isDepth ? 0     : m_cCameraData.getVaryingCameraParameters() );
     148    m_cTEncTop.setCodedScale                   ( isDepth ? 0     : m_cCameraData.getCodedScale             () );
     149    m_cTEncTop.setCodedOffset                  ( isDepth ? 0     : m_cCameraData.getCodedOffset            () );
     150#if H_3D_VSO
     151    //====== VSO =========
     152    m_cTEncTop.setRenderModelParameters        ( &m_cRenModStrParser );
     153    m_cTEncTop.setForceLambdaScaleVSO          ( isDepth ? m_bForceLambdaScaleVSO : false );
     154    m_cTEncTop.setLambdaScaleVSO               ( isDepth ? m_dLambdaScaleVSO      : 1     );
     155    m_cTEncTop.setVSOMode                      ( isDepth ? m_uiVSOMode            : 0     );
     156
     157    m_cTEncTop.setAllowNegDist                 ( isDepth ? m_bAllowNegDist        : false );
     158
     159    // SAIT_VSO_EST_A0033
     160    m_cTEncTop.setUseEstimatedVSD              ( isDepth ? m_bUseEstimatedVSD     : false );
     161
     162    // LGE_WVSO_A0119
     163    m_cTEncTop.setUseWVSO                      ( isDepth ? m_bUseWVSO             : false );   
     164    m_cTEncTop.setVSOWeight                    ( isDepth ? m_iVSOWeight           : 0     );
     165    m_cTEncTop.setVSDWeight                    ( isDepth ? m_iVSDWeight           : 0     );
     166    m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
     167#endif // H_3D_VSO
     168#endif // H_3D
     169
     170    m_cTEncTop.setIvPicLists                   ( &m_ivPicLists );
     171#endif // H_MV
    139172  m_cTEncTop.setVPS(&vps);
    140173
    141174  m_cTEncTop.setProfile(m_profile);
    142175  m_cTEncTop.setLevel(m_levelTier, m_level);
    143 
    144176#if L0046_CONSTRAINT_FLAGS
    145177  m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag);
     
    186218  m_cTEncTop.setQP                           ( m_iQP );
    187219#endif
     220
    188221  m_cTEncTop.setPad                          ( m_aiPad );
    189    
     222
    190223#if H_MV
    191224  m_cTEncTop.setMaxTempLayer                 ( m_maxTempLayerMvc[layer] );
     
    207240  m_cTEncTop.setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
    208241  m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
     242#if L0386_DB_METRIC
     243  m_cTEncTop.setDeblockingFilterMetric       ( m_DeblockingFilterMetric );
     244#endif
    209245
    210246  //====== Motion search ========
     
    226262  Int lowestQP;
    227263  lowestQP =  - 6*(g_bitDepthY - 8); // XXX: check
     264
    228265#if H_MV
    229266  if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layer] == lowestQP) && (m_useLossless == true))
     
    243280  m_cTEncTop.setUseHADME                     ( m_bUseHADME    );
    244281  m_cTEncTop.setUseLossless                  ( m_useLossless );
     282#if !L0034_COMBINED_LIST_CLEANUP
    245283  m_cTEncTop.setUseLComb                     ( m_bUseLComb    );
     284#endif
    246285#if H_MV
    247286  m_cTEncTop.setdQPs                         ( m_aidQP[layer]   );
     
    321360  m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled );
    322361  m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled );
     362#if J0149_TONE_MAPPING_SEI
     363  m_cTEncTop.setToneMappingInfoSEIEnabled                 ( m_toneMappingInfoSEIEnabled );
     364  m_cTEncTop.setTMISEIToneMapId                           ( m_toneMapId );
     365  m_cTEncTop.setTMISEIToneMapCancelFlag                   ( m_toneMapCancelFlag );
     366  m_cTEncTop.setTMISEIToneMapPersistenceFlag              ( m_toneMapPersistenceFlag );
     367  m_cTEncTop.setTMISEICodedDataBitDepth                   ( m_toneMapCodedDataBitDepth );
     368  m_cTEncTop.setTMISEITargetBitDepth                      ( m_toneMapTargetBitDepth );
     369  m_cTEncTop.setTMISEIModelID                             ( m_toneMapModelId );
     370  m_cTEncTop.setTMISEIMinValue                            ( m_toneMapMinValue );
     371  m_cTEncTop.setTMISEIMaxValue                            ( m_toneMapMaxValue );
     372  m_cTEncTop.setTMISEISigmoidMidpoint                     ( m_sigmoidMidpoint );
     373  m_cTEncTop.setTMISEISigmoidWidth                        ( m_sigmoidWidth );
     374  m_cTEncTop.setTMISEIStartOfCodedInterva                 ( m_startOfCodedInterval );
     375  m_cTEncTop.setTMISEINumPivots                           ( m_numPivots );
     376  m_cTEncTop.setTMISEICodedPivotValue                     ( m_codedPivotValue );
     377  m_cTEncTop.setTMISEITargetPivotValue                    ( m_targetPivotValue );
     378  m_cTEncTop.setTMISEICameraIsoSpeedIdc                   ( m_cameraIsoSpeedIdc );
     379  m_cTEncTop.setTMISEICameraIsoSpeedValue                 ( m_cameraIsoSpeedValue );
     380  m_cTEncTop.setTMISEIExposureCompensationValueSignFlag   ( m_exposureCompensationValueSignFlag );
     381  m_cTEncTop.setTMISEIExposureCompensationValueNumerator  ( m_exposureCompensationValueNumerator );
     382  m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc   ( m_exposureCompensationValueDenomIdc );
     383  m_cTEncTop.setTMISEIRefScreenLuminanceWhite             ( m_refScreenLuminanceWhite );
     384  m_cTEncTop.setTMISEIExtendedRangeWhiteLevel             ( m_extendedRangeWhiteLevel );
     385  m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue      ( m_nominalBlackLevelLumaCodeValue );
     386  m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue      ( m_nominalWhiteLevelLumaCodeValue );
     387  m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue     ( m_extendedWhiteLevelLumaCodeValue );
     388#endif
    323389  m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );
    324390  m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType );
     
    330396  m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled );
    331397  m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled );
     398#if L0208_SOP_DESCRIPTION_SEI
     399  m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled );
     400#endif
     401#if K0180_SCALABLE_NESTING_SEI
     402  m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled );
     403#endif
    332404  m_cTEncTop.setUniformSpacingIdr          ( m_iUniformSpacingIdr );
    333405  m_cTEncTop.setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     
    424496  }
    425497#endif
    426 
    427 #if H_MV
    428   }
    429 #endif
    430 
     498#if H_MV
     499  }
     500#endif
     501#if H_3D_VSO
     502  if ( m_bUseVSO )
     503  {
     504    if ( m_uiVSOMode == 4 )
     505    {
     506#if H_3D_VSO_EARLY_SKIP
     507      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip );
     508#else
     509      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 );
     510#endif
     511      for ( Int layer = 0; layer < m_numberOfLayers ; layer++ )
     512      {
     513        TEncTop* pcEncTop =  m_acTEncTopList[ layer ];
     514        Int iViewNum      = pcEncTop->getViewIndex();
     515        Int iContent      = pcEncTop->getIsDepth() ? 1 : 0;
     516        Int iNumOfModels  = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent);
     517
     518        Bool bUseVSO      = (iNumOfModels != 0);
     519
     520        pcEncTop->setUseVSO( bUseVSO );
     521        pcEncTop->getRdCost()->setRenModel( bUseVSO ? &m_cRendererModel : NULL );
     522
     523        for (Int iCurModel = 0; iCurModel < iNumOfModels; iCurModel++ )
     524        {
     525          Int iModelNum; Int iLeftViewNum; Int iRightViewNum; Int iDump; Int iOrgRefNum; Int iBlendMode;
     526
     527          m_cRenModStrParser.getSingleModelData  ( iViewNum, iContent, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
     528          m_cRendererModel  .createSingleModel   ( iViewNum, iContent, iModelNum, iLeftViewNum, iRightViewNum, (iOrgRefNum != -1), iBlendMode );
     529        }           
     530      }
     531    }
     532    else
     533    {
     534      AOT(true);
     535    }
     536  }
     537#endif
    431538}
    432539
     
    579686
    580687        eos[layer] = (m_frameRcvd[layer] == m_framesToBeEncoded);
    581         allEos = allEos|eos[layer];
     688        allEos = allEos||eos[layer];
    582689
    583690        // if end of file (which is only detected on a read failure) flush the encoder of any queued pictures
     
    585692        {
    586693          flush          [layer] = true;
    587           eos            [layer]   = true;
     694          eos            [layer] = true;
    588695          m_frameRcvd    [layer]--;
    589696          m_acTEncTopList[layer]->setFramesToBeEncoded(m_frameRcvd[layer]);
     
    593700    for ( Int gopId=0; gopId < gopSize; gopId++ )
    594701    {
     702#if H_3D
     703      UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId );
     704      if ( iNextPoc < m_framesToBeEncoded )
     705      {
     706        m_cCameraData.update( iNextPoc );
     707      }
     708#endif
    595709      for(Int layer=0; layer < m_numberOfLayers; layer++ )
    596710      {
     711#if H_3D_VSO       
     712          if( m_bUseVSO && m_bUseEstimatedVSD && iNextPoc < m_framesToBeEncoded )
     713          {
     714            m_cCameraData.setDispCoeff( iNextPoc, m_acTEncTopList[layer]->getViewIndex() );
     715            m_acTEncTopList[layer]  ->setDispCoeff( m_cCameraData.getDispCoeff() );
     716          }
     717#endif
    597718        Int   iNumEncoded = 0;
    598719
     
    602723        outputAccessUnits.clear();
    603724      }
    604 
    605725    }
    606726    gopSize = maxGopSize;
     
    666786  return;
    667787}
    668 
    669 #if H_3D
    670 TEncTop* TAppEncTop::getTEncTopView( Int viewId, Bool isDepth )
    671 {
    672   TEncTop* encoder = NULL;
    673   for( Int layer = 0; layer < m_acTEncTopList.size(); layer++ )
    674   {
    675     if( m_acTEncTopList[layer]->getViewId()  == viewId &&
    676         m_acTEncTopList[layer]->getIsDepth() == isDepth )
    677     {
    678       encoder = m_acTEncTopList[layer];
    679       break;
    680     }
    681   }
    682   return encoder;
    683 }
    684 #endif
    685788
    686789// ====================================================================================================================
     
    694797 .
    695798 */
    696 
    697799#if H_MV
    698800Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer)
     
    722824
    723825  }
    724 
    725826#if H_MV
    726827  m_picYuvRec[layer]->pushBack( rpcPicYuvRec );
     
    732833Void TAppEncTop::xDeleteBuffer( )
    733834{
    734 
    735835#if H_MV
    736836  for(Int layer=0; layer<m_picYuvRec.size(); layer++)
     
    757857  }
    758858#endif 
    759 
    760859}
    761860
     
    787886  {
    788887    TComPicYuv*  pcPicYuvRec  = *(iterPicYuvRec++);
    789 
    790888#if H_MV
    791889      if (m_pchReconFileList[layerId])
     
    815913  }
    816914#endif
    817 
    818915}
    819916
     
    832929    case NAL_UNIT_CODED_SLICE_TRAIL_R:
    833930    case NAL_UNIT_CODED_SLICE_TRAIL_N:
    834     case NAL_UNIT_CODED_SLICE_TLA:
     931    case NAL_UNIT_CODED_SLICE_TLA_R:
    835932    case NAL_UNIT_CODED_SLICE_TSA_N:
    836933    case NAL_UNIT_CODED_SLICE_STSA_R:
    837934    case NAL_UNIT_CODED_SLICE_STSA_N:
    838     case NAL_UNIT_CODED_SLICE_BLA:
    839     case NAL_UNIT_CODED_SLICE_BLANT:
     935    case NAL_UNIT_CODED_SLICE_BLA_W_LP:
     936    case NAL_UNIT_CODED_SLICE_BLA_W_RADL:
    840937    case NAL_UNIT_CODED_SLICE_BLA_N_LP:
    841     case NAL_UNIT_CODED_SLICE_IDR:
     938    case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
    842939    case NAL_UNIT_CODED_SLICE_IDR_N_LP:
    843940    case NAL_UNIT_CODED_SLICE_CRA:
    844941    case NAL_UNIT_CODED_SLICE_RADL_N:
    845     case NAL_UNIT_CODED_SLICE_DLP:
     942    case NAL_UNIT_CODED_SLICE_RADL_R:
    846943    case NAL_UNIT_CODED_SLICE_RASL_N:
    847     case NAL_UNIT_CODED_SLICE_TFD:
     944    case NAL_UNIT_CODED_SLICE_RASL_R:
    848945    case NAL_UNIT_VPS:
    849946    case NAL_UNIT_SPS:
     
    861958void TAppEncTop::printRateSummary()
    862959{
    863 
    864960#if H_MV
    865961  Double time = (Double) m_frameRcvd[0] / m_iFrameRate;
     
    868964  Double time = (Double) m_iFrameRcvd / m_iFrameRate;
    869965#endif
    870 
    871966  printf("Bytes written to file: %u (%.3f kbps)\n", m_totalBytes, 0.008 * m_totalBytes / time);
    872967#if VERBOSE_RATE
     
    881976  for( Int dim = 0; dim < m_dimIds.size(); dim++ )
    882977  {
    883       vps.setDimensionIdLen( dim, m_dimensionIdLen[ dim ] );
    884       for( Int layer = 1; layer < vps.getMaxLayers(); layer++ )
    885       {       
    886         vps.setDimensionId( layer, dim, m_dimIds[ dim ][ layer ] );       
    887      
     978    vps.setDimensionIdLen( dim, m_dimensionIdLen[ dim ] );
     979    for( Int layer = 0; layer < vps.getMaxLayers(); layer++ )
     980    {       
     981      vps.setDimensionId( layer, dim, m_dimIds[ dim ][ layer ] );       
     982   
    888983  }
    889984}
     
    9371032}
    9381033#endif
    939 
    9401034//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/TAppEncTop.h

    r438 r446  
    4646#include "TLibCommon/AccessUnit.h"
    4747#include "TAppEncCfg.h"
     48#if H_3D
     49#include "../../Lib/TLibRenderer/TRenTop.h"
     50#endif
    4851
    4952//! \ingroup TAppEncoder
     
    5962private:
    6063  // class interface
    61 
    6264#if H_MV
    6365  std::vector<TEncTop*>      m_acTEncTopList ;              ///< encoder class per layer
     
    7072
    7173  TComPicLists               m_ivPicLists;                  ///< picture buffers of encoder instances
     74  TComVPS                    m_vps;                         ///< vps
    7275#else
    7376  TEncTop                    m_cTEncTop;                    ///< encoder class
     
    8285  UInt m_essentialBytes;
    8386  UInt m_totalBytes;
     87#if H_3D_VSO
     88  TRenTop                     m_cRendererTop;
     89  TRenModel                   m_cRendererModel;   
     90#endif
    8491protected:
    8592  // initialization
     
    9198  /// obtain required buffers
    9299#if H_MV
    93   Void xGetBuffer(TComPicYuv*& rpcPicYuvRec, UInt layer);
     100  Void  xGetBuffer(TComPicYuv*& rpcPicYuvRec, UInt layer);
    94101#else
    95102  Void xGetBuffer(TComPicYuv*& rpcPicYuvRec);
     
    100107 
    101108  // file I/O
    102 
    103109#if H_MV
    104110  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, std::list<AccessUnit>& accessUnits, UInt layerId); ///< write bitstream to file
     
    106112  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); ///< write bitstream to file
    107113#endif
    108 
    109114  void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);
    110115  void printRateSummary();
     
    116121  Int  xGetMax( std::vector<Int>& vec);
    117122#endif
    118 
    119123public:
    120124  TAppEncTop();
     
    122126 
    123127  Void        encode      ();                               ///< main encoding function
    124 
    125128#if H_MV
    126   TEncTop*    getTEncTopLayer(UInt layer) { return  m_acTEncTopList[layer]; }  ///< return pointer to encoder class for specific layer
    127 #if H_3D
    128   TEncTop*    getTEncTopView( Int viewId, Bool isDepth );                      ///< return pointer to encoder class for specific view Id and texture or depth
    129 #endif
     129  TEncTop*    getTEncTop( UInt layer ) { return  m_acTEncTopList[layer]; }  ///< return pointer to encoder class for specific layer
    130130#else
    131131  TEncTop&    getTEncTop  ()   { return  m_cTEncTop; }      ///< return encoder class pointer reference
    132132#endif
    133 
    134133};// END CLASS DEFINITION TAppEncTop
    135134
  • branches/HTM-DEV-0.2-dev/source/App/TAppEncoder/encmain.cpp

    r438 r446  
    6262  fprintf( stdout, "HM software: Encoder Version [%s]", NV_VERSION );
    6363#endif
    64 
    6564  fprintf( stdout, NVM_ONOS );
    6665  fprintf( stdout, NVM_COMPILEDBY );
  • branches/HTM-DEV-0.2-dev/source/App/TAppExtractor/TAppExtrTop.cpp

    r438 r446  
    1 /* The copyright in this software is being made available under the BSD
    2  * License, included below. This software may be subject to other third party
    3  * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
    5  *
    6  * Copyright (c) 2010-2011, ISO/IEC
    7  * All rights reserved.
    8  *
    9  * Redistribution and use in source and binary forms, with or without
    10  * modification, are permitted provided that the following conditions are met:
    11  *
    12  *  * Redistributions of source code must retain the above copyright notice,
    13  *    this list of conditions and the following disclaimer.
    14  *  * Redistributions in binary form must reproduce the above copyright notice,
    15  *    this list of conditions and the following disclaimer in the documentation
    16  *    and/or other materials provided with the distribution.
    17  *  * Neither the name of the ISO/IEC nor the names of its contributors may
    18  *    be used to endorse or promote products derived from this software without
    19  *    specific prior written permission.
    20  *
    21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
    25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
    31  * THE POSSIBILITY OF SUCH DAMAGE.
    32  */
    33 
    34 /** \file     TAppExtrTop.cpp
    35     \brief    Extractor application class
    36 */
    37 
     1///* The copyright in this software is being made available under the BSD
     2// * License, included below. This software may be subject to other third party
     3// * and contributor rights, including patent rights, and no such rights are
     4// * granted under this license. 
     5// *
     6// * Copyright (c) 2010-2011, ISO/IEC
     7// * All rights reserved.
     8// *
     9// * Redistribution and use in source and binary forms, with or without
     10// * modification, are permitted provided that the following conditions are met:
     11// *
     12// *  * Redistributions of source code must retain the above copyright notice,
     13// *    this list of conditions and the following disclaimer.
     14// *  * Redistributions in binary form must reproduce the above copyright notice,
     15// *    this list of conditions and the following disclaimer in the documentation
     16// *    and/or other materials provided with the distribution.
     17// *  * Neither the name of the ISO/IEC nor the names of its contributors may
     18// *    be used to endorse or promote products derived from this software without
     19// *    specific prior written permission.
     20// *
     21// * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     22// * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23// * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24// * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
     25// * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26// * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27// * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28// * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29// * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30// * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     31// * THE POSSIBILITY OF SUCH DAMAGE.
     32// */
     33//
     34///** \file     TAppExtrTop.cpp
     35//    \brief    Extractor application class
    3836#include "TAppExtrTop.h"
    3937#include "../../Lib/TLibDecoder/AnnexBread.h"
     
    4442#include <assert.h>
    4543
     44#if H_MV
    4645// ====================================================================================================================
    4746// Constructor / destructor / initialization / destroy
     
    5049TAppExtrTop::TAppExtrTop()
    5150{
     51  // To suppress compiler warnings on potential division by 0.
     52  g_uiMaxCUWidth  = 1;
     53  g_uiMaxCUHeight = 1;
    5254}
    5355
     
    6062// ====================================================================================================================
    6163
    62 /**
    63  - until the end of the bitstream, call extraction function in TExtrTop class
    64  */
     64//
     65//until the end of the bitstream, call extraction function in TExtrTop class
     66//
     67
    6568Void TAppExtrTop::extract()
    6669{
     
    128131  outputBitstreamFile.close();
    129132
     133
    130134  // write SPS info file
    131135  if ( m_pchSpsInfoFile )
     
    143147    cSpsInfoFileHandle.close();
    144148  }
     149
     150  m_cTExtrTop.dumpVpsInfo( std::cout );
    145151  m_cTExtrTop.dumpSpsInfo( std::cout );
     152
    146153}
     154#endif
  • branches/HTM-DEV-0.2-dev/source/App/TAppExtractor/TAppExtrTop.h

    r438 r446  
    4646#include "TAppExtrCfg.h"
    4747
     48#if H_MV
    4849// ====================================================================================================================
    4950// Class definition
     
    6667#endif
    6768
     69#endif
  • branches/HTM-DEV-0.2-dev/source/App/TAppExtractor/extrmain.cpp

    r438 r446  
    4141#include "TAppExtrTop.h"
    4242
     43#if H_MV
    4344// ====================================================================================================================
    4445// Main function
     
    6869
    6970  // call extraction function
    70   cTAppExtrTop.extract();
     71//  cTAppExtrTop.extract();
    7172
    7273  // ending time
     
    7677  return EXIT_SUCCESS;
    7778}
     79#else
    7880
     81#include <iostream>
     82int main(int argc, char* argv[])
     83{
     84  std::cout << "Set H_MV equal to 1 in TypeDef.h to build bitstream extractor. " << std::endl;
     85  return 1;
     86}
    7987
     88#endif
     89
  • 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.