[x265] [PATCH 1 of 2] testbench: fix bug in plane_copy_cp, detect outside bound now

Min Chen chenm003 at 163.com
Thu Jul 2 02:32:15 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1435795548 25200
# Node ID 42547f20aca0aeafb0305789728b936cb07107ec
# Parent  68d0893604778b3e5582d6b8aaa55a8f6593abb0
testbench: fix bug in plane_copy_cp, detect outside bound now
---
 source/test/pixelharness.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 68d089360477 -r 42547f20aca0 source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp	Wed Jul 01 14:51:36 2015 +0530
+++ b/source/test/pixelharness.cpp	Wed Jul 01 17:05:48 2015 -0700
@@ -1180,8 +1180,8 @@
 
 bool PixelHarness::check_planecopy_cp(planecopy_cp_t ref, planecopy_cp_t opt)
 {
-    ALIGN_VAR_16(pixel, ref_dest[64 * 64]);
-    ALIGN_VAR_16(pixel, opt_dest[64 * 64]);
+    ALIGN_VAR_16(pixel, ref_dest[64 * 64 * 2]);
+    ALIGN_VAR_16(pixel, opt_dest[64 * 64 * 2]);
 
     memset(ref_dest, 0xCD, sizeof(ref_dest));
     memset(opt_dest, 0xCD, sizeof(opt_dest));
@@ -1198,7 +1198,7 @@
         checked(opt, uchar_test_buff[index] + j, srcStride, opt_dest, dstStride, width, height, (int)2);
         ref(uchar_test_buff[index] + j, srcStride, ref_dest, dstStride, width, height, (int)2);
 
-        if (memcmp(ref_dest, opt_dest, width * height * sizeof(pixel)))
+        if (memcmp(ref_dest, opt_dest, sizeof(ref_dest)))
             return false;
 
         reportfail();



More information about the x265-devel mailing list