Changeset 531 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp
- Timestamp:
- 11 Jul 2013, 16:03:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp ¶
r521 r531 73 73 , m_pcPPS ( NULL ) 74 74 , m_pcPic ( NULL ) 75 #if H_3D 76 , m_picLists ( NULL ) 77 #endif 75 78 , m_colFromL0Flag ( 1 ) 76 79 , m_colRefIdx ( 0 ) … … 970 973 971 974 m_pcPic = pSrc->m_pcPic; 972 975 #if H_3D 976 m_picLists = pSrc->m_picLists; 977 #endif 973 978 m_colFromL0Flag = pSrc->m_colFromL0Flag; 974 979 m_colRefIdx = pSrc->m_colRefIdx; … … 1543 1548 #if H_3D 1544 1549 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 1545 1568 #endif 1546 1569 … … 1582 1605 if( m_cprmsPresentFlag != NULL ) delete[] m_cprmsPresentFlag; 1583 1606 } 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 1584 1670 1585 1671 #if H_MV
Note: See TracChangeset for help on using the changeset viewer.