shithub: openh264

Download patch

ref: 151dfe04d5c3e55ea972b6baaf5afa95c4a19d84
parent: a8262dd9e606f99e3b02f8cbc7a03d3c5ea9c977
author: Martin Storsjö <[email protected]>
date: Wed Jan 28 05:50:16 EST 2015

Extend the tested area in the encoder MC test

--- a/test/encoder/EncUT_MotionCompensation.cpp
+++ b/test/encoder/EncUT_MotionCompensation.cpp
@@ -90,22 +90,22 @@
       uint32_t uiCpuFlag = k == 0 ? 0 : WelsCPUFeatureDetect (NULL);
       WelsInitMcFuncs (&sMcFunc, uiCpuFlag);
 
-      MCHalfPelFilterAnchor (uAnchors[1], uAnchors[2], uAnchors[3], uAnchors[0], MC_BUFF_SRC_STRIDE, width, height, pBuf + 4);
+      MCHalfPelFilterAnchor (uAnchors[1], uAnchors[2], uAnchors[3], uAnchors[0], MC_BUFF_SRC_STRIDE, width + 1, height + 1, pBuf + 4);
       sMcFunc.pfLumaHalfpelHor (&uSrcTest[4][4], MC_BUFF_SRC_STRIDE, uDstTest[0], MC_BUFF_DST_STRIDE, width + 1, height);
       for (int32_t j = 0; j < height; j++) {
-        for (int32_t i = 0; i < width; i++) {
+        for (int32_t i = 0; i < width + 1; i++) {
           ASSERT_EQ (uAnchor[1][4 + j][4 + i], uDstTest[j][i]);
         }
       }
       sMcFunc.pfLumaHalfpelVer (&uSrcTest[4][4], MC_BUFF_SRC_STRIDE, uDstTest[0], MC_BUFF_DST_STRIDE, width, height + 1);
-      for (int32_t j = 0; j < height; j++) {
+      for (int32_t j = 0; j < height + 1; j++) {
         for (int32_t i = 0; i < width; i++) {
           ASSERT_EQ (uAnchor[2][4 + j][4 + i], uDstTest[j][i]);
         }
       }
       sMcFunc.pfLumaHalfpelCen (&uSrcTest[4][4], MC_BUFF_SRC_STRIDE, uDstTest[0], MC_BUFF_DST_STRIDE, width + 1, height + 1);
-      for (int32_t j = 0; j < height; j++) {
-        for (int32_t i = 0; i < width; i++) {
+      for (int32_t j = 0; j < height + 1; j++) {
+        for (int32_t i = 0; i < width + 1; i++) {
           ASSERT_EQ (uAnchor[3][4 + j][4 + i], uDstTest[j][i]);
         }
       }