Ignore:
Timestamp:
23 Jul 2013, 15:19:06 (12 years ago)
Author:
tech
Message:

Further removal of unused macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.cpp

    r499 r542  
    965965  //--- determine (virtual) camera parameter shift between view order index 1 and base view (view order index 0) ---
    966966  Double        dCamPosShift, dPicPosShift;
    967 #if H_3D_PDM_CAM_PARAS
    968   Int           iMinVOI       = (1<<30);
    969 #endif
    970967  Int           iMinAbsVOI    = (1<<30);
    971968  Int           iMinAbsVOIId  = 0;
     
    975972    if( iAbsVOI < iMinAbsVOI )
    976973    {
    977 #if H_3D_PDM_CAM_PARAS
    978       iMinVOI      = m_aiViewOrderIndex[ iBaseId ];
    979 #endif
    980974      iMinAbsVOI   = iAbsVOI;
    981975      iMinAbsVOIId = iBaseId;
     
    984978  AOF( iMinAbsVOIId != 0 && iMinAbsVOI != 0 );
    985979  xGetCameraShifts( 0, iMinAbsVOIId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );
    986 #if H_3D_PDM_CAM_PARAS
    987   Double  dCamPosShiftVOI01     = dCamPosShift / Double( iMinVOI );
    988 #endif
    989980
    990981  //--- determine maximum absolute camera position shift, precision, and base scale ---
     
    999990    }
    1000991  }
    1001 
    1002 #if H_3D_PDM_CAM_PARAS
    1003   Int     iPrecision  = 0;
    1004 #if 0 // enabling this lines might be reasonable, but produces different results for the 2 view and 3 view test cases
    1005   Double  dEpsilon    = 1e-15;
    1006   Double  dAbsCamPosShiftVOI01  = ( dCamPosShiftVOI01 < 0.0 ? -dCamPosShiftVOI01 : dCamPosShiftVOI01 );
    1007   Double  dShiftRatio = dMaxAbsCamPosShift / dAbsCamPosShiftVOI01 - dEpsilon;
    1008   for( ; (Double)( 1 << iPrecision ) < dShiftRatio; iPrecision++ );
    1009 #endif
    1010   Int     iPrecShift  = iPrecision + PDM_INTER_CALC_SHIFT + PDM_VIRT_DEPTH_PRECISION - 2;
    1011   AOF(    iPrecShift  < PDM_INTERNAL_CALC_BIT_DEPTH );
    1012   Int     iScaleVOI01 = 1 << iPrecShift;
    1013   m_iPdmPrecision     = iPrecision;
    1014 
    1015   //--- loop over target views ---
    1016   for( Int iTargetId = 1; iTargetId < m_iNumberOfBaseViews; iTargetId++ )
    1017   {
    1018     // set scale and offset parameters for other views
    1019     for( Int iBaseId = 0; iBaseId < iTargetId; iBaseId++ )
    1020     {
    1021       xGetCameraShifts( (UInt)iBaseId, (UInt)iTargetId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );
    1022       Double  dScale      = Double( iScaleVOI01 ) * dCamPosShiftVOI01 / dCamPosShift;
    1023       Int     iDiv        = m_aiViewOrderIndex[ iTargetId ] - m_aiViewOrderIndex[ iBaseId ];
    1024       Int     iAdd        = ( iDiv > 0 ? iDiv / 2 : -iDiv / 2 );
    1025       Int     iScalePred  = ( iScaleVOI01 + iAdd ) / iDiv;
    1026       Double  dFactor     = dScale / (Double)iScalePred * pow( 2.0, PDM_LOG4_SCALE_DENOMINATOR );
    1027       Int     iNominator  = (Int)floor( dFactor + .5 );
    1028       Int     iNomDelta   = iNominator - ( 1 << PDM_LOG4_SCALE_DENOMINATOR );
    1029       Int     iScale      = Int( ( (Int64)iNominator * (Int64)iScalePred + (Int64)( ( 1 << PDM_LOG4_SCALE_DENOMINATOR ) >> 1 ) ) >> PDM_LOG4_SCALE_DENOMINATOR );
    1030       Double  dOffset     = -dPicPosShift * Double( iScale ) * pow( 2.0, 2 - PDM_OFFSET_SHIFT );
    1031       Int     iOffset     = (Int)floor( dOffset + .5 );
    1032 
    1033       m_aaiPdmScaleNomDelta [ iTargetId ][ iBaseId ]  = iNomDelta;
    1034       m_aaiPdmOffset        [ iTargetId ][ iBaseId ]  = iOffset;
    1035     }
    1036   }
    1037 #endif
    1038992}
    1039993
     
    10591013  m_aaiScaleAndOffsetSet      = 0;
    10601014
    1061 #if H_3D_PDM_CAM_PARAS
    1062   m_iPdmPrecision             = 0;
    1063   m_aaiPdmScaleNomDelta       = 0;
    1064   m_aaiPdmOffset              = 0;
    1065 #endif
    1066 
    10671015  m_adBaseViewShiftParameter  = 0;
    10681016  m_aiBaseViewShiftParameter  = 0;
     
    10981046  xDeleteArray( m_aaiScaleAndOffsetSet,      m_iNumberOfBaseViews );
    10991047
    1100 #if H_3D_PDM_CAM_PARAS
    1101   xDeleteArray( m_aaiPdmScaleNomDelta,       m_iNumberOfBaseViews );
    1102   xDeleteArray( m_aaiPdmOffset,              m_iNumberOfBaseViews );
    1103 #endif
    11041048}
    11051049
     
    13441288  xInit2dArray  ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiScaleAndOffsetSet, 0 );
    13451289
    1346 #if H_3D_PDM_CAM_PARAS
    1347   xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmScaleNomDelta     );
    1348   xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmOffset            );
    1349 
    1350   //===== init disparity to virtual depth conversion parameters =====
    1351   xSetPdmConversionParams();
    1352 #endif
    1353 
    13541290  //===== init arrays for first frame =====
    13551291  xSetShiftParametersAndLUT( m_uiFirstFrameId );
Note: See TracChangeset for help on using the changeset viewer.