ref: 4795dc6bf4f16c17f03bdb634927560436536379
parent: 130c3a48487073c63f52ddfd64787d396166c4ea
author: ycqian <yanqian@cisco.com>
date: Fri Mar 30 06:12:50 EDT 2018
Fix edge MB mv in EC Slice_mv_copy method
--- a/codec/decoder/core/src/error_concealment.cpp
+++ b/codec/decoder/core/src/error_concealment.cpp
@@ -226,15 +226,15 @@
}
// further make sure no need to expand picture
int32_t iMinLeftOffset = (iPicWidthLeftLimit + 2) * (1 << 2);
- int32_t iMaxRightOffset = ((iPicWidthRightLimit - 19) * (1 << 2));
+ int32_t iMaxRightOffset = ((iPicWidthRightLimit - 18) * (1 << 2));
int32_t iMinTopOffset = (iPicHeightTopLimit + 2) * (1 << 2);
- int32_t iMaxBottomOffset = ((iPicHeightBottomLimit - 19) * (1 << 2));
+ int32_t iMaxBottomOffset = ((iPicHeightBottomLimit - 18) * (1 << 2));
if (iFullMVx < iMinLeftOffset) {
iFullMVx = (iFullMVx >> 2) * (1 << 2);
iFullMVx = WELS_MAX (iPicWidthLeftLimit, iFullMVx);
} else if (iFullMVx > iMaxRightOffset) {
iFullMVx = (iFullMVx >> 2) * (1 << 2);
- iFullMVx = WELS_MIN (((iPicWidthRightLimit - 17) * (1 << 2)), iFullMVx);
+ iFullMVx = WELS_MIN (((iPicWidthRightLimit - 16) * (1 << 2)), iFullMVx);
}
if (iFullMVy < iMinTopOffset) {
iFullMVy = (iFullMVy >> 2) * (1 << 2);
@@ -241,7 +241,7 @@
iFullMVy = WELS_MAX (iPicHeightTopLimit, iFullMVy);
} else if (iFullMVy > iMaxBottomOffset) {
iFullMVy = (iFullMVy >> 2) * (1 << 2);
- iFullMVy = WELS_MIN (((iPicHeightBottomLimit - 17) * (1 << 2)), iFullMVy);
+ iFullMVy = WELS_MIN (((iPicHeightBottomLimit - 16) * (1 << 2)), iFullMVy);
}
iMVs[0] = iFullMVx - (iMbXInPix << 2);
iMVs[1] = iFullMVy - (iMbYInPix << 2);