Changeset 41 in 3DVCSoftware for branches/0.3-poznan-univ/source/App/TAppCommon
- Timestamp:
- 26 Mar 2012, 09:03:21 (13 years ago)
- Location:
- branches/0.3-poznan-univ/source/App/TAppCommon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.3-poznan-univ/source/App/TAppCommon/TAppComCamPara.cpp
r29 r41 877 877 radShiftParams[ uiSourceView][ uiTargetView ][ 1 ] = dOffset; 878 878 879 for( UInt uiDepthValue = 0; uiDepthValue < SizeOfLUT; uiDepthValue++ ) 880 { 881 // real-valued look-up tables 879 882 #if POZNAN_NONLINEAR_DEPTH 880 TComNonlinearDepthBackward cNonlinearDepthBwd(m_fDepthPower, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0, (POZNAN_LUT_INCREASED_PRECISION) ? g_uiBitIncrement : 0); 883 Double dShiftLuma; 884 if(m_bUseNonlinearDepth) 885 dShiftLuma = ( m_cNonlinearDepthModel.BackwardD((Double)uiDepthValue, dScale) + dOffset ) * Double( 1 << m_iLog2Precision ); 886 else 887 dShiftLuma = ( (Double)uiDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision ); 888 #else 889 Double dShiftLuma = ( (Double)uiDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision ); 881 890 #endif 882 883 for( UInt uiDepthValue = 0; uiDepthValue < SizeOfLUT; uiDepthValue++ )884 {885 Double dDepthValue = (Double)uiDepthValue;886 Int64 iDepthValue = (Int64)uiDepthValue;887 #if POZNAN_NONLINEAR_DEPTH888 dDepthValue = cNonlinearDepthBwd(dDepthValue);889 iDepthValue = (Int64)(dDepthValue+0.5);890 #endif891 #if POZNAN_LUT_INCREASED_PRECISION892 dDepthValue /= (1<<g_uiBitIncrement);893 #endif894 // real-valued look-up tables895 896 Double dShiftLuma = ( dDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision );897 891 Double dShiftChroma = dShiftLuma / 2; 898 892 radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma; … … 900 894 901 895 // integer-valued look-up tables 902 Int64 iTempScale = iDepthValue * iScale; 903 #if POZNAN_LUT_INCREASED_PRECISION 904 iTempScale >>= g_uiBitIncrement; 896 #if POZNAN_NONLINEAR_DEPTH 897 Int64 iTempScale; 898 if(m_bUseNonlinearDepth) 899 iTempScale = (Int64)m_cNonlinearDepthModel.BackwardI(uiDepthValue, iScale); 900 else 901 iTempScale = (Int64)uiDepthValue * iScale; 902 903 #else 904 Int64 iTempScale = (Int64)uiDepthValue * iScale; 905 905 #endif 906 906 Int64 iTestScale = ( iTempScale + iOffset ); // for checking accuracy of camera parameters … … 1254 1254 Int iLog2Precision 1255 1255 #if POZNAN_NONLINEAR_DEPTH 1256 , Float fDepthPower1256 ,TComNonlinearDepthModel* pcNonlinearDepthModel 1257 1257 #endif 1258 1258 ) … … 1266 1266 1267 1267 #if POZNAN_NONLINEAR_DEPTH 1268 m_fDepthPower = fDepthPower; 1268 m_bUseNonlinearDepth = (pcNonlinearDepthModel != NULL) ? true : false; 1269 if(pcNonlinearDepthModel != NULL) 1270 m_cNonlinearDepthModel = *pcNonlinearDepthModel; 1269 1271 #endif 1270 1272 -
branches/0.3-poznan-univ/source/App/TAppCommon/TAppComCamPara.h
r28 r41 105 105 106 106 #if POZNAN_NONLINEAR_DEPTH 107 Float m_fDepthPower; 107 TComNonlinearDepthModel m_cNonlinearDepthModel; 108 Bool m_bUseNonlinearDepth; 108 109 #endif 109 110 … … 166 167 Int iLog2Precision 167 168 #if POZNAN_NONLINEAR_DEPTH 168 , Float fDepthPower169 ,TComNonlinearDepthModel* pcNonlinearDepthModel 169 170 #endif 170 171 ); … … 178 179 Int iLog2Precision 179 180 #if POZNAN_NONLINEAR_DEPTH 180 , Float fDepthPower181 ,TComNonlinearDepthModel* pcNonlinearDepthModel 181 182 #endif 182 183 );
Note: See TracChangeset for help on using the changeset viewer.