Changeset 81 in 3DVCSoftware for trunk/source/Lib
- Timestamp:
- 21 Jun 2012, 21:01:20 (13 years ago)
- Location:
- trunk/source/Lib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r77 r81 2921 2921 break; 2922 2922 default: 2923 #if HHI_FIX 2924 assert ( m_pePartSize[uiTmpAbsPartIdx ] == SIZE_2Nx2N ); 2925 #else 2923 2926 assert ( m_pePartSize[0] == SIZE_2Nx2N ); 2927 #endif 2924 2928 riWidth = getWidth(uiTmpAbsPartIdx); riHeight = getHeight(uiTmpAbsPartIdx); ruiPartAddr = 0; 2925 2929 break; -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r56 r81 273 273 274 274 m_puiComponentCostOriginP = new UInt[ 4 * iSubPelSearchLimit ]; 275 #if HHI_FIX 276 m_puiMultiviewRegCostHorOrgP = new UInt[ 4 * iSubPelSearchLimit ]; 277 m_puiMultiviewRegCostVerOrgP = new UInt[ 4 * iSubPelSearchLimit ]; 278 #endif 275 279 iSubPelSearchLimit *= 2; 276 280 277 281 m_puiComponentCost = m_puiComponentCostOriginP + iSubPelSearchLimit; 282 #if HHI_FIX 283 m_puiMultiviewRegCostHor = m_puiMultiviewRegCostHorOrgP + iSubPelSearchLimit; 284 m_puiMultiviewRegCostVer = m_puiMultiviewRegCostVerOrgP + iSubPelSearchLimit; 285 #endif 278 286 279 287 for( Int n = -iSubPelSearchLimit; n < iSubPelSearchLimit; n++) 280 288 { 281 289 m_puiComponentCost[n] = xGetComponentBits( n ); 290 #if HHI_FIX 291 m_puiMultiviewRegCostHor[n] = xGetComponentBits( n ); // first version 292 m_puiMultiviewRegCostVer[n] = xGetComponentBits( n ); // first version 293 #endif 282 294 } 283 295 } … … 291 303 m_puiComponentCostOriginP = NULL; 292 304 } 305 #if HHI_FIX 306 if( m_puiMultiviewRegCostHorOrgP ) 307 { 308 delete [] m_puiMultiviewRegCostHorOrgP; 309 m_puiMultiviewRegCostHorOrgP = NULL; 310 } 311 if( m_puiMultiviewRegCostVerOrgP ) 312 { 313 delete [] m_puiMultiviewRegCostVerOrgP; 314 m_puiMultiviewRegCostVerOrgP = NULL; 315 } 316 #endif 293 317 } 294 318 #endif -
trunk/source/Lib/TLibCommon/TComRdCost.h
r56 r81 219 219 #endif 220 220 UInt xGetComponentBits( Int iVal ); 221 Void getMotionCost( Bool bSad, Int iAdd ) { m_uiCost = (bSad ? m_uiLambdaMotionSAD + iAdd : m_uiLambdaMotionSSE + iAdd); } 221 Void getMotionCost( Bool bSad, Int iAdd ) 222 { 223 m_uiCost = (bSad ? m_uiLambdaMotionSAD + iAdd : m_uiLambdaMotionSSE + iAdd); 224 #if HHI_FIX 225 m_uiLambdaMVReg = ( bSad ? m_uiLambdaMVRegSAD : m_uiLambdaMVRegSSE ); 226 #endif 227 } 222 228 Void setPredictor( TComMv& rcMv ) 223 229 { … … 270 276 __inline UInt getMultiviewRegCost ( Int x, Int y ) 271 277 { 278 #if FIX203 279 return m_uiLambdaMVReg * getBits(x, y) >> 16; 280 #else 272 281 return ( ( m_uiLambdaMVReg * ( m_puiHorRegCost[ x * ( 1 << m_iCostScale ) ] + m_puiVerRegCost[ y * ( 1 << m_iCostScale ) ] ) ) >> 16 ); 282 #endif 273 283 } 274 284 -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r77 r81 1156 1156 if( m_pcRdCost->getUseRenModel() ) 1157 1157 { 1158 #if HHI_FIX 1159 UInt uiWidth = m_ppcOrigYuv[uiDepth]->getWidth ( ); 1160 UInt uiHeight = m_ppcOrigYuv[uiDepth]->getHeight( ); 1161 Pel* piSrc = m_ppcOrigYuv[uiDepth]->getLumaAddr( 0 ); 1162 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride(); 1163 m_pcRdCost->setRenModelData( m_ppcBestCU[uiDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1164 #else 1158 1165 UInt uiWidth = m_ppcBestCU[uiDepth]->getWidth ( 0 ); 1159 1166 UInt uiHeight = m_ppcBestCU[uiDepth]->getHeight( 0 ); … … 1161 1168 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride(); 1162 1169 m_pcRdCost->setRenModelData( m_ppcBestCU[uiDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1170 #endif 1163 1171 } 1164 1172 #endif … … 1206 1214 if( m_pcRdCost->getUseRenModel() ) // necessary ?? 1207 1215 { 1216 #if HHI_FIX 1217 UInt uiWidth = m_ppcRecoYuvBest[uhNextDepth]->getWidth ( ); 1218 UInt uiHeight = m_ppcRecoYuvBest[uhNextDepth]->getHeight ( ); 1219 Pel* piSrc = m_ppcRecoYuvBest[uhNextDepth]->getLumaAddr( 0 ); 1220 UInt uiSrcStride = m_ppcRecoYuvBest[uhNextDepth]->getStride ( ); 1221 m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1222 #else 1208 1223 UInt uiWidth = pcSubBestPartCU->getWidth ( 0 ); 1209 1224 UInt uiHeight = pcSubBestPartCU->getHeight( 0 ); … … 1211 1226 UInt uiSrcStride = m_ppcRecoYuvBest[pcSubBestPartCU->getDepth(0)]->getStride(); 1212 1227 m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1228 #endif 1213 1229 } 1214 1230 #endif … … 1353 1369 if( m_pcRdCost->getUseRenModel() ) 1354 1370 { 1371 #if HHI_FIX 1372 UInt uiWidth = m_ppcRecoYuvBest[uiDepth]->getWidth ( ); 1373 UInt uiHeight = m_ppcRecoYuvBest[uiDepth]->getHeight ( ); 1374 Pel* piSrc = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 ); 1375 UInt uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride ( ); 1376 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1377 #else 1355 1378 UInt uiWidth = rpcBestCU->getWidth ( 0 ); 1356 1379 UInt uiHeight = rpcBestCU->getHeight( 0 ); … … 1358 1381 UInt uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride(); 1359 1382 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1383 #endif 1360 1384 } 1361 1385 #endif … … 1723 1747 if( m_pcRdCost->getUseRenModel() ) 1724 1748 { 1725 // reset 1749 #if HHI_FIX 1750 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ( ); 1751 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight( ); 1752 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr( ); 1753 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 1754 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1755 #else 1726 1756 UInt uiWidth = rpcTempCU->getWidth ( 0 ); 1727 1757 UInt uiHeight = rpcTempCU->getHeight( 0 ); … … 1729 1759 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 1730 1760 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1761 #endif 1731 1762 } 1732 1763 #endif … … 1820 1851 if( m_pcRdCost->getUseRenModel() ) 1821 1852 { //Reset 1853 #if HHI_FIX 1854 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth (); 1855 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight (); 1856 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr (); 1857 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride (); 1858 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1859 #else 1822 1860 UInt uiWidth = rpcTempCU->getWidth ( 0 ); 1823 1861 UInt uiHeight = rpcTempCU->getHeight( 0 ); … … 1825 1863 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 1826 1864 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1865 #endif 1827 1866 } 1828 1867 #endif … … 1888 1927 if( m_pcRdCost->getUseRenModel() ) 1889 1928 { 1929 #if HHI_FIX 1930 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth ( ); 1931 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight( ); 1932 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr( ); 1933 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 1934 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1935 #else 1890 1936 UInt uiWidth = rpcTempCU->getWidth ( 0 ); 1891 1937 UInt uiHeight = rpcTempCU->getHeight( 0 ); … … 1893 1939 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 1894 1940 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1941 #endif 1895 1942 } 1896 1943 #endif … … 1999 2046 if( m_pcRdCost->getUseRenModel() ) 2000 2047 { 2048 #if HHI_FIX 2049 UInt uiWidth = m_ppcOrigYuv[uiDepth]->getWidth (); 2050 UInt uiHeight = m_ppcOrigYuv[uiDepth]->getHeight (); 2051 Pel* piSrc = m_ppcOrigYuv[uiDepth]->getLumaAddr(); 2052 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride (); 2053 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2054 #else 2001 2055 UInt uiWidth = rpcTempCU->getWidth ( 0 ); 2002 2056 UInt uiHeight = rpcTempCU->getHeight( 0 ); … … 2004 2058 UInt uiSrcStride = m_ppcOrigYuv[uiDepth]->getStride(); 2005 2059 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2060 #endif 2006 2061 } 2007 2062 #endif … … 2502 2557 if( m_pcRdCost->getUseRenModel() && !bRecursiveCall) 2503 2558 { 2559 #if HHI_FIX 2560 UInt uiWidth = m_ppcOrigYuv[uhDepth]->getWidth (); 2561 UInt uiHeight = m_ppcOrigYuv[uhDepth]->getHeight (); 2562 Pel* piSrc = m_ppcOrigYuv[uhDepth]->getLumaAddr(); 2563 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride (); 2564 m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2565 #else 2504 2566 UInt uiWidth = m_ppcTempCU [uhDepth]->getWidth ( 0 ); 2505 2567 UInt uiHeight = m_ppcTempCU [uhDepth]->getHeight( 0 ); … … 2507 2569 UInt uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride(); 2508 2570 m_pcRdCost->setRenModelData( m_ppcTempCU[uhDepth], 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2571 #endif 2509 2572 } 2510 2573 #endif … … 2654 2717 if( !bSplit && bRecursiveCall && m_pcRdCost->getUseRenModel() ) 2655 2718 { 2719 #if HHI_FIX 2720 UInt uiWidth = m_ppcRecoYuvBest[uhDepth]->getWidth ( ); 2721 UInt uiHeight = m_ppcRecoYuvBest[uhDepth]->getHeight ( ); 2722 UInt uiSrcStride = m_ppcRecoYuvBest[uhDepth]->getStride ( ); 2723 Pel* piSrc = m_ppcRecoYuvBest[uhDepth]->getLumaAddr( 0 ); 2724 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2725 #else 2656 2726 UInt uiWidth = rpcBestCU->getWidth ( 0 ); 2657 2727 UInt uiHeight = rpcBestCU->getHeight( 0 ); … … 2659 2729 UInt uiSrcStride = m_ppcRecoYuvBest[uhDepth]->getStride(); 2660 2730 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 2731 #endif 2661 2732 } 2662 2733 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r77 r81 304 304 // motion cost 305 305 uiSad += m_pcRdCost->getCost( iSearchX, iSearchY ); 306 306 #if HHI_FIX 307 // regularization cost 308 if( m_pcRdCost->useMultiviewReg() ) 309 { 310 uiSad += m_pcRdCost->getMultiviewRegCost( iSearchX, iSearchY ); 311 } 312 #endif 307 313 if( uiSad < rcStruct.uiBestSad ) 308 314 { … … 3865 3871 else 3866 3872 { 3873 #if HHI_FIX 3874 rcMv = ( m_pcRdCost->useMultiviewReg() ? m_pcRdCost->getMultiviewOrgMvPred() : *pcMvPred ); 3875 #else 3867 3876 rcMv = *pcMvPred; 3877 #endif 3868 3878 xPatternSearchFast ( pcCU, pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost ); 3869 3879 } … … 3967 3977 uiSad += m_pcRdCost->getCost( x, y ); 3968 3978 3979 #if HHI_FIX 3980 // regularization cost 3981 if( m_pcRdCost->useMultiviewReg() ) 3982 { 3983 uiSad += m_pcRdCost->getMultiviewRegCost( x, y ); 3984 } 3985 #endif 3986 3969 3987 if ( uiSad < uiSadBest ) 3970 3988 { -
trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp
r77 r81 1299 1299 else 1300 1300 { 1301 #if HHI_FIX 1302 riY = xBlend( iYL, iYR, m_iBlendDistWeight ); 1303 #if HHI_VSO_COLOR_PLANES 1304 riU = xBlend( iUL, iUR, m_iBlendDistWeight ); 1305 riV = xBlend( iVL, iVR, m_iBlendDistWeight ); 1306 #endif 1307 #else 1301 1308 riY = xBlend( iYR, iYL, m_iBlendDistWeight ); 1302 1309 #if HHI_VSO_COLOR_PLANES 1303 1310 riU = xBlend( iUR, iUL, m_iBlendDistWeight ); 1304 1311 riV = xBlend( iVR, iVL, m_iBlendDistWeight ); 1312 #endif 1305 1313 #endif 1306 1314 } -
trunk/source/Lib/TLibRenderer/TRenTop.cpp
r56 r81 1013 1013 if ((iPrevShiftedPos + (iStep >> 1) ) > iPrevShiftedPosCeiled ) 1014 1014 { 1015 #if HHI_FIX 1016 if ( !((iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth))) 1017 { 1018 1019 for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++) 1020 { 1021 apcOutputData[uiCurPlane][iInterPolPos] = apcInputData[uiCurPlane][iPosX - iStep]; 1022 } 1023 pcFilledData[iInterPolPos] = REN_IS_FILLED; 1024 1025 } 1026 iInterPolPos++; 1027 } 1028 #else 1015 1029 if ( (iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth)) 1016 1030 { … … 1027 1041 iInterPolPos++; 1028 1042 } 1043 #endif 1029 1044 1030 1045 // Fill Disocclusion … … 1039 1054 apcOutputData[uiCurPlane][iInterPolPos] = apcInputData[uiCurPlane][iPosX]; 1040 1055 } 1041 1042 1056 } 1043 1057 } … … 1050 1064 { 1051 1065 iInterPolPos = iShiftedPosFloor >> m_iRelShiftLUTPrec; 1066 #if HHI_FIX 1067 if ( !((iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth))) 1068 { 1069 for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++) 1070 { 1071 apcOutputData[uiCurPlane][iInterPolPos] = apcInputData[uiCurPlane][iPosX ]; 1072 } 1073 1074 pcFilledData[iInterPolPos] = REN_IS_FILLED; 1075 } 1076 #else 1052 1077 if ( (iInterPolPos < (Int) 0) || (iInterPolPos >= iOutputWidth)) 1053 1078 { … … 1063 1088 1064 1089 pcFilledData[iInterPolPos] = REN_IS_FILLED; 1090 #endif 1065 1091 } 1066 1092 }
Note: See TracChangeset for help on using the changeset viewer.