[x265] [PATCH 3 of 3] Adding test bench code for luma vsp filter functions
nabajit at multicorewareinc.com
nabajit at multicorewareinc.com
Mon Nov 11 06:51:42 CET 2013
# HG changeset patch
# User Nabajit Deka
# Date 1384149009 -19800
# Mon Nov 11 11:20:09 2013 +0530
# Node ID 7a4e14ca97b4297005053d8aa8cb4da0177691f6
# Parent 81a8ce1f14e46f4c615e1c3494ae823e09fd131b
Adding test bench code for luma vsp filter functions.
diff -r 81a8ce1f14e4 -r 7a4e14ca97b4 source/test/ipfilterharness.cpp
--- a/source/test/ipfilterharness.cpp Mon Nov 11 11:15:01 2013 +0530
+++ b/source/test/ipfilterharness.cpp Mon Nov 11 11:20:09 2013 +0530
@@ -410,6 +410,36 @@
return true;
}
+bool IPFilterHarness::check_IPFilterLuma_sp_primitive(filter_sp_t ref, filter_sp_t opt)
+{
+ int rand_srcStride, rand_dstStride, rand_coeffIdx;
+
+ for (int i = 0; i <= 100; i++)
+ {
+ rand_coeffIdx = rand() % 3; // Random coeffIdex in the filter
+
+ rand_srcStride = rand() % 100; // Randomly generated srcStride
+ rand_dstStride = 64 ;//rand() % 100 + 64; // Randomly generated dstStride
+
+ ref(short_buff + 3 * rand_srcStride,
+ rand_srcStride,
+ IPF_C_output_p,
+ rand_dstStride,
+ rand_coeffIdx);
+
+ opt(short_buff + 3 * rand_srcStride,
+ rand_srcStride,
+ IPF_vec_output_p,
+ rand_dstStride,
+ rand_coeffIdx);
+
+ if (memcmp(IPF_vec_output_p, IPF_C_output_p, ipf_t_size))
+ return false;
+ }
+
+ return true;
+}
+
bool IPFilterHarness::check_IPFilterLumaHV_primitive(filter_hv_pp_t ref, filter_hv_pp_t opt)
{
int rand_srcStride, rand_dstStride, rand_coeffIdxX, rand_coeffIdxY;
@@ -550,6 +580,14 @@
return false;
}
}
+ if (opt.luma_vsp[value])
+ {
+ if (!check_IPFilterLuma_sp_primitive(ref.luma_vsp[value], opt.luma_vsp[value]))
+ {
+ printf("luma_vsp[%s]", lumaPartStr[value]);
+ return false;
+ }
+ }
}
for (int value = 0; value < NUM_CHROMA_PARTITIONS; value++)
@@ -689,6 +727,14 @@
IPF_vec_output_s, dstStride, 1);
}
+ if (opt.luma_vsp[value])
+ {
+ printf("luma_vsp[%s]\t", lumaPartStr[value]);
+ REPORT_SPEEDUP(opt.luma_vsp[value], ref.luma_vsp[value],
+ short_buff + maxVerticalfilterHalfDistance * srcStride, srcStride,
+ IPF_vec_output_p, dstStride, 1);
+ }
+
if (opt.luma_hvpp[value])
{
printf("luma_hv [%s]\t", lumaPartStr[value]);
diff -r 81a8ce1f14e4 -r 7a4e14ca97b4 source/test/ipfilterharness.h
--- a/source/test/ipfilterharness.h Mon Nov 11 11:15:01 2013 +0530
+++ b/source/test/ipfilterharness.h Mon Nov 11 11:20:09 2013 +0530
@@ -50,6 +50,7 @@
bool check_IPFilterChroma_primitive(filter_pp_t ref, filter_pp_t opt);
bool check_IPFilterLuma_primitive(filter_pp_t ref, filter_pp_t opt);
bool check_IPFilterLuma_ps_primitive(filter_ps_t ref, filter_ps_t opt);
+ bool check_IPFilterLuma_sp_primitive(filter_sp_t ref, filter_sp_t opt);
bool check_IPFilterLumaHV_primitive(filter_hv_pp_t ref, filter_hv_pp_t opt);
public:
More information about the x265-devel
mailing list