[x265] [PATCH] testbench: fix invalid memory compare for 16bpp primitives

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Wed Dec 11 08:20:11 CET 2013


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1386746360 -19800
#      Wed Dec 11 12:49:20 2013 +0530
# Node ID baabed8d77f1468d51ad7ab5af036d70d024824c
# Parent  c2cf673d90fa1c0220a0be53241bc89fc62a6c67
testbench: fix invalid memory compare for 16bpp primitives

diff -r c2cf673d90fa -r baabed8d77f1 source/test/intrapredharness.cpp
--- a/source/test/intrapredharness.cpp	Wed Dec 11 12:20:36 2013 +0530
+++ b/source/test/intrapredharness.cpp	Wed Dec 11 12:49:20 2013 +0530
@@ -93,7 +93,7 @@
 
         for (int k = 0; k < width; k++)
         {
-            if (memcmp(pixel_out_vec + k * FENC_STRIDE, pixel_out_c + k * FENC_STRIDE, width))
+            if (memcmp(pixel_out_vec + k * FENC_STRIDE, pixel_out_c + k * FENC_STRIDE, width * sizeof(pixel)))
             {
 #if _DEBUG
                 ref(pixel_out_c,   FENC_STRIDE, pixel_buff + j - ADI_BUF_STRIDE, left + 1, 0, rand_filter);
@@ -130,7 +130,7 @@
 
         for (int k = 0; k < width; k++)
         {
-            if (memcmp(pixel_out_vec + k * FENC_STRIDE, pixel_out_c + k * FENC_STRIDE, width))
+            if (memcmp(pixel_out_vec + k * FENC_STRIDE, pixel_out_c + k * FENC_STRIDE, width * sizeof(pixel)))
             {
 #if _DEBUG
                 ref(pixel_out_c,   FENC_STRIDE, pixel_buff + j - ADI_BUF_STRIDE, left + 1, 0, 0);
@@ -178,7 +178,7 @@
 
                 for (int k = 0; k < width; k++)
                 {
-                    if (memcmp(pixel_out_vec + k * FENC_STRIDE, pixel_out_c + k * FENC_STRIDE, width))
+                    if (memcmp(pixel_out_vec + k * FENC_STRIDE, pixel_out_c + k * FENC_STRIDE, width * sizeof(pixel)))
                     {
                         ref[size - 2][pmode](pixel_out_c, FENC_STRIDE, refLeft, refAbove, pmode, bFilter);
                         opt[size - 2][pmode](pixel_out_vec, FENC_STRIDE, refLeft, refAbove, pmode, bFilter);
@@ -229,7 +229,7 @@
             {
                 for (int k = 0; k < width; k++)
                 {
-                    if (memcmp(pixel_out_33_c + p * (width * width) + k * width, pixel_out_33_vec + p * (width * width) + k * width, width))
+                    if (memcmp(pixel_out_33_c + p * (width * width) + k * width, pixel_out_33_vec + p * (width * width) + k * width, width * sizeof(pixel)))
                     {
                         printf("\nFailed: (%dx%d) Mode(%2d), Line[%2d], bfilter=%d\n", width, width, p + 2, k, isLuma);
                         opt[size - 2](pixel_out_33_vec, refAbove0, refLeft0, refAbove1, refLeft1, isLuma);


More information about the x265-devel mailing list