Changeset 1287 in 3DVCSoftware for branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.cpp
- Timestamp:
- 20 Jul 2015, 14:13:33 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.cpp
r1279 r1287 216 216 // Function for calculating DC value of the reference samples used in Intra prediction 217 217 //NOTE: Bit-Limit - 25-bit source 218 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight , Bool bAbove, Bool bLeft)218 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight) 219 219 { 220 220 assert(iWidth > 0 && iHeight > 0); … … 222 222 Pel pDcVal; 223 223 224 if (bAbove) 225 { 226 for (iInd = 0;iInd < iWidth;iInd++) 227 { 228 iSum += pSrc[iInd-iSrcStride]; 229 } 230 } 231 if (bLeft) 232 { 233 for (iInd = 0;iInd < iHeight;iInd++) 234 { 235 iSum += pSrc[iInd*iSrcStride-1]; 236 } 237 } 238 239 if (bAbove && bLeft) 240 { 241 pDcVal = (iSum + iWidth) / (iWidth + iHeight); 242 } 243 else if (bAbove) 244 { 245 pDcVal = (iSum + iWidth/2) / iWidth; 246 } 247 else if (bLeft) 248 { 249 pDcVal = (iSum + iHeight/2) / iHeight; 250 } 251 else 252 { 253 pDcVal = pSrc[-1]; // Default DC value already calculated and placed in the prediction array if no neighbors are available 254 } 224 for (iInd = 0;iInd < iWidth;iInd++) 225 { 226 iSum += pSrc[iInd-iSrcStride]; 227 } 228 for (iInd = 0;iInd < iHeight;iInd++) 229 { 230 iSum += pSrc[iInd*iSrcStride-1]; 231 } 232 233 pDcVal = (iSum + iWidth) / (iWidth + iHeight); 255 234 256 235 return pDcVal; … … 287 266 Pel* pTrueDst, Int dstStrideTrue, 288 267 UInt uiWidth, UInt uiHeight, ChannelType channelType, 289 UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable 290 , const Bool bEnableEdgeFilters 268 UInt dirMode, const Bool bEnableEdgeFilters 291 269 ) 292 270 { … … 301 279 if (modeDC) 302 280 { 303 const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height , blkAboveAvailable, blkLeftAvailable);281 const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height); 304 282 305 283 for (Int y=height;y>0;y--, pTrueDst+=dstStrideTrue) … … 332 310 Pel refLeft[2*MAX_CU_SIZE+1]; 333 311 334 // Initiali se the Main and Left reference array.312 // Initialize the Main and Left reference array. 335 313 if (intraPredAngle < 0) 336 314 { … … 445 423 } 446 424 447 Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft,const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM )425 Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM ) 448 426 { 449 427 const ChannelType channelType = toChannelType(compID); … … 519 497 const Int channelsBitDepthForPrediction = rTu.getCU()->getSlice()->getSPS()->getBitDepth(channelType); 520 498 #endif 521 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, bAbove, bLeft,enableEdgeFilters );522 523 if( ( uiDirMode == DC_IDX ) && bAbove && bLeft)499 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, enableEdgeFilters ); 500 501 if( uiDirMode == DC_IDX ) 524 502 { 525 503 xDCPredFiltering( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType );
Note: See TracChangeset for help on using the changeset viewer.