Showing the changes to codec/decoder/core/src/error_concealment.cpp (1 of 12 files). Show all
Unified · Split
| @@ -224,23 +224,23 @@ void DoMbECMvCopy (PWelsDecoderContext pCtx, PPicture pDec, PPicture pRef, int32 · 223 unmodified lines | ||
| 224 | 224 | iPicHeightBottomLimit = (pMCRefMem->iPicHeight - pCtx->sFrameCrop.iTopOffset * 2); |
| 225 | 225 | } |
| 226 | 226 | // further make sure no need to expand picture |
| 227 | − int32_t iMinLeftOffset = (iPicWidthLeftLimit + 2) << 2; | |
| 228 | − int32_t iMaxRightOffset = ((iPicWidthRightLimit - 19) << 2); | |
| 229 | − int32_t iMinTopOffset = (iPicHeightTopLimit + 2) << 2; | |
| 230 | − int32_t iMaxBottomOffset = ((iPicHeightBottomLimit - 19) << 2); | |
| 227 | + int32_t iMinLeftOffset = (iPicWidthLeftLimit + 2) * (1 << 2); | |
| 228 | + int32_t iMaxRightOffset = ((iPicWidthRightLimit - 19) * (1 << 2)); | |
| 229 | + int32_t iMinTopOffset = (iPicHeightTopLimit + 2) * (1 << 2); | |
| 230 | + int32_t iMaxBottomOffset = ((iPicHeightBottomLimit - 19) * (1 << 2)); | |
| 231 | 231 | if (iFullMVx < iMinLeftOffset) { |
| 232 | − iFullMVx = (iFullMVx >> 2) << 2; | |
| 232 | + iFullMVx = (iFullMVx >> 2) * (1 << 2); | |
| 233 | 233 | iFullMVx = WELS_MAX (iPicWidthLeftLimit, iFullMVx); |
| 234 | 234 | } else if (iFullMVx > iMaxRightOffset) { |
| 235 | − iFullMVx = (iFullMVx >> 2) << 2; | |
| 236 | − iFullMVx = WELS_MIN (((iPicWidthRightLimit - 17) << 2), iFullMVx); | |
| 235 | + iFullMVx = (iFullMVx >> 2) * (1 << 2); | |
| 236 | + iFullMVx = WELS_MIN (((iPicWidthRightLimit - 17) * (1 << 2)), iFullMVx); | |
| 237 | 237 | } |
| 238 | 238 | if (iFullMVy < iMinTopOffset) { |
| 239 | − iFullMVy = (iFullMVy >> 2) << 2; | |
| 239 | + iFullMVy = (iFullMVy >> 2) * (1 << 2); | |
| 240 | 240 | iFullMVy = WELS_MAX (iPicHeightTopLimit, iFullMVy); |
| 241 | 241 | } else if (iFullMVy > iMaxBottomOffset) { |
| 242 | − iFullMVy = (iFullMVy >> 2) << 2; | |
| 243 | − iFullMVy = WELS_MIN (((iPicHeightBottomLimit - 17) << 2), iFullMVy); | |
| 242 | + iFullMVy = (iFullMVy >> 2) * (1 << 2); | |
| 243 | + iFullMVy = WELS_MIN (((iPicHeightBottomLimit - 17) * (1 << 2)), iFullMVy); | |
| 244 | 244 | } |
| 245 | 245 | iMVs[0] = iFullMVx - (iMbXInPix << 2); |
| 246 | 246 | iMVs[1] = iFullMVy - (iMbYInPix << 2); |