[x265] [PATCH] asm: 10bpp test bench code for calcrecon

murugan at multicorewareinc.com murugan at multicorewareinc.com
Wed Dec 11 08:17:05 CET 2013


# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1386746206 -19800
#      Wed Dec 11 12:46:46 2013 +0530
# Node ID 1686a3f8b3d04a33dfff3da8ca55c0acc1684bc1
# Parent  470737ecdb2e6993d651b9cfe7080341390f5a05
asm: 10bpp test bench code for calcrecon

diff -r 470737ecdb2e -r 1686a3f8b3d0 source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp	Tue Dec 10 22:46:59 2013 +0550
+++ b/source/test/pixelharness.cpp	Wed Dec 11 12:46:46 2013 +0530
@@ -259,6 +259,10 @@
     memset(opt_reco, 0, 64 * 64 * sizeof(pixel));
     memset(ref_pred, 0, 64 * 64 * sizeof(pixel));
     memset(opt_pred, 0, 64 * 64 * sizeof(pixel));
+#if HIGH_BIT_DEPTH
+    int old_depth = X265_DEPTH;
+    X265_DEPTH = 10;
+#endif
 
     int j = 0;
     for (int i = 0; i < ITERS; i++)
@@ -268,15 +272,32 @@
         opt(pbuf1 + j, sbuf1 + j, opt_reco, opt_recq, opt_pred, stride, stride, stride);
 
         if (memcmp(ref_recq, opt_recq, 64 * 64 * sizeof(int16_t)))
+        {
+#if HIGH_BIT_DEPTH
+            X265_DEPTH = old_depth;
+#endif
             return false;
+        }
         if (memcmp(ref_reco, opt_reco, 64 * 64 * sizeof(pixel)))
+        {
+#if HIGH_BIT_DEPTH
+            X265_DEPTH = old_depth;
+#endif
             return false;
+        }
         if (memcmp(ref_pred, opt_pred, 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;
 }
 
@@ -1289,8 +1310,15 @@
 
         if (opt.calcrecon[i])
         {
+#if HIGH_BIT_DEPTH
+        int old_depth = X265_DEPTH;
+        X265_DEPTH = 10;
+#endif
             HEADER("recon[%dx%d]", 4 << i, 4 << i);
             REPORT_SPEEDUP(opt.calcrecon[i], ref.calcrecon[i], pbuf1, sbuf1, pbuf2, sbuf1, pbuf1, 64, 64, 64);
+#if HIGH_BIT_DEPTH
+        X265_DEPTH = old_depth;
+#endif
         }
 
         if (opt.blockfill_s[i])


More information about the x265-devel mailing list