Changeset 485 in 3DVCSoftware for branches/HTM-DEV-0.3-dev1/source


Ignore:
Timestamp:
20 Jun 2013, 12:32:01 (11 years ago)
Author:
rwth
Message:
  • code cleanup for H_3D_DIM_DLT
Location:
branches/HTM-DEV-0.3-dev1/source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev1/source/App/TAppEncoder/TAppEncTop.cpp

    r467 r485  
    10511051  }
    10521052 
    1053   if( uiNumFrames == 0 || (Int)ceil(Log2(iNumDepthValues)) == (Int)ceil(Log2(((1 << g_bitDepthY)-1))) )
     1053  if( uiNumFrames == 0 || numBitsForValue(iNumDepthValues) == g_bitDepthY )
    10541054  {
    10551055    // don't use DLT
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibCommon/TComRom.h

    r459 r485  
    159159__inline Void mapDepthModeToIntraDir(  Int& intraMode ) { if( isDimMode( intraMode ) ) intraMode = DC_IDX; }
    160160
     161#if H_3D_DIM_SDC || H_3D_DIM_DLT
     162__inline UInt numBitsForValue( UInt value ) { UInt bits = 0; while (value != 0) { value >>= 1; bits++; } return bits; };
     163#endif
     164
    161165#if H_3D_DIM_DMM
    162166extern const WedgeResolution                                 g_dmmWedgeResolution [6];
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibCommon/TComSlice.cpp

    r473 r485  
    14851485    // allocate some memory and initialize with default mapping
    14861486    m_iNumDepthmapValues[i] = ((1 << g_bitDepthY)-1)+1;
    1487     m_iBitsPerDepthValue[i] = (Int)ceil(Log2(m_iNumDepthmapValues[i]));
     1487    m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);
    14881488   
    14891489    m_iDepthValue2Idx[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
     
    15791579    // update DLT variables
    15801580    m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;
    1581     m_iBitsPerDepthValue[layerIdInVps] = (Int)ceil(Log2(m_iNumDepthmapValues[layerIdInVps]));
     1581    m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
    15821582  }
    15831583#endif
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibCommon/TypeDef.h

    r474 r485  
    119119                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
    120120                                              // LG_ZEROINTRADEPTHRESI_A0087
    121 #if H_3D_DIM_DLT || H_3D_DIM_SDC
    122 #define Log2( n ) ( log((double)n) / log(2.0) )
    123 #endif
    124121#endif
    125122
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r467 r485  
    987987              free(aiIdx2DepthValue);
    988988            }
    989             else
    990               pcVPS->setDepthLUTs(i);
    991989          }
    992           else
    993             pcVPS->setDepthLUTs(i);
    994990#endif
    995991        }
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibDecoder/TDecSbac.cpp

    r467 r485  
    565565    if ( uiCount == uiPrefixThreshold )
    566566    {
    567       for ( UInt ui = 0; ui < ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) ); ui++ )
     567      for ( UInt ui = 0; ui < numBitsForValue(uiNumDepthValues - uiPrefixThreshold); ui++ )
    568568      {
    569569        m_pcTDecBinIf->decodeBinEP( uiBit );
  • branches/HTM-DEV-0.3-dev1/source/Lib/TLibEncoder/TEncSbac.cpp

    r467 r485  
    630630      {
    631631        uiAbsIdx -= uiPrefixThreshold;
    632         UInt uiSuffixLength = ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) );
     632        UInt uiSuffixLength = numBitsForValue(uiNumDepthValues - uiPrefixThreshold);
    633633        UInt uiBitInfo = 0;
    634634        for ( Int i = 0; i < uiSuffixLength; i++)
Note: See TracChangeset for help on using the changeset viewer.