Ignore:
Timestamp:
11 Jul 2013, 16:03:14 (12 years ago)
Author:
tech
Message:

Merged HTM-DEV-0.3-dev1 Rev. 520.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp

    r521 r531  
    7373, m_pcPPS                         ( NULL )
    7474, m_pcPic                         ( NULL )
     75#if H_3D
     76, m_picLists                      ( NULL )
     77#endif
    7578, m_colFromL0Flag                 ( 1 )
    7679, m_colRefIdx                     ( 0 )
     
    970973
    971974  m_pcPic                = pSrc->m_pcPic;
    972 
     975#if H_3D
     976  m_picLists             = pSrc->m_picLists;
     977#endif
    973978  m_colFromL0Flag        = pSrc->m_colFromL0Flag;
    974979  m_colRefIdx            = pSrc->m_colRefIdx;
     
    15431548#if H_3D
    15441549    m_viewIndex         [i] = -1;
     1550    m_vpsDepthModesFlag [i] = false;
     1551#if H_3D_DIM_DLT
     1552    m_bUseDLTFlag         [i] = false;
     1553   
     1554    // allocate some memory and initialize with default mapping
     1555    m_iNumDepthmapValues[i] = ((1 << g_bitDepthY)-1)+1;
     1556    m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);
     1557   
     1558    m_iDepthValue2Idx[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
     1559    m_iIdx2DepthValue[i]    = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);
     1560   
     1561    //default mapping
     1562    for (Int d=0; d<m_iNumDepthmapValues[i]; d++)
     1563    {
     1564      m_iDepthValue2Idx[i][d] = d;
     1565      m_iIdx2DepthValue[i][d] = d;
     1566    }
     1567#endif
    15451568#endif
    15461569
     
    15821605  if( m_cprmsPresentFlag != NULL )     delete[] m_cprmsPresentFlag;
    15831606}
     1607
     1608#if H_3D_DIM_DLT
     1609  Void TComVPS::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues)
     1610  {
     1611    if( idxToDepthValueTable == NULL || iNumDepthValues == 0 ) // default mapping only
     1612      return;
     1613   
     1614    // copy idx2DepthValue to internal array
     1615    memcpy(m_iIdx2DepthValue[layerIdInVps], idxToDepthValueTable, iNumDepthValues*sizeof(UInt));
     1616   
     1617    UInt uiMaxDepthValue = ((1 << g_bitDepthY)-1);
     1618    for(Int p=0; p<=uiMaxDepthValue; p++)
     1619    {
     1620      Int iIdxDown    = 0;
     1621      Int iIdxUp      = iNumDepthValues-1;
     1622      Bool bFound     = false;
     1623     
     1624      // iterate over indices to find lower closest depth
     1625      Int i = 1;
     1626      while(!bFound && i<iNumDepthValues)
     1627      {
     1628        if( m_iIdx2DepthValue[layerIdInVps][i] > p )
     1629        {
     1630          iIdxDown  = i-1;
     1631          bFound    = true;
     1632        }
     1633       
     1634        i++;
     1635      }
     1636      // iterate over indices to find upper closest depth
     1637      i = iNumDepthValues-2;
     1638      bFound = false;
     1639      while(!bFound && i>=0)
     1640      {
     1641        if( m_iIdx2DepthValue[layerIdInVps][i] < p )
     1642        {
     1643          iIdxUp  = i+1;
     1644          bFound    = true;
     1645        }
     1646       
     1647        i--;
     1648      }
     1649     
     1650      // assert monotony
     1651      assert(iIdxDown<=iIdxUp);
     1652     
     1653      // assign closer depth value/idx
     1654      if( abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxDown]) < abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxUp]) )
     1655      {
     1656        m_iDepthValue2Idx[layerIdInVps][p] = iIdxDown;
     1657      }
     1658      else
     1659      {
     1660        m_iDepthValue2Idx[layerIdInVps][p] = iIdxUp;
     1661      }
     1662     
     1663    }
     1664   
     1665    // update DLT variables
     1666    m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;
     1667    m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);
     1668  }
     1669#endif
    15841670
    15851671#if H_MV
Note: See TracChangeset for help on using the changeset viewer.