Showing the changes to codec/processing/src (4 of 54 files). Show all
Unified · Split
| @@ -278,7 +278,7 @@ inline void CBackgroundDetection::ForegroundDilation (SBackgroundOU* pBackground · 277 unmodified lines | ||
| 278 | 278 | |
| 279 | 279 | // chroma component check |
| 280 | 280 | if (pBackgroundOU->iBackgroundFlag == 1) { |
| 281 | − int8_t iNeighbourForegroundFlags = !pOUNeighbours[0]->iBackgroundFlag | ((!pOUNeighbours[1]->iBackgroundFlag) << 1) | |
| 281 | + int8_t iNeighbourForegroundFlags = !pOUNeighbours[0]->iBackgroundFlag | ((!pOUNeighbours[1]->iBackgroundFlag) << 1) | |
| 282 | 282 | | ((!pOUNeighbours[2]->iBackgroundFlag) << 2) | ((!pOUNeighbours[3]->iBackgroundFlag) << 3); |
| 283 | 283 | pBackgroundOU->iBackgroundFlag = !ForegroundDilation23Chroma (iNeighbourForegroundFlags, iChromaSampleStartPos, |
| 284 | 284 | iPicStrideUV, pBgdParam); |
| @@ -291,9 +291,9 @@ inline void CBackgroundDetection::ForegroundDilation (SBackgroundOU* pBackground · 6 unmodified lines | ||
| 291 | 291 | } |
| 292 | 292 | inline void CBackgroundDetection::BackgroundErosion (SBackgroundOU* pBackgroundOU, SBackgroundOU* pOUNeighbours[]) { |
| 293 | 293 | if (pBackgroundOU->iMaxDiffSubSd <= (BGD_OU_SIZE * Q_FACTOR)) { //BGD_OU_SIZE*BGD_OU_SIZE>>2 |
| 294 | − int32_t iSumNeighBackgroundFlags = pOUNeighbours[0]->iBackgroundFlag + pOUNeighbours[1]->iBackgroundFlag + | |
| 294 | + int32_t iSumNeighBackgroundFlags = pOUNeighbours[0]->iBackgroundFlag + pOUNeighbours[1]->iBackgroundFlag + | |
| 295 | 295 | pOUNeighbours[2]->iBackgroundFlag + pOUNeighbours[3]->iBackgroundFlag; |
| 296 | − int32_t sumNbrBGsad = (pOUNeighbours[0]->iSAD & (-pOUNeighbours[0]->iBackgroundFlag)) + (pOUNeighbours[2]->iSAD & | |
| 296 | + int32_t sumNbrBGsad = (pOUNeighbours[0]->iSAD & (-pOUNeighbours[0]->iBackgroundFlag)) + (pOUNeighbours[2]->iSAD & | |
| 297 | 297 | (-pOUNeighbours[2]->iBackgroundFlag)) |
| 298 | 298 | + (pOUNeighbours[1]->iSAD & (-pOUNeighbours[1]->iBackgroundFlag)) + (pOUNeighbours[3]->iSAD & |
| 299 | 299 | (-pOUNeighbours[3]->iBackgroundFlag)); |
| @@ -105,7 +105,7 @@ void* WelsRealloc (void* pPointer, uint32_t* pRealSize, const uint32_t kuiSize, · 104 unmodified lines | ||
| 105 | 105 | |
| 106 | 106 | pLocalPointer = InternalReallocate (pPointer, kuiNewSize, pTag); |
| 107 | 107 | if (NULL != pLocalPointer) { |
| 108 | − *pRealSize = kuiNewSize; | |
| 108 | + *pRealSize = kuiNewSize; | |
| 109 | 109 | return (pLocalPointer); |
| 110 | 110 | } else { |
| 111 | 111 | return NULL; |
| @@ -139,14 +139,14 @@ EResult CDownsampling::Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pDs · 138 unmodified lines | ||
| 139 | 139 | |
| 140 | 140 | int32_t CDownsampling::GetAlignedIndex (const int32_t kiSrcWidth) { |
| 141 | 141 | int32_t iAlignIndex; |
| 142 | − if ((kiSrcWidth & 0x1f) == 0) // x32 | |
| 143 | − iAlignIndex = 0; | |
| 144 | − else if ((kiSrcWidth & 0x0f) == 0) // x16 | |
| 145 | − iAlignIndex = 1; | |
| 146 | − else if ((kiSrcWidth & 0x07) == 0) // x8 | |
| 147 | − iAlignIndex = 2; | |
| 142 | + if ((kiSrcWidth & 0x1f) == 0) // x32 | |
| 143 | + iAlignIndex = 0; | |
| 144 | + else if ((kiSrcWidth & 0x0f) == 0) // x16 | |
| 145 | + iAlignIndex = 1; | |
| 146 | + else if ((kiSrcWidth & 0x07) == 0) // x8 | |
| 147 | + iAlignIndex = 2; | |
| 148 | 148 | else |
| 149 | − iAlignIndex = 3; | |
| 149 | + iAlignIndex = 3; | |
| 150 | 150 | return iAlignIndex; |
| 151 | 151 | } |
| 152 | 152 | |
| @@ -104,7 +104,7 @@ class CSceneChangeDetectorVideo { · 103 unmodified lines | ||
| 104 | 104 | iCurRowStride = sLocalParam.iCurStride << 3; |
| 105 | 105 | |
| 106 | 106 | for (int32_t j = 0; j < sLocalParam.iBlock8x8Height; j++) { |
| 107 | − pRefTmp = pRefY; | |
| 107 | + pRefTmp = pRefY; | |
| 108 | 108 | pCurTmp = pCurY; |
| 109 | 109 | for (int32_t i = 0; i < sLocalParam.iBlock8x8Width; i++) { |
| 110 | 110 | int32_t iSad = m_pfSad (pCurTmp, sLocalParam.iCurStride, pRefTmp, sLocalParam.iRefStride); |
| @@ -154,7 +154,7 @@ class CSceneChangeDetectorScreen : public CSceneChangeDetectorVideo { · 43 unmodified lines | ||
| 154 | 154 | iCurRowStride = sLocalParam.iCurStride << 3; |
| 155 | 155 | |
| 156 | 156 | for (int32_t j = 0; j < sLocalParam.iBlock8x8Height; j++) { |
| 157 | − pRefTmp = pRefY; | |
| 157 | + pRefTmp = pRefY; | |
| 158 | 158 | pCurTmp = pCurY; |
| 159 | 159 | for (int32_t i = 0; i < sLocalParam.iBlock8x8Width; i++) { |
| 160 | 160 | int32_t iBlockPointX = i << 3; |
| @@ -216,7 +216,7 @@ class CSceneChangeDetection : public IStrategy { · 55 unmodified lines | ||
| 216 | 216 | int32_t iBlock8x8Num = m_sLocalParam.iBlock8x8Width * m_sLocalParam.iBlock8x8Height; |
| 217 | 217 | int32_t iSceneChangeThresholdLarge = WelsStaticCast (int32_t, |
| 218 | 218 | m_cDetector.GetSceneChangeMotionRatioLarge() * iBlock8x8Num + 0.5f + PESN); |
| 219 | − int32_t iSceneChangeThresholdMedium = WelsStaticCast (int32_t, | |
| 219 | + int32_t iSceneChangeThresholdMedium = WelsStaticCast (int32_t, | |
| 220 | 220 | m_cDetector.GetSceneChangeMotionRatioMedium() * iBlock8x8Num + 0.5f + PESN); |
| 221 | 221 | |
| 222 | 222 | m_sSceneChangeParam.iMotionBlockNum = 0; |