Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TAppCommon
- Timestamp:
- 4 May 2015, 17:47:40 (10 years ago)
- Location:
- trunk/source/Lib/TAppCommon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TAppCommon/TAppComCamPara.cpp
r1179 r1196 399 399 400 400 401 #if !HHI_CAM_PARA_K0052402 Void403 TAppComCamPara::xGetViewOrderIndices( const std::vector<Int>& raiId2SortedId, std::vector<Int>& raiVOIdx )404 {405 AOF( raiId2SortedId.size() );406 raiVOIdx = raiId2SortedId;407 Int iSize = (Int)raiId2SortedId.size();408 Int iOffs = raiId2SortedId[ 0 ];409 for( Int iIdx = 0; iIdx < iSize; iIdx++ )410 {411 raiVOIdx[ iIdx ] -= iOffs;412 }413 }414 #endif415 401 416 402 … … 960 946 961 947 962 #if !HHI_CAM_PARA_K0052963 Void964 TAppComCamPara::xSetPdmConversionParams()965 {966 AOF( m_aiViewOrderIndex[ 0 ] == 0 );967 if ( m_bSetupFromCoded || m_iNumberOfBaseViews < 2 )968 {969 return;970 }971 972 //--- determine (virtual) camera parameter shift between view order index 1 and base view (view order index 0) ---973 Double dCamPosShift, dPicPosShift;974 Int iMinAbsVOI = (1<<30);975 Int iMinAbsVOIId = 0;976 for( Int iBaseId = 1; iBaseId < m_iNumberOfBaseViews; iBaseId++ )977 {978 Int iAbsVOI = ( m_aiViewOrderIndex[ iBaseId ] < 0 ? -m_aiViewOrderIndex[ iBaseId ] : m_aiViewOrderIndex[ iBaseId ] );979 if( iAbsVOI < iMinAbsVOI )980 {981 iMinAbsVOI = iAbsVOI;982 iMinAbsVOIId = iBaseId;983 }984 }985 AOF( iMinAbsVOIId != 0 && iMinAbsVOI != 0 );986 xGetCameraShifts( 0, iMinAbsVOIId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );987 988 //--- determine maximum absolute camera position shift, precision, and base scale ---989 Double dMaxAbsCamPosShift = 0.0;990 for( Int iTargetId = 1; iTargetId < m_iNumberOfBaseViews; iTargetId++ )991 {992 for( Int iBaseId = 0; iBaseId < iTargetId; iBaseId++ )993 {994 xGetCameraShifts( (UInt)iBaseId, (UInt)iTargetId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );995 dCamPosShift = ( dCamPosShift < 0.0 ? -dCamPosShift : dCamPosShift );996 dMaxAbsCamPosShift = ( dCamPosShift > dMaxAbsCamPosShift ? dCamPosShift : dMaxAbsCamPosShift );997 }998 }999 }1000 #endif1001 948 1002 949 … … 1284 1231 1285 1232 //===== set derived parameters ===== 1286 #if !HHI_CAM_PARA_K00521287 xGetViewOrderIndices( m_aiBaseId2SortedId, m_aiViewOrderIndex );1288 #endif1289 1233 m_bCamParsVaryOverTime = xGetCamParsChangeFlag(); 1290 1234 -
trunk/source/Lib/TAppCommon/TAppComCamPara.h
r1179 r1196 85 85 86 86 // SPS and slice header related variables 87 #if !HHI_CAM_PARA_K005288 std::vector<Int> m_aiViewOrderIndex; ///< list of view order indices89 #endif90 87 UInt m_uiCamParsCodedPrecision; ///< precision for coding of camera parameters (x: max error in disparity is 2^(-x) luma samples) 91 88 Bool m_bCamParsVaryOverTime; ///< flag specifying whether camera parameters vary for given frame numbers … … 147 144 // getting conversion parameters for disparity to virtual depth conversion 148 145 Void xGetCameraShifts ( UInt uiSourceView, UInt uiTargetView, UInt uiFrame, Double& rdCamPosShift, Double& rdPicPosShift ); 149 #if !HHI_CAM_PARA_K0052150 Void xSetPdmConversionParams ();151 #endif152 146 153 147 public: … … 220 214 Bool getVaryingCameraParameters() { return m_bCamParsVaryOverTime; } 221 215 UInt getCamParsCodedPrecision () { return m_uiCamParsCodedPrecision; } 222 #if !HHI_CAM_PARA_K0052223 std::vector<Int>& getViewOrderIndex () { return m_aiViewOrderIndex; }224 #endif225 216 Int** getCodedScale () { return m_aaiCodedScale; } 226 217 Int** getCodedOffset () { return m_aaiCodedOffset; }
Note: See TracChangeset for help on using the changeset viewer.