Showing the changes to codec/processing/src/downsample (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 | if ((iSrcWidthY >> 1) == iDstWidthY && (iSrcHeightY >> 1) == iDstHeightY) { | 95 | if ((iSrcWidthY >> 1) == iDstWidthY && (iSrcHeightY >> 1) == iDstHeightY) { |
| 96 | // use half average functions | 96 | // use half average functions |
| 97 | uint8_t iAlignIndex = 3; | 97 | uint8_t iAlignIndex = GetAlignedIndex (iSrcWidthY); |
| 98 | |||
| 99 | iAlignIndex = GetAlignedIndex (iSrcWidthY); | ||
| 100 | m_pfDownsample.pfHalfAverage[iAlignIndex] ((uint8_t*)pDstPixMap->pPixel[0], pDstPixMap->iStride[0], | 98 | m_pfDownsample.pfHalfAverage[iAlignIndex] ((uint8_t*)pDstPixMap->pPixel[0], pDstPixMap->iStride[0], |
| 101 | (uint8_t*)pSrcPixMap->pPixel[0], pSrcPixMap->iStride[0], iSrcWidthY, iSrcHeightY); | 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 | int32_t CDownsampling::GetAlignedIndex (const int32_t kiSrcWidth) { | 119 | int32_t CDownsampling::GetAlignedIndex (const int32_t kiSrcWidth) { |
| 122 | int32_t iAlignIndex = 3; | 120 | int32_t iAlignIndex; |
| 123 | if ((kiSrcWidth & 0x1f) == 0) // x32 | 121 | if ((kiSrcWidth & 0x1f) == 0) // x32 |
| 124 | iAlignIndex = 0; | 122 | iAlignIndex = 0; |
| 125 | else if ((kiSrcWidth & 0x0f) == 0) // x16 | 123 | else if ((kiSrcWidth & 0x0f) == 0) // x16 |