Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: media/base/sinc_resampler_unittest.cc

Issue 2556993002: Experiment with AVX optimizations for FMAC, FMUL operations.
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/sinc_resampler_perftest.cc ('k') | media/base/vector_math.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/sinc_resampler_unittest.cc
diff --git a/media/base/sinc_resampler_unittest.cc b/media/base/sinc_resampler_unittest.cc
index 8dd346ee467cbed086acf78272d1c846fcd8c533..9fe3fb7536fa2dc727172037964077fd8b6af20a 100644
--- a/media/base/sinc_resampler_unittest.cc
+++ b/media/base/sinc_resampler_unittest.cc
@@ -151,52 +151,6 @@ TEST(SincResamplerTest, DISABLED_SetRatioBench) {
printf("SetRatio() took %.2fms.\n", total_time_c_ms);
}
-
-// Define platform independent function name for Convolve* tests.
-#if defined(ARCH_CPU_X86_FAMILY)
-#define CONVOLVE_FUNC Convolve_SSE
-#elif defined(ARCH_CPU_ARM_FAMILY) && defined(USE_NEON)
-#define CONVOLVE_FUNC Convolve_NEON
-#endif
-
-// Ensure various optimized Convolve() methods return the same value. Only run
-// this test if other optimized methods exist, otherwise the default Convolve()
-// will be tested by the parameterized SincResampler tests below.
-#if defined(CONVOLVE_FUNC)
-static const double kKernelInterpolationFactor = 0.5;
-
-TEST(SincResamplerTest, Convolve) {
- // Initialize a dummy resampler.
- MockSource mock_source;
- SincResampler resampler(
- kSampleRateRatio, SincResampler::kDefaultRequestSize,
- base::Bind(&MockSource::ProvideInput, base::Unretained(&mock_source)));
-
- // The optimized Convolve methods are slightly more precise than Convolve_C(),
- // so comparison must be done using an epsilon.
- static const double kEpsilon = 0.00000005;
-
- // Use a kernel from SincResampler as input and kernel data, this has the
- // benefit of already being properly sized and aligned for Convolve_SSE().
- double result = resampler.Convolve_C(
- resampler.kernel_storage_.get(), resampler.kernel_storage_.get(),
- resampler.kernel_storage_.get(), kKernelInterpolationFactor);
- double result2 = resampler.CONVOLVE_FUNC(
- resampler.kernel_storage_.get(), resampler.kernel_storage_.get(),
- resampler.kernel_storage_.get(), kKernelInterpolationFactor);
- EXPECT_NEAR(result2, result, kEpsilon);
-
- // Test Convolve() w/ unaligned input pointer.
- result = resampler.Convolve_C(
- resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(),
- resampler.kernel_storage_.get(), kKernelInterpolationFactor);
- result2 = resampler.CONVOLVE_FUNC(
- resampler.kernel_storage_.get() + 1, resampler.kernel_storage_.get(),
- resampler.kernel_storage_.get(), kKernelInterpolationFactor);
- EXPECT_NEAR(result2, result, kEpsilon);
-}
-#endif
-
// Fake audio source for testing the resampler. Generates a sinusoidal linear
// chirp (http://en.wikipedia.org/wiki/Chirp) which can be tuned to stress the
// resampler for the specific sample rate conversion being used.
« no previous file with comments | « media/base/sinc_resampler_perftest.cc ('k') | media/base/vector_math.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698