shithub: openh264

Download patch

ref: 415dd10640a501d543138eb6aabae3c13e141e27
parent: 130c3a48487073c63f52ddfd64787d396166c4ea
parent: 4795dc6bf4f16c17f03bdb634927560436536379
author: huili2 <huili2@cisco.com>
date: Fri Mar 30 07:01:44 EDT 2018

Merge pull request #2947 from ycqian/EcMv

correct  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);