[x265] [PATCH] 10bpp: testbench code for pixel_add_ps

murugan at multicorewareinc.com murugan at multicorewareinc.com
Fri Dec 6 14:57:45 CET 2013


# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1386338257 -19800
#      Fri Dec 06 19:27:37 2013 +0530
# Node ID 9446f063e216ccf9e118371125ccce636860f16d
# Parent  9a9eaf4dadd7e191038e56341fac23aad60a10db
10bpp: testbench code for pixel_add_ps

diff -r 9a9eaf4dadd7 -r 9446f063e216 source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp	Fri Dec 06 18:23:12 2013 +0530
+++ b/source/test/pixelharness.cpp	Fri Dec 06 19:27:37 2013 +0530
@@ -640,6 +640,11 @@
     memset(ref_dest, 0xCD, sizeof(ref_dest));
     memset(opt_dest, 0xCD, sizeof(opt_dest));
 
+#if HIGH_BIT_DEPTH
+    int old_depth = X265_DEPTH;
+    X265_DEPTH = 10;
+#endif
+
     int j = 0;
     for (int i = 0; i < ITERS; i++)
     {
@@ -647,11 +652,18 @@
         ref(ref_dest, 64, pbuf1 + j, sbuf1 + j, STRIDE, STRIDE);
 
         if (memcmp(ref_dest, opt_dest, 64 * 64 * sizeof(pixel)))
+        {
+#if HIGH_BIT_DEPTH
+            X265_DEPTH = old_depth;
+#endif
             return false;
-
+        }
         j += INCR;
     }
 
+#if HIGH_BIT_DEPTH
+    X265_DEPTH = old_depth;
+#endif
     return true;
 }
 
@@ -1185,8 +1197,15 @@
 
     if (opt.luma_add_ps[part])
     {
+#if HIGH_BIT_DEPTH
+        int old_depth = X265_DEPTH;
+        X265_DEPTH = 10;
+#endif
         HEADER("luma_add_ps[%s]", lumaPartStr[part]);
         REPORT_SPEEDUP(opt.luma_add_ps[part], ref.luma_add_ps[part], pbuf1, FENC_STRIDE, pbuf2, sbuf1, STRIDE, STRIDE);
+#if HIGH_BIT_DEPTH
+        X265_DEPTH = old_depth;
+#endif
     }
 
     for (int i = 0; i < X265_CSP_COUNT; i++)


More information about the x265-devel mailing list