[x265] [PATCH] Added random stride in chroma unit test code

praveen at multicorewareinc.com praveen at multicorewareinc.com
Thu Oct 17 09:23:23 CEST 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1381994595 -19800
# Node ID 688c171cc71ad23d7d24e11ae98039473952348d
# Parent  68f97c7f08392d387046736ae3e86095c653fd05
Added random stride in chroma unit test code

diff -r 68f97c7f0839 -r 688c171cc71a source/test/ipfilterharness.cpp
--- a/source/test/ipfilterharness.cpp	Thu Oct 17 12:52:11 2013 +0530
+++ b/source/test/ipfilterharness.cpp	Thu Oct 17 12:53:15 2013 +0530
@@ -270,27 +270,26 @@
 
 bool IPFilterHarness::check_IPFilterChroma_primitive(filter_pp_t ref, filter_pp_t opt)
 {
-    int srcStride, dstStride, rand_coeffIdx;
+    int rand_srcStride, rand_dstStride, rand_coeffIdx;
 
     for (int i = 0; i <= 100; i++)
     {
-
         rand_coeffIdx = rand() % 8;                // Random coeffIdex in the filter
 
-         srcStride = 2;
-         dstStride = 2;
+        rand_srcStride = rand() % 100;              // Randomly generated srcStride
+        rand_dstStride = rand() % 100;              // Randomly generated dstStride
 
-        opt(pixel_buff + 3 * srcStride,
-            srcStride,
+        opt(pixel_buff + 3 * rand_srcStride,
+            rand_srcStride,
             IPF_vec_output_p,
-            dstStride,
+            rand_dstStride,
             rand_coeffIdx
             );
-        ref(pixel_buff + 3 * srcStride,
-            srcStride,
+        ref(pixel_buff + 3 * rand_srcStride,
+            rand_srcStride,
             IPF_C_output_p,
-            dstStride,
-            rand_coeffIdx
+            rand_dstStride,
+           rand_coeffIdx
             );
 
         if (memcmp(IPF_vec_output_p, IPF_C_output_p, ipf_t_size))


More information about the x265-devel mailing list