Showing the changes to codec/processing/src (1 of 1 file). Show all
Unified · Split
| @@ -94,9 +94,7 @@ EResult CDownsampling::Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pDs · 93 unmodified lines | ||
| 94 | 94 | |
| 95 | 95 | if ((iSrcWidthY >> 1) == iDstWidthY && (iSrcHeightY >> 1) == iDstHeightY) { |
| 96 | 96 | // use half average functions |
| 97 | − uint8_t iAlignIndex = 3; | |
| 98 | − | |
| 99 | − iAlignIndex = GetAlignedIndex (iSrcWidthY); | |
| 97 | + uint8_t iAlignIndex = GetAlignedIndex (iSrcWidthY); | |
| 100 | 98 | m_pfDownsample.pfHalfAverage[iAlignIndex] ((uint8_t*)pDstPixMap->pPixel[0], pDstPixMap->iStride[0], |
| 101 | 99 | (uint8_t*)pSrcPixMap->pPixel[0], pSrcPixMap->iStride[0], iSrcWidthY, iSrcHeightY); |
| 102 | 100 | |
| @@ -119,7 +117,7 @@ EResult CDownsampling::Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pDs · 16 unmodified lines | ||
| 119 | 117 | } |
| 120 | 118 | |
| 121 | 119 | int32_t CDownsampling::GetAlignedIndex (const int32_t kiSrcWidth) { |
| 122 | − int32_t iAlignIndex = 3; | |
| 120 | + int32_t iAlignIndex; | |
| 123 | 121 | if ((kiSrcWidth & 0x1f) == 0) // x32 |
| 124 | 122 | iAlignIndex = 0; |
| 125 | 123 | else if ((kiSrcWidth & 0x0f) == 0) // x16 |