[x265] [PATCH] changed naming convention and added unit test code for blockcopy_sp function

chen chenm003 at 163.com
Wed Nov 6 14:33:27 CET 2013


At 2013-11-05 17:43:51,praveen at multicorewareinc.com wrote:
># HG changeset patch
># User Praveen Tiwari
># Date 1383644622 -19800
># Node ID 33486d409515d5f9fd451818f7623a92690a219d
># Parent  c57ed1fd7bd568b8662ba5f2ffb94eb01c3a0157
>changed naming convention and added unit test code for blockcopy_sp function
>
>diff -r c57ed1fd7bd5 -r 33486d409515 source/common/pixel.cpp
>--- a/source/common/pixel.cpp Tue Nov 05 00:39:00 2013 -0600
>+++ b/source/common/pixel.cpp Tue Nov 05 15:13:42 2013 +0530
>@@ -775,7 +775,7 @@
> }
> 
> template<int bx, int by>
>-void blockcopy_ps_c(pixel *a, intptr_t stridea, int16_t *b, intptr_t strideb)
>+void blockcopy_sp_c(pixel *a, intptr_t stridea, int16_t *b, intptr_t strideb)
may we modify a/b to dst/src

>+    // 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));
non-zero value is better, ex: 0xCD
 
>+    int j = 0;
>+    for (int i = 0; i < ITERS; i++)
>+    {
>+        opt(opt_dest, 64, sbuf1 + j, STRIDE);
>+        ref(ref_dest, 64, sbuf1 + j, STRIDE);
>+
>+        if (memcmp(ref_dest, opt_dest, 64 * 64 * sizeof(pixel)))
>+            return false;
>+
>+        j += INCR;
>+    }
>+
>+    return true;
>+}
>+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131106/87c62a9f/attachment.html>


More information about the x265-devel mailing list