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

Unified Diff: media/base/sinc_resampler.h

Issue 10803003: Add SSE optimizations to SincResampler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fischman Fixes! Created 8 years, 5 months 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 | « no previous file | media/base/sinc_resampler.cc » ('j') | media/base/sinc_resampler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/sinc_resampler.h
diff --git a/media/base/sinc_resampler.h b/media/base/sinc_resampler.h
index 58f5c2dd7ebf0c16886c7b9a958571b164d48139..ac5a07491a924fbb1750294b1286983cae3b88c5 100644
--- a/media/base/sinc_resampler.h
+++ b/media/base/sinc_resampler.h
@@ -6,7 +6,9 @@
#define MEDIA_BASE_SINC_RESAMPLER_H_
#include "base/callback.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "build/build_config.h"
#include "media/base/media_export.h"
namespace media {
@@ -33,8 +35,24 @@ class MEDIA_EXPORT SincResampler {
int ChunkSize();
private:
+ FRIEND_TEST_ALL_PREFIXES(SincResamplerTest, Convolve);
+ FRIEND_TEST_ALL_PREFIXES(SincResamplerTest, ConvolveBenchmark);
+
void InitializeKernel();
+ // Compute convolution of |k1| and |k2| over |input_ptr|, resultant sums are
+ // linearly interpolated using |kernel_interpolation_factor|. The underlying
+ // implementation is chosen at run time based on SSE support.
+ static float Convolve(const float* input_ptr, const float* k1,
+ const float* k2, double kernel_interpolation_factor);
+ static float Convolve_C(const float* input_ptr, const float* k1,
+ const float* k2, double kernel_interpolation_factor);
+#if defined(ARCH_CPU_X86_FAMILY) && defined(__SSE__)
Ami GONE FROM CHROMIUM 2012/07/21 17:25:10 #if unnecessary (fine to leave methods undefined a
DaleCurtis 2012/07/24 00:13:07 Done.
+ static float Convolve_SSE(const float* input_ptr, const float* k1,
+ const float* k2,
+ double kernel_interpolation_factor);
+#endif
+
// The ratio of input / output sample rates.
double io_sample_rate_ratio_;
« no previous file with comments | « no previous file | media/base/sinc_resampler.cc » ('j') | media/base/sinc_resampler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698