Ignore:
Timestamp:
31 Aug 2013, 22:32:03 (11 years ago)
Author:
tech
Message:

Merged renderer fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-Renderer-Fix/source/Lib/TAppCommon/TAppComCamPara.cpp

    r542 r606  
    616616{
    617617  UInt uiFoundLine = -1;
     618#if H_3D_FIX_REN_WARNING
     619  if ( !xGetCameraDataRow( iView, uiFrame, uiFoundLine ) && xIsIn( m_aiSortedBaseViews, iView ))
     620#else 
    618621  if ( !xGetCameraDataRow( iView, uiFrame, uiFoundLine ) )
     622#endif
    619623  {
    620624    AOT( m_aadCameraParameters[ uiFoundLine ].size() < 6 );
     
    632636    Int  iDummy;
    633637
     638#if H_3D_FIX_REN_WARNING
     639    if( !xGetLeftRightView( iView, m_aiSortedBaseViews, iLeftView, iRightView, iDummy, iDummy ) ||
     640#else
    634641    if( !xGetLeftRightView( iView, m_aiViewsInCfgFile, iLeftView, iRightView, iDummy, iDummy ) ||
     642#endif
    635643         xGetCameraDataRow( iLeftView,  uiFrame, uiLeftViewLine  )                             ||
    636644         xGetCameraDataRow( iRightView, uiFrame, uiRightViewLine )
    637645      )
    638646    {
     647#if H_3D_FIX_REN_WARNING
     648      std::cerr << "No left or no right base view next to view " << (Double)iView / m_dViewNumPrec << " for Frame " << uiFrame << " given in CameraParameterFile" << std::endl;
     649#else
    639650      std::cerr << "No Left or no Right View next to View " << (Double)iView / m_dViewNumPrec << " for Frame " << uiFrame << " given in CameraParameterFile" << std::endl;
     651#endif
    640652      AOT(true);
    641653      exit( EXIT_FAILURE );
     
    892904
    893905        // maximum deviation
     906#if H_3D_REN_MAX_DEV_OUT
     907        m_dMaxShiftDeviation = std::max( m_dMaxShiftDeviation, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) / Double( 1 << m_iLog2Precision ) );       
     908#endif
    894909        dMaxDispDev     = std::max( dMaxDispDev,    fabs( Double( (Int) iTestScale   ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) );
    895910        dMaxRndDispDvL  = std::max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) );
     
    10261041  m_bCamParsCodedPrecSet      = false;
    10271042
     1043#if H_3D_REN_MAX_DEV_OUT
     1044  m_dMaxShiftDeviation        = -1;
     1045#endif
    10281046
    10291047}
     
    13341352      }
    13351353    }
     1354#if H_3D_FIX_REN_WARNING
     1355    Bool bIgnoreFirst = true;     
     1356    for( UInt uiERView = 0; uiERView < m_aiSynthViews.size() && !m_bSetupFromCoded; uiERView++ )
     1357    {
     1358      if ( xIsIn(m_aiViewsInCfgFile, m_aiSynthViews[ uiERView ] ) )
     1359      {
     1360        if ( bIgnoreFirst )
     1361        {
     1362          std::cout << "Ignoring CameraParameterFile entries for virtual view(s): " ;
     1363          //GT: Integer precision virtual view camera parameters are always interpolated from coded views camera parameters.
     1364          bIgnoreFirst = false;
     1365        }
     1366        std::cout << (Double)m_aiSynthViews[ uiERView ] / m_dViewNumPrec << " " ;
     1367      }
     1368    }
     1369    if ( !bIgnoreFirst )
     1370    {
     1371      std::cout << std::endl;
     1372    }
     1373#endif
    13361374
    13371375    Bool bInterpolateFirst = true;
     
    13521390        if ( bInterpolateFirst )
    13531391        {
     1392#if H_3D_FIX_REN_WARNING                       
     1393          std::cout << "Interpolating camera parameters      for virtual view(s): " ;
     1394#else
    13541395          std::cout << "Interpolating Camera Parameters for View(s) " ;
     1396#endif
    13551397            bInterpolateFirst = false;
    13561398        }         
     
    14561498}
    14571499
     1500#if H_3D_FIX_REN_WARNING
     1501Bool
     1502  TAppComCamPara::xIsIn( std::vector<Int>& rVec, Int iElem)
     1503{
     1504  Bool bFound = false;
     1505  for (Int idx = 0; idx < rVec.size() && !bFound; idx++)
     1506  {
     1507    bFound = bFound || rVec[idx] == iElem;
     1508  }
     1509  return bFound;
     1510}
     1511#endif
     1512
    14581513Int TAppComCamPara::getRelDistLeft( Int iSynthViewIdx, Int iLeftViewIdx, Int iRightViewIdx )
    14591514{
Note: See TracChangeset for help on using the changeset viewer.