Changeset 446 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/Lib/TLibRenderer/TRenTop.cpp
- Timestamp:
- 26 May 2013, 16:22:23 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.2-dev/source/Lib/TLibRenderer/TRenTop.cpp
r438 r446 32 32 */ 33 33 34 34 35 #include "TRenImage.h" 35 36 #include "TRenTop.h" … … 39 40 #include <math.h> 40 41 #include "../TLibCommon/CommonDef.h" 42 #if H_3D 43 41 44 42 45 Void TRenTop::xGetDataPointers( PelImage*& rpcInputImage, PelImage*& rpcOutputImage, PelImage*& rpcInputDepth, PelImage*& rpcOutputDepth, PelImage*& rpcFilled, Bool bRenderDepth ) … … 1588 1591 Void TRenTop::xEnhSimilarityPlane ( PelImagePlane** apcLeftPlane, PelImagePlane** apcRightPlane, PelImagePlane* pcFilledLeftPlane, PelImagePlane* pcFilledRightPlane, UInt uiNumberOfPlanes ) 1589 1592 { 1593 AOF( g_bitDepthC == g_bitDepthY ); 1590 1594 AOT( m_iSimEnhBaseView != 1 && m_iSimEnhBaseView != 2 ); 1591 1595 Int iWidth = (*apcRightPlane)->getWidth (); 1592 1596 Int iHeight = (*apcRightPlane)->getHeight(); 1593 1597 1594 Int* aiHistLeft = new Int[ g_uiIBDI_MAX + 1];1595 Int* aiHistRight = new Int[ g_uiIBDI_MAX + 1];1596 Pel* aiConvLUT = new Pel[ g_uiIBDI_MAX + 1];1598 Int* aiHistLeft = new Int[ ((Int64)1 ) << g_bitDepthY ]; 1599 Int* aiHistRight = new Int[ ((Int64)1 ) << g_bitDepthY ]; 1600 Pel* aiConvLUT = new Pel[ ((Int64)1 ) << g_bitDepthY ]; 1597 1601 1598 1602 for (UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++ ) 1599 1603 { 1600 for (Int iCurVal = 0 ; iCurVal < = g_uiIBDI_MAX; iCurVal++)1604 for (Int iCurVal = 0 ; iCurVal < ( 1 << g_bitDepthY ); iCurVal++) 1601 1605 { 1602 1606 aiHistLeft [iCurVal] = 0; … … 1645 1649 Int iCheckSumRight = 0; 1646 1650 1647 for (Int iCurVal = 0 ; iCurVal < = g_uiIBDI_MAX; iCurVal++)1651 for (Int iCurVal = 0 ; iCurVal < ( 1 << g_bitDepthY ); iCurVal++) 1648 1652 { 1649 1653 iCheckSumLeft += aiHistLeft [iCurVal]; … … 1652 1656 1653 1657 1654 while( iCurChangeVal < = g_uiIBDI_MAX)1658 while( iCurChangeVal < ( 1 << g_bitDepthY ) ) 1655 1659 { 1656 1660 if ( iCumSumBase == iCumSumChange ) 1657 1661 { 1658 aiConvLUT[iCurChangeVal] = Min(iCurBaseVal, g_uiIBDI_MAX);1662 aiConvLUT[iCurChangeVal] = std::min( iCurBaseVal, ( 1 << g_bitDepthY ) - 1 ); 1659 1663 iCurBaseVal ++; 1660 1664 iCurChangeVal++; 1661 1665 iCumSumChange += aiHistChange[iCurChangeVal]; 1662 if (iCurBaseVal < = g_uiIBDI_MAX)1666 if (iCurBaseVal < ( 1 << g_bitDepthY ) ) 1663 1667 { 1664 1668 iCumSumBase += aiHistBase [iCurBaseVal] ; … … 1668 1672 { 1669 1673 iCurBaseVal++; 1670 if (iCurBaseVal < = g_uiIBDI_MAX)1674 if (iCurBaseVal < ( 1 << g_bitDepthY ) ) 1671 1675 { 1672 1676 iCumSumBase += aiHistBase [iCurBaseVal] ; … … 1675 1679 else if ( iCumSumBase > iCumSumChange) 1676 1680 { 1677 aiConvLUT[iCurChangeVal] = Min(iCurBaseVal, g_uiIBDI_MAX);1681 aiConvLUT[iCurChangeVal] = std::min(iCurBaseVal, ( 1 << g_bitDepthY )-1); 1678 1682 iCurChangeVal++; 1679 1683 iCumSumChange += aiHistChange [iCurChangeVal] ; … … 1884 1888 Void TRenTop::temporalFilterVSRS( TComPicYuv* pcPicYuvVideoCur, TComPicYuv* pcPicYuvDepthCur, TComPicYuv* pcPicYuvVideoLast, TComPicYuv* pcPicYuvDepthLast, Bool bFirstFrame ) 1885 1889 { 1890 AOF( g_bitDepthY == g_bitDepthC ); 1886 1891 Int iSADThres = 100 ; //threshold of sad in 4*4 block motion detection 1887 1892 … … 1950 1955 { //Weight: 0.75 1951 1956 Int iFilt = (( (pcDepthLastDataBlk[iCurPosX] << 1 ) + pcDepthLastDataBlk[iCurPosX] + pcDepthCurDataBlk[iCurPosX] + 2 ) >> 2 ); 1952 assert( (iFilt >= 0) && (iFilt < = g_uiIBDI_MAX) );1957 assert( (iFilt >= 0) && (iFilt < ( 1 << g_bitDepthY ) ) ); 1953 1958 pcDepthCurDataBlk[iCurPosX] = pcDepthLastDataBlk[iCurPosX]; 1954 1959 pcDepthCurDataBlk[iCurPosX] = iFilt; … … 2221 2226 if(m_aiBlkMoving != NULL ) delete[] m_aiBlkMoving; 2222 2227 } 2228 #endif // H_3D
Note: See TracChangeset for help on using the changeset viewer.