Changeset 1368 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon
- Timestamp:
- 22 Jul 2015, 04:43:32 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.cpp
r1335 r1368 113 113 114 114 // TODO: move this function to TComPrediction.cpp. 115 Void TComPrediction::initIntraPatternChType( TComTU &rTu, Bool& bAbove, Bool& bLeft,const ComponentID compID, const Bool bFilterRefSamples DEBUG_STRING_FN_DECLARE(sDebug))115 Void TComPrediction::initIntraPatternChType( TComTU &rTu, const ComponentID compID, const Bool bFilterRefSamples DEBUG_STRING_FN_DECLARE(sDebug)) 116 116 { 117 117 const ChannelType chType = toChannelType(compID); … … 156 156 iNumIntraNeighbor += isBelowLeftAvailable ( pcCU, uiPartIdxLT, uiPartIdxLB, (bNeighborFlags + iLeftUnits - 1 - iTUHeightInUnits) ); 157 157 158 bAbove = true;159 bLeft = true;160 161 158 const UInt uiROIWidth = uiTuWidth2+1; 162 159 const UInt uiROIHeight = uiTuHeight2+1; -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp
r1307 r1368 181 181 // Function for calculating DC value of the reference samples used in Intra prediction 182 182 //NOTE: Bit-Limit - 25-bit source 183 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight , Bool bAbove, Bool bLeft)183 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight) 184 184 { 185 185 assert(iWidth > 0 && iHeight > 0); … … 187 187 Pel pDcVal; 188 188 189 if (bAbove) 190 { 191 for (iInd = 0;iInd < iWidth;iInd++) 192 { 193 iSum += pSrc[iInd-iSrcStride]; 194 } 195 } 196 if (bLeft) 197 { 198 for (iInd = 0;iInd < iHeight;iInd++) 199 { 200 iSum += pSrc[iInd*iSrcStride-1]; 201 } 202 } 203 204 if (bAbove && bLeft) 205 { 206 pDcVal = (iSum + iWidth) / (iWidth + iHeight); 207 } 208 else if (bAbove) 209 { 210 pDcVal = (iSum + iWidth/2) / iWidth; 211 } 212 else if (bLeft) 213 { 214 pDcVal = (iSum + iHeight/2) / iHeight; 215 } 216 else 217 { 218 pDcVal = pSrc[-1]; // Default DC value already calculated and placed in the prediction array if no neighbors are available 219 } 189 for (iInd = 0;iInd < iWidth;iInd++) 190 { 191 iSum += pSrc[iInd-iSrcStride]; 192 } 193 for (iInd = 0;iInd < iHeight;iInd++) 194 { 195 iSum += pSrc[iInd*iSrcStride-1]; 196 } 197 198 pDcVal = (iSum + iWidth) / (iWidth + iHeight); 220 199 221 200 return pDcVal; … … 252 231 Pel* pTrueDst, Int dstStrideTrue, 253 232 UInt uiWidth, UInt uiHeight, ChannelType channelType, 254 UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable 255 , const Bool bEnableEdgeFilters 233 UInt dirMode, const Bool bEnableEdgeFilters 256 234 ) 257 235 { … … 266 244 if (modeDC) 267 245 { 268 const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height , blkAboveAvailable, blkLeftAvailable);246 const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height); 269 247 270 248 for (Int y=height;y>0;y--, pTrueDst+=dstStrideTrue) … … 297 275 Pel refLeft[2*MAX_CU_SIZE+1]; 298 276 299 // Initiali se the Main and Left reference array.277 // Initialize the Main and Left reference array. 300 278 if (intraPredAngle < 0) 301 279 { … … 410 388 } 411 389 412 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 )390 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 ) 413 391 { 414 392 const ChannelType channelType = toChannelType(compID); … … 488 466 #endif 489 467 #endif 490 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, bAbove, bLeft,enableEdgeFilters );491 492 if( ( uiDirMode == DC_IDX ) && bAbove && bLeft)468 xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, enableEdgeFilters ); 469 470 if( uiDirMode == DC_IDX ) 493 471 { 494 472 xDCPredFiltering( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType ); -
branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.h
r1315 r1368 88 88 Int m_iLumaRecStride; ///< stride of #m_pLumaRecBuffer array 89 89 90 Void xPredIntraAng ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable,const Bool bEnableEdgeFilters );90 Void xPredIntraAng ( Int bitDepth, const Pel* pSrc, Int srcStride, Pel* pDst, Int dstStride, UInt width, UInt height, ChannelType channelType, UInt dirMode, const Bool bEnableEdgeFilters ); 91 91 Void xPredIntraPlanar ( const Pel* pSrc, Int srcStride, Pel* rpDst, Int dstStride, UInt width, UInt height ); 92 92 … … 122 122 123 123 // Angular Intra 124 Void 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 = false );124 Void 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 = false ); 125 125 126 Pel predIntraGetPredValDC ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight , Bool bAbove, Bool bLeft);126 Pel predIntraGetPredValDC ( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight); 127 127 128 128 Pel* getPredictorPtr ( const ComponentID compID, const Bool bUseFilteredPredictions ) … … 134 134 /// set parameters from CU data for accessing intra data 135 135 Void initIntraPatternChType ( TComTU &rTu, 136 Bool& bAbove,137 Bool& bLeft,138 136 const ComponentID compID, const Bool bFilterRefSamples 139 137 DEBUG_STRING_FN_DECLARE(sDebug)
Note: See TracChangeset for help on using the changeset viewer.