[x265] [PATCH] unit test code for blockfil_s_c function

chen chenm003 at 163.com
Thu Nov 7 15:34:03 CET 2013


At 2013-11-07 20:46:39,praveen at multicorewareinc.com wrote:
># HG changeset patch
># User Praveen Tiwari
># Date 1383828382 -19800
># Node ID d71f86b1c58b4fc9f8a3ffeaaef45c60f8bcc468
># Parent  6de480fbbfb94a709adb18dcd3fbef9169de7a97
>unit test code for blockfil_s_c function
>
>diff -r 6de480fbbfb9 -r d71f86b1c58b source/test/pixelharness.cpp
>--- a/source/test/pixelharness.cpp Thu Nov 07 13:10:44 2013 +0530
>+++ b/source/test/pixelharness.cpp Thu Nov 07 18:16:22 2013 +0530
>@@ -604,6 +604,31 @@
>     return true;
> }
> 
>+bool PixelHarness::check_blockfil_s(blockfill_s_t ref, blockfill_s_t opt)
>+{
>+    ALIGN_VAR_16(int16_t, ref_dest[64 * 64]);
>+    ALIGN_VAR_16(int16_t, opt_dest[64 * 64]);
>+
>+    // we don't know the partition size so we are checking the entire output buffer so
>+    // we must initialize the buffers
>+    memset(ref_dest, 0, sizeof(ref_dest));
>+    memset(opt_dest, 0, sizeof(opt_dest));
>+
>+    int16_t value = (rand() % SHORT_MAX) + 1;
>+
>+    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)))
>+            return false;
>+
>+    }
same value fill into same address can 't verify function.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131107/3a931d6f/attachment.html>


More information about the x265-devel mailing list