Changeset 402 in 3DVCSoftware
- Timestamp:
- 13 May 2013, 18:59:47 (12 years ago)
- Location:
- branches/HTM-6.2-dev2-MERL/source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-6.2-dev2-MERL/source/App/TAppEncoder/TAppEncTop.cpp
r373 r402 1086 1086 #if MERL_VSP_C0152 1087 1087 #if MERL_VSP_C0152_BugFix_ForNoDepthCase 1088 if(m_bUsingDepthMaps) // VSP can be used only when depth is available as input1088 if(m_bUsingDepthMaps) // VSP can be used only when depth is available as input 1089 1089 { 1090 1090 #endif -
branches/HTM-6.2-dev2-MERL/source/Lib/TLibCommon/TComPrediction.cpp
r390 r402 50 50 #endif 51 51 52 #if MERL_VSP_C0152 53 #if MERL_CVSP_D0165 54 Int TComPrediction::m_iRangeLuma[12] = {14, 34, 21, 15, 36, 26, 21, 49, 41, 36, 80, 72}; 55 Int TComPrediction::m_iRangeChroma[12] = { 2, 8, 5, 4, 11, 9, 8, 19, 17, 15, 34, 32}; 56 #endif 57 #endif 58 52 59 TComPrediction::TComPrediction() 53 60 : m_pLumaRecBuffer(0) … … 1522 1529 #endif 1523 1530 1531 #if MERL_CVSP_D0165 1532 Int widthDepth = pPicBaseDepth->getWidth(); 1533 Int heightDepth = pPicBaseDepth->getHeight(); 1534 #endif 1535 1524 1536 Int nTxtPerDepthX = widthLuma / ( pPicBaseDepth->getWidth() ); // texture pixel # per depth pixel 1525 1537 Int nTxtPerDepthY = heightLuma / ( pPicBaseDepth->getHeight() ); … … 1610 1622 #endif 1611 1623 1624 #if MERL_VSP_BLOCKSIZE_C0152 == 1 1625 #if MERL_CVSP_D0165 1626 //get LUT based horizontal reference range 1627 Int range = 0; 1628 if( size_x == 4 && size_y == 8 ) 1629 range = m_iRangeLuma[0]; 1630 else if( size_x == 8 && size_y == 4 ) 1631 range = m_iRangeLuma[1]; 1632 else if( size_x == 8 && size_y == 8 ) 1633 range = m_iRangeLuma[2]; 1634 else if( size_x == 8 && size_y == 16 ) 1635 range = m_iRangeLuma[3]; 1636 else if( size_x == 16 && size_y == 8 ) 1637 range = m_iRangeLuma[4]; 1638 else if( size_x == 16 && size_y == 16 ) 1639 range = m_iRangeLuma[5]; 1640 else if( size_x == 16 && size_y == 32 ) 1641 range = m_iRangeLuma[6]; 1642 else if( size_x == 32 && size_y == 16 ) 1643 range = m_iRangeLuma[7]; 1644 else if( size_x == 32 && size_y == 32 ) 1645 range = m_iRangeLuma[8]; 1646 else if( size_x == 32 && size_y == 64 ) 1647 range = m_iRangeLuma[9]; 1648 else if( size_x == 64 && size_y == 32 ) 1649 range = m_iRangeLuma[10]; 1650 else if( size_x == 64 && size_y == 64 ) 1651 range = m_iRangeLuma[11]; 1652 else 1653 assert(0); 1654 1655 // The minimum depth value 1656 Int min_relative_pos = 5000; 1657 Int max_relative_pos = -5000; 1658 1659 Pel* depth_temp, *depth_initial=depth; 1660 for (Int yTxt =0; yTxt<size_y; yTxt++) 1661 { 1662 for (Int xTxt =0; xTxt<size_x; xTxt++) 1663 { 1664 if (depthPosX+xTxt < widthDepth) 1665 depth_temp = depth_initial + xTxt; 1666 else 1667 depth_temp = depth_initial + (widthDepth - depthPosX - 1); 1668 1669 Int disparity = pShiftLUT[ *depth_temp ] << iShiftPrec; 1670 Int disparity_int = disparity >> 2; 1671 1672 if( disparity <= 0) 1673 { 1674 if (min_relative_pos > disparity_int+xTxt) 1675 min_relative_pos = disparity_int+xTxt; 1676 } 1677 else 1678 { 1679 if (max_relative_pos < disparity_int+xTxt) 1680 max_relative_pos = disparity_int+xTxt; 1681 } 1682 } 1683 if (depthPosY+yTxt < heightDepth) 1684 depth_initial = depth_initial + depStride; 1685 } 1686 1687 Int disparity_tmp = pShiftLUT[ *depth ] << iShiftPrec; 1688 if (disparity_tmp <= 0) 1689 max_relative_pos = min_relative_pos + range -1 ; 1690 else 1691 min_relative_pos = max_relative_pos - range +1 ; 1692 #endif 1693 #endif 1694 1612 1695 #if MERL_VSP_BLOCKSIZE_C0152 != 1 1613 1696 Int yDepth = 0; … … 1632 1715 Int refOffset = xTxt + (disparity >> 2); 1633 1716 Int xFrac = disparity & 0x3; 1717 #if MERL_CVSP_D0165 1718 if(refOffset<min_relative_pos || refOffset>max_relative_pos) 1719 xFrac = 0; 1720 refOffset = Clip3(min_relative_pos, max_relative_pos, refOffset); 1721 #endif 1634 1722 Int absX = posX + refOffset; 1635 1723 … … 1823 1911 1824 1912 1913 #if MERL_VSP_BLOCKSIZE_C0152 == 1 1914 #if MERL_CVSP_D0165 1915 //get LUT based horizontal reference range 1916 Int range=0; 1917 if( size_x == 2 && size_y == 4 ) 1918 range = m_iRangeChroma[0]; 1919 else if( size_x == 4 && size_y == 2 ) 1920 range = m_iRangeChroma[1]; 1921 else if( size_x == 4 && size_y == 4 ) 1922 range = m_iRangeChroma[2]; 1923 else if( size_x == 4 && size_y == 8 ) 1924 range = m_iRangeChroma[3]; 1925 else if( size_x == 8 && size_y == 4 ) 1926 range = m_iRangeChroma[4]; 1927 else if( size_x == 8 && size_y == 8 ) 1928 range = m_iRangeChroma[5]; 1929 else if( size_x == 8 && size_y == 16 ) 1930 range = m_iRangeChroma[6]; 1931 else if( size_x == 16 && size_y == 8 ) 1932 range = m_iRangeChroma[7]; 1933 else if( size_x == 16 && size_y == 16 ) 1934 range = m_iRangeChroma[8]; 1935 else if( size_x == 16 && size_y == 32 ) 1936 range = m_iRangeChroma[9]; 1937 else if( size_x == 32 && size_y == 16 ) 1938 range = m_iRangeChroma[10]; 1939 else if( size_x == 32 && size_y == 32 ) 1940 range = m_iRangeChroma[11]; 1941 else 1942 assert(0); 1943 1944 // The minimum depth value 1945 Int min_relative_pos = 5000; 1946 Int max_relative_pos = -5000; 1947 1948 Int depth_tmp; 1949 for (Int yTxt=0; yTxt<size_y; yTxt++) 1950 { 1951 for (Int xTxt=0; xTxt<size_x; xTxt++) 1952 { 1953 depth_tmp = m_pDepth[xTxt+yTxt*dW]; 1954 Int disparity = pShiftLUT[ depth_tmp ] << iShiftPrec; 1955 Int disparity_int = disparity >> 3;//in chroma resolution 1956 1957 if (disparity_int < 0) 1958 { 1959 if (min_relative_pos > disparity_int+xTxt) 1960 min_relative_pos = disparity_int+xTxt; 1961 } 1962 else 1963 { 1964 if (max_relative_pos < disparity_int+xTxt) 1965 max_relative_pos = disparity_int+xTxt; 1966 } 1967 } 1968 } 1969 1970 depth_tmp = m_pDepth[0]; 1971 Int disparity_tmp = pShiftLUT[ depth_tmp ] << iShiftPrec; 1972 if ( disparity_tmp < 0 ) 1973 max_relative_pos = min_relative_pos + range - 1; 1974 else 1975 min_relative_pos = max_relative_pos - range + 1; 1976 1977 #endif 1978 #endif 1979 1825 1980 // (size_x, size_y) is Chroma block size 1826 1981 for ( Int yTxt = 0, yDepth = 0; yTxt < size_y; yTxt += nTxtPerDepthY, yDepth += nDepthPerTxtY ) … … 1843 1998 Int refOffset = xTxt + (disparity >> 3); // in integer pixel in chroma image 1844 1999 Int xFrac = disparity & 0x7; 2000 #if MERL_CVSP_D0165 2001 if(refOffset < min_relative_pos || refOffset > max_relative_pos) 2002 xFrac = 0; 2003 refOffset = Clip3(min_relative_pos, max_relative_pos, refOffset); 2004 #endif 1845 2005 Int absX = posX + refOffset; 1846 2006 -
branches/HTM-6.2-dev2-MERL/source/Lib/TLibCommon/TComPrediction.h
r373 r402 84 84 #if MERL_VSP_C0152 85 85 Int* m_pDepth; ///< Local variable, to store a depth block, just to prevent allocate memory every time 86 87 #if MERL_CVSP_D0165 88 static Int m_iRangeLuma[12]; 89 static Int m_iRangeChroma[12]; 90 #endif 86 91 #endif 87 92 -
branches/HTM-6.2-dev2-MERL/source/Lib/TLibCommon/TypeDef.h
r399 r402 206 206 207 207 208 #define MERL_VSP_BLOCKSIZE_C0152 4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4. 208 #define MERL_VSP_BLOCKSIZE_C0152 1 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4. 209 #if MERL_VSP_BLOCKSIZE_C0152 == 1 210 #define MERL_CVSP_D0165 1 // JCT3V-D0165: 1:enable CVSP; 0: disable CVSP. 211 #endif 212 209 213 #define VSP_MERGE_POS 5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5. 210 214 //MTK_DVPREFINE_BVSP_BUG_FIX 1 -
branches/HTM-6.2-dev2-MERL/source/Lib/TLibDecoder/TDecCu.cpp
r399 r402 1086 1086 // reconstruct residual based on mask + DC residuals 1087 1087 Pel apDCResiValues[2]; 1088 Pel apDCRecoValues[2];1088 //Pel apDCRecoValues[2]; 1089 1089 for( UInt ui = 0; ui < uiNumSegments; ui++ ) 1090 1090 { … … 1093 1093 Pel pRecoValue = GetIdx2DepthValue( pPredIdx + pResiIdx ); 1094 1094 1095 apDCRecoValues[ui] = pRecoValue;1095 //apDCRecoValues[ui] = pRecoValue; 1096 1096 apDCResiValues[ui] = pRecoValue - apDCPredValues[ui]; 1097 1097 }
Note: See TracChangeset for help on using the changeset viewer.