Changeset 41 in 3DVCSoftware for branches/0.3-poznan-univ/source/App/TAppCommon


Ignore:
Timestamp:
26 Mar 2012, 09:03:21 (13 years ago)
Author:
poznan-univ
Message:

Adjustment for FlexCO, and high-level syntax improvement.

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  
    877877      radShiftParams[ uiSourceView][ uiTargetView ][ 1 ] = dOffset;
    878878
     879      for( UInt uiDepthValue = 0; uiDepthValue < SizeOfLUT; uiDepthValue++ )
     880      {
     881        // real-valued look-up tables
    879882#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 );
    881890#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_DEPTH
    888         dDepthValue = cNonlinearDepthBwd(dDepthValue);
    889         iDepthValue = (Int64)(dDepthValue+0.5);
    890 #endif
    891 #if POZNAN_LUT_INCREASED_PRECISION
    892         dDepthValue /= (1<<g_uiBitIncrement);
    893 #endif
    894         // real-valued look-up tables
    895 
    896         Double  dShiftLuma      = ( dDepthValue * dScale + dOffset ) * Double( 1 << m_iLog2Precision );
    897891        Double  dShiftChroma    = dShiftLuma / 2;
    898892        radLUT[ uiSourceView ][ uiTargetView ][ 0 ][ uiDepthValue ] = dShiftLuma;
     
    900894
    901895        // 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;
    905905#endif
    906906        Int64   iTestScale      = ( iTempScale + iOffset       );   // for checking accuracy of camera parameters
     
    12541254                      Int    iLog2Precision
    12551255#if POZNAN_NONLINEAR_DEPTH
    1256                       ,Float fDepthPower
     1256                      ,TComNonlinearDepthModel* pcNonlinearDepthModel
    12571257#endif
    12581258                      )
     
    12661266
    12671267#if POZNAN_NONLINEAR_DEPTH
    1268   m_fDepthPower             = fDepthPower;
     1268  m_bUseNonlinearDepth = (pcNonlinearDepthModel != NULL) ? true : false;
     1269  if(pcNonlinearDepthModel != NULL)
     1270    m_cNonlinearDepthModel    = *pcNonlinearDepthModel;
    12691271#endif
    12701272
  • branches/0.3-poznan-univ/source/App/TAppCommon/TAppComCamPara.h

    r28 r41  
    105105
    106106#if POZNAN_NONLINEAR_DEPTH
    107   Float               m_fDepthPower;
     107  TComNonlinearDepthModel m_cNonlinearDepthModel;
     108  Bool                m_bUseNonlinearDepth;
    108109#endif
    109110
     
    166167                Int     iLog2Precision
    167168#if POZNAN_NONLINEAR_DEPTH
    168                 ,Float  fDepthPower
     169                ,TComNonlinearDepthModel* pcNonlinearDepthModel
    169170#endif
    170171                );
     
    178179                Int     iLog2Precision
    179180#if POZNAN_NONLINEAR_DEPTH
    180                 ,Float  fDepthPower
     181                ,TComNonlinearDepthModel* pcNonlinearDepthModel
    181182#endif
    182183              );
Note: See TracChangeset for help on using the changeset viewer.