#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/cpu.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/sinc_resampler.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_result_reporter.h"
namespace media {
static const int kBenchmarkIterations = …;
static const double kSampleRateRatio = …;
static const double kKernelInterpolationFactor = …;
static void RunConvolveBenchmark(float (*convolve_fn)(const int,
const float*,
const float*,
const float*,
double),
bool aligned,
const std::string& trace_name) { … }
TEST(SincResamplerPerfTest, Convolve_unoptimized_aligned) { … }
TEST(SincResamplerPerfTest, Convolve_optimized_aligned) { … }
TEST(SincResamplerPerfTest, Convolve_optimized_unaligned) { … }
}