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 | iPicHeightBottomLimit = (pMCRefMem->iPicHeight - pCtx->sFrameCrop.iTopOffset * 2); | 224 | iPicHeightBottomLimit = (pMCRefMem->iPicHeight - pCtx->sFrameCrop.iTopOffset * 2); |
| 225 | } | 225 | } |
| 226 | // further make sure no need to expand picture | 226 | // further make sure no need to expand picture |
| 227 | int32_t iMinLeftOffset = (iPicWidthLeftLimit + 2) << 2; | 227 | int32_t iMinLeftOffset = (iPicWidthLeftLimit + 2) * (1 << 2); |
| 228 | int32_t iMaxRightOffset = ((iPicWidthRightLimit - 19) << 2); | 228 | int32_t iMaxRightOffset = ((iPicWidthRightLimit - 19) * (1 << 2)); |
| 229 | int32_t iMinTopOffset = (iPicHeightTopLimit + 2) << 2; | 229 | int32_t iMinTopOffset = (iPicHeightTopLimit + 2) * (1 << 2); |
| 230 | int32_t iMaxBottomOffset = ((iPicHeightBottomLimit - 19) << 2); | 230 | int32_t iMaxBottomOffset = ((iPicHeightBottomLimit - 19) * (1 << 2)); |
| 231 | if (iFullMVx < iMinLeftOffset) { | 231 | if (iFullMVx < iMinLeftOffset) { |
| 232 | iFullMVx = (iFullMVx >> 2) << 2; | 232 | iFullMVx = (iFullMVx >> 2) * (1 << 2); |
| 233 | iFullMVx = WELS_MAX (iPicWidthLeftLimit, iFullMVx); | 233 | iFullMVx = WELS_MAX (iPicWidthLeftLimit, iFullMVx); |
| 234 | } else if (iFullMVx > iMaxRightOffset) { | 234 | } else if (iFullMVx > iMaxRightOffset) { |
| 235 | iFullMVx = (iFullMVx >> 2) << 2; | 235 | iFullMVx = (iFullMVx >> 2) * (1 << 2); |
| 236 | iFullMVx = WELS_MIN (((iPicWidthRightLimit - 17) << 2), iFullMVx); | 236 | iFullMVx = WELS_MIN (((iPicWidthRightLimit - 17) * (1 << 2)), iFullMVx); |
| 237 | } | 237 | } |
| 238 | if (iFullMVy < iMinTopOffset) { | 238 | if (iFullMVy < iMinTopOffset) { |
| 239 | iFullMVy = (iFullMVy >> 2) << 2; | 239 | iFullMVy = (iFullMVy >> 2) * (1 << 2); |
| 240 | iFullMVy = WELS_MAX (iPicHeightTopLimit, iFullMVy); | 240 | iFullMVy = WELS_MAX (iPicHeightTopLimit, iFullMVy); |
| 241 | } else if (iFullMVy > iMaxBottomOffset) { | 241 | } else if (iFullMVy > iMaxBottomOffset) { |
| 242 | iFullMVy = (iFullMVy >> 2) << 2; | 242 | iFullMVy = (iFullMVy >> 2) * (1 << 2); |
| 243 | iFullMVy = WELS_MIN (((iPicHeightBottomLimit - 17) << 2), iFullMVy); | 243 | iFullMVy = WELS_MIN (((iPicHeightBottomLimit - 17) * (1 << 2)), iFullMVy); |
| 244 | } | 244 | } |
| 245 | iMVs[0] = iFullMVx - (iMbXInPix << 2); | 245 | iMVs[0] = iFullMVx - (iMbXInPix << 2); |
| 246 | iMVs[1] = iFullMVy - (iMbYInPix << 2); | 246 | iMVs[1] = iFullMVy - (iMbYInPix << 2); |