[x265] [PATCH 3 of 3] Adding test bench code for luma vps filter functions
nabajit at multicorewareinc.com
nabajit at multicorewareinc.com
Tue Nov 5 08:22:51 CET 2013
# HG changeset patch
# User Nabajit Deka
# Date 1383636001 -19800
# Tue Nov 05 12:50:01 2013 +0530
# Node ID b1bee3614505ed6eb6ac610a0f023e1af5b42c9c
# Parent a1644f4f03eb425830a0e9a547912dc411f078d9
Adding test bench code for luma vps filter functions.
diff -r a1644f4f03eb -r b1bee3614505 source/test/ipfilterharness.cpp
--- a/source/test/ipfilterharness.cpp Tue Nov 05 12:47:42 2013 +0530
+++ b/source/test/ipfilterharness.cpp Tue Nov 05 12:50:01 2013 +0530
@@ -379,6 +379,35 @@
return true;
}
+bool IPFilterHarness::check_IPFilterLuma_ps_primitive(filter_ps_t ref, filter_ps_t opt)
+{
+ int rand_srcStride, rand_dstStride, rand_coeffIdx;
+
+ for (int i = 0; i <= 1000; i++)
+ {
+ rand_coeffIdx = rand() % 3; // Random coeffIdex in the filter
+
+ rand_srcStride = rand() % 100; // Randomly generated srcStride
+ rand_dstStride = rand() % 100 + 64; // Randomly generated dstStride
+
+ ref(pixel_buff + 3 * rand_srcStride,
+ rand_srcStride,
+ IPF_C_output_s,
+ rand_dstStride,
+ rand_coeffIdx);
+ opt(pixel_buff + 3 * rand_srcStride,
+ rand_srcStride,
+ IPF_vec_output_s,
+ rand_dstStride,
+ rand_coeffIdx);
+
+ if (memcmp(IPF_vec_output_s, IPF_C_output_s, ipf_t_size* sizeof(int16_t)))
+ 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;
@@ -505,6 +534,14 @@
return false;
}
}
+ if (opt.luma_vps[value])
+ {
+ if (!check_IPFilterLuma_ps_primitive(ref.luma_vps[value], opt.luma_vps[value]))
+ {
+ printf("luma_vps[%s]", lumaPartStr[value]);
+ return false;
+ }
+ }
}
for (int value = 0; value < NUM_CHROMA_PARTITIONS; value++)
@@ -627,6 +664,13 @@
IPF_vec_output_p, dstStride, 1);
}
+ if (opt.luma_vps[value])
+ {
+ printf("luma_vps[%s]\t", lumaPartStr[value]);
+ REPORT_SPEEDUP(opt.luma_vps[value], ref.luma_vps[value],
+ pixel_buff + maxVerticalfilterHalfDistance * srcStride, srcStride,
+ IPF_vec_output_s, dstStride, 1);
+ }
if (opt.luma_hvpp[value])
{
printf("luma_hv [%s]\t", lumaPartStr[value]);
diff -r a1644f4f03eb -r b1bee3614505 source/test/ipfilterharness.h
--- a/source/test/ipfilterharness.h Tue Nov 05 12:47:42 2013 +0530
+++ b/source/test/ipfilterharness.h Tue Nov 05 12:50:01 2013 +0530
@@ -49,6 +49,7 @@
bool check_IPFilter_primitive(ipfilter_s2p_t ref, ipfilter_s2p_t opt);
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_IPFilterLumaHV_primitive(filter_hv_pp_t ref, filter_hv_pp_t opt);
public:
More information about the x265-devel
mailing list