Changeset 582 in 3DVCSoftware for branches/HTM-DEV-2.0-dev3-SCU-Hisilicon/source/Lib
- Timestamp:
- 17 Aug 2013, 01:38:28 (11 years ago)
- Location:
- branches/HTM-DEV-2.0-dev3-SCU-Hisilicon/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-2.0-dev3-SCU-Hisilicon/source/Lib/TLibCommon/TComPrediction.cpp
r572 r582 2140 2140 iDC += piRefBlkY[k]; 2141 2141 } 2142 2142 2143 #if SCU_HS_DMM4_REMOVE_DIV_E0242 2143 iDC = iDC >> (6 - pcCU->getDepth(0))*2; 2144 Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2; 2145 iDC = iDC >> (cuMaxLog2Size - pcCU->getDepth(0))*2; 2144 2146 #else 2145 2147 iDC /= (uiWidth*uiHeight); -
branches/HTM-DEV-2.0-dev3-SCU-Hisilicon/source/Lib/TLibCommon/TComRdCost.cpp
r573 r582 486 486 #if SCU_HS_FAST_DEPTH_INTRA_E0238 487 487 488 UInt TComRdCost::calcVAR (Pel* pi0, Int iStride, Int cuDepth) 489 { 490 UInt uiSum = 0; 488 UInt TComRdCost::calcVAR (Pel* pi0, Int uiWidth, Int uiHeight, Int cuDepth) 489 { 491 490 Int x, y; 492 491 Int temp = 0; 493 if (iStride == 4) 494 cuDepth = 4; 495 496 for (x = 0; x < iStride; x++) 497 { 498 for (y = 0; y < iStride; y++) 492 493 for (x = 0; x < uiHeight; x++) 494 { 495 for (y = 0; y < uiWidth; y++) 499 496 { 500 temp += pi0[x* iStride+y];497 temp += pi0[x*uiHeight+y]; 501 498 } 502 499 } 503 temp = temp >> (6-cuDepth)*2; 504 505 for (x = 0; x < iStride; x++) 506 { 507 for (y = 0; y < iStride; y++) 500 Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2; 501 if (uiWidth == 4) 502 { 503 cuDepth = cuMaxLog2Size-2; 504 } 505 506 temp = temp >> (cuMaxLog2Size-cuDepth)*2; 507 508 UInt uiSum = 0; 509 for (x = 0; x < uiHeight; x++) 510 { 511 for (y = 0; y < uiWidth; y++) 508 512 { 509 uiSum += (pi0[x*iStride+y]-temp)*(pi0[x*iStride+y]-temp);513 uiSum += (pi0[x*uiHeight+y]-temp)*(pi0[x*uiHeight+y]-temp); 510 514 } 511 515 } 512 return (uiSum >> (6-cuDepth)*2);516 return (uiSum >> (cuMaxLog2Size-cuDepth)*2); 513 517 514 518 } -
branches/HTM-DEV-2.0-dev3-SCU-Hisilicon/source/Lib/TLibCommon/TComRdCost.h
r573 r582 229 229 UInt calcHAD(Int bitDepth, Pel* pi0, Int iStride0, Pel* pi1, Int iStride1, Int iWidth, Int iHeight ); 230 230 #if SCU_HS_FAST_DEPTH_INTRA_E0238 231 UInt calcVAR (Pel* pi0, Int iStride, Int cuDepth);231 UInt calcVAR(Pel* pi0, Int uiWidth, Int uiHeight, Int cuDepth); 232 232 #endif 233 233 // for motion cost -
branches/HTM-DEV-2.0-dev3-SCU-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp
r573 r582 2836 2836 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2837 2837 Int threshold = max(((pcCU->getQP(0))>>3)-1,3); 2838 Int varThreshold = (int)(threshold*threshold - 8); 2839 UInt uiVarCU=m_pcRdCost->calcVAR(piOrg, uiWidth,pcCU->getDepth(0)); 2840 #endif 2838 Int varThreshold = (Int)(threshold*threshold - 8); 2839 UInt uiVarCU=m_pcRdCost->calcVAR(piOrg, uiWidth,uiHeight,pcCU->getDepth(0)); 2840 #endif 2841 2841 2842 2842 2843 #if H_3D_DIM_DMM 2843 2844 if( m_pcEncCfg->getUseDMM() 2844 2845 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2845 && (uiRdModeList[0] != 0 || uiVarCU >= varThreshold)2846 #endif 2847 2848 2846 && (uiRdModeList[0] != 0 || uiVarCU >= varThreshold) 2847 #endif 2848 ) 2849 { 2849 2850 for( UInt dmmType = 0; dmmType < DMM_NUM_TYPE; dmmType++ ) 2850 2851 { … … 2919 2920 #endif 2920 2921 #if H_3D_DIM_RBC 2921 2922 if( m_pcEncCfg->getUseRBC() 2922 2923 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2923 2924 && (uiRdModeList[0] != 0 || uiVarCU >= varThreshold) 2924 2925 #endif 2925 2926 2926 ) 2927 { 2927 2928 if( xSearchRbcEdge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight ) ) 2928 2929 {
Note: See TracChangeset for help on using the changeset viewer.