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

Unified Diff: silk/arm/SigProc_FIX_armv5e.h

Issue 28553003: Updating Opus to a pre-release of 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Removing failing file Created 7 years, 2 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 | « silk/arm/SigProc_FIX_armv4.h ('k') | silk/arm/macros_armv4.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: silk/arm/SigProc_FIX_armv5e.h
diff --git a/silk/float/scale_vector_FLP.c b/silk/arm/SigProc_FIX_armv5e.h
similarity index 69%
copy from silk/float/scale_vector_FLP.c
copy to silk/arm/SigProc_FIX_armv5e.h
index 387eb4ba53fc6a2a22b085bf4abfd5ad7ca7170e..81a6324f652022312aa5e21cedbf36669116b09d 100644
--- a/silk/float/scale_vector_FLP.c
+++ b/silk/arm/SigProc_FIX_armv5e.h
@@ -1,5 +1,6 @@
/***********************************************************************
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
+Copyright (c) 2013 Parrot
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
@@ -8,11 +9,11 @@ this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-- Neither the name of Internet Society, IETF or IETF Trust, nor the
+- Neither the name of Internet Society, IETF or IETF Trust, nor the
names of specific contributors, may be used to endorse or promote
products derived from this software without specific prior written
permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
@@ -25,32 +26,36 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "SigProc_FLP.h"
+#ifndef SILK_SIGPROC_FIX_ARMv5E_H
+#define SILK_SIGPROC_FIX_ARMv5E_H
-/* multiply a vector by a constant */
-void silk_scale_vector_FLP(
- silk_float *data1,
- silk_float gain,
- opus_int dataSize
-)
+#undef silk_SMULTT
+static inline opus_int32 silk_SMULTT_armv5e(opus_int32 a, opus_int32 b)
{
- opus_int i, dataSize4;
-
- /* 4x unrolled loop */
- dataSize4 = dataSize & 0xFFFC;
- for( i = 0; i < dataSize4; i += 4 ) {
- data1[ i + 0 ] *= gain;
- data1[ i + 1 ] *= gain;
- data1[ i + 2 ] *= gain;
- data1[ i + 3 ] *= gain;
- }
+ opus_int32 res;
+ __asm__(
+ "#silk_SMULTT\n\t"
+ "smultt %0, %1, %2\n\t"
+ : "=r"(res)
+ : "%r"(a), "r"(b)
+ );
+ return res;
+}
+#define silk_SMULTT(a, b) (silk_SMULTT_armv5e(a, b))
- /* any remaining elements */
- for( ; i < dataSize; i++ ) {
- data1[ i ] *= gain;
- }
+#undef silk_SMLATT
+static inline opus_int32 silk_SMLATT_armv5e(opus_int32 a, opus_int32 b,
+ opus_int32 c)
+{
+ opus_int32 res;
+ __asm__(
+ "#silk_SMLATT\n\t"
+ "smlatt %0, %1, %2, %3\n\t"
+ : "=r"(res)
+ : "%r"(b), "r"(c), "r"(a)
+ );
+ return res;
}
+#define silk_SMLATT(a, b, c) (silk_SMLATT_armv5e(a, b, c))
+
+#endif
« no previous file with comments | « silk/arm/SigProc_FIX_armv4.h ('k') | silk/arm/macros_armv4.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698