summaryrefslogtreecommitdiffstats
path: root/media/base/vector_math_testing.h
diff options
context:
space:
mode:
authordalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 21:30:37 +0000
committerdalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-08 21:30:37 +0000
commit7ed91e9093602872c62eba397fc1be8741089157 (patch)
tree6c4c2c6878ed51ca2e90586f11ea3887835c5e8c /media/base/vector_math_testing.h
parent13bfbc41308953ebea4952ff504037a261cfdd3c (diff)
downloadchromium_src-7ed91e9093602872c62eba397fc1be8741089157.zip
chromium_src-7ed91e9093602872c62eba397fc1be8741089157.tar.gz
chromium_src-7ed91e9093602872c62eba397fc1be8741089157.tar.bz2
Add vector_math::FMUL. Replace audio_util::AdjustVolume.
Removes the integer based volume adjustment code from the melting pot that is audio_util in favor of an AudioBus::AdjustVolume() method which works on float. The driver behind the method is a new vector_math::FMUL method which is SSE optimized. Benchmarks put it in line with the vector_math::FMAC() method. Benchmarking 200000 iterations: FMUL_C took 1962.52ms. FMUL_SSE (unaligned size) took 493.03ms; which is 3.98x faster than FMUL_C. FMUL_SSE (aligned size) took 491.79ms; which is 3.99x faster than FMUL_C and 1.00x faster than FMUL_SSE (unaligned size). BUG=120319, 171540, 226447 TEST=new media_unittests. Review URL: https://chromiumcodereview.appspot.com/13726011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/vector_math_testing.h')
-rw-r--r--media/base/vector_math_testing.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/base/vector_math_testing.h b/media/base/vector_math_testing.h
index 503ca6a..1fecf4f 100644
--- a/media/base/vector_math_testing.h
+++ b/media/base/vector_math_testing.h
@@ -11,13 +11,15 @@
namespace media {
namespace vector_math {
-// Optimized versions of FMAC() function exposed for testing. See vector_math.h
-// for details.
+// Optimized versions exposed for testing. See vector_math.h for details.
MEDIA_EXPORT void FMAC_C(const float src[], float scale, int len, float dest[]);
+MEDIA_EXPORT void FMUL_C(const float src[], float scale, int len, float dest[]);
#if defined(ARCH_CPU_X86_FAMILY)
MEDIA_EXPORT void FMAC_SSE(const float src[], float scale, int len,
float dest[]);
+MEDIA_EXPORT void FMUL_SSE(const float src[], float scale, int len,
+ float dest[]);
#endif
} // namespace vector_math