[x265] [PATCH] modified unit test code for blockfil_s function

praveen at multicorewareinc.com praveen at multicorewareinc.com
Thu Nov 7 16:26:25 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1383837973 -19800
# Node ID 7fd763aee9dfcbe2305582c4389c617855e2ee90
# Parent  2848c581fbc3483c951610311e8ffb8ab66c1064
modified unit test code for blockfil_s function

diff -r 2848c581fbc3 -r 7fd763aee9df source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp	Thu Nov 07 20:06:56 2013 +0530
+++ b/source/test/pixelharness.cpp	Thu Nov 07 20:56:13 2013 +0530
@@ -614,16 +614,21 @@
     memset(ref_dest, 0, sizeof(ref_dest));
     memset(opt_dest, 0, sizeof(opt_dest));
 
-    int16_t value = (rand() % SHORT_MAX) + 1;
+    int j = 0;
 
     for (int i = 0; i < ITERS; i++)
     {
-        opt(opt_dest, 64, value);
-        ref(ref_dest, 64, value);
 
-        if (memcmp(ref_dest, opt_dest, 64 * 64 * sizeof(int16_t)))
+        int16_t value = (rand() % SHORT_MAX) + 1;
+
+        opt(opt_dest + j, 64, value);
+        ref(ref_dest + j, 64, value);
+
+        if (memcmp(ref_dest + j, opt_dest + j, (64 * 64 * sizeof(int16_t)) - j * sizeof(int16_t)))
             return false;
 
+        j++;
+
     }
 
     return true;


More information about the x265-devel mailing list