summaryrefslogtreecommitdiff
path: root/silk/NSQ.c
diff options
context:
space:
mode:
authorxiangmingzhu <xiangzhu@cisco.com>2014-04-30 15:48:07 +0800
committerJean-Marc Valin <jmvalin@jmvalin.ca>2014-10-03 21:16:00 -0400
commitc95c9a048f3283afb2e412b10085d4f7c19e1412 (patch)
treeed8873af6559d7a98922e0fed85be47c826ef521 /silk/NSQ.c
parent80460334b77d70e665a390503cd8992cdad06c10 (diff)
downloadopus-c95c9a048f3283afb2e412b10085d4f7c19e1412.tar.gz
Cisco optimization for x86 & fixed point
1. Only for fixed point on x86 platform (32bit and 64bit, uses SIMD intrinsics up to SSE4.2) 2. Use "configure --enable-fixed-point --enable-intrinsics" to enable optimization, default is disabled. 3. Official test cases are verified and passed. Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Diffstat (limited to 'silk/NSQ.c')
-rw-r--r--silk/NSQ.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/silk/NSQ.c b/silk/NSQ.c
index cf5b3fd5..a0658840 100644
--- a/silk/NSQ.c
+++ b/silk/NSQ.c
@@ -46,6 +46,7 @@ static OPUS_INLINE void silk_nsq_scale_states(
const opus_int signal_type /* I Signal type */
);
+#if !defined(OPUS_X86_MAY_HAVE_SSE4_1)
static OPUS_INLINE void silk_noise_shape_quantizer(
silk_nsq_state *NSQ, /* I/O NSQ state */
opus_int signalType, /* I Signal type */
@@ -67,8 +68,10 @@ static OPUS_INLINE void silk_noise_shape_quantizer(
opus_int shapingLPCOrder, /* I Noise shaping AR filter order */
opus_int predictLPCOrder /* I Prediction filter order */
);
+#endif
-void silk_NSQ(
+void silk_NSQ_c
+(
const silk_encoder_state *psEncC, /* I/O Encoder State */
silk_nsq_state *NSQ, /* I/O NSQ state */
SideInfoIndices *psIndices, /* I/O Quantization Indices */
@@ -141,7 +144,7 @@ void silk_NSQ(
silk_assert( start_idx > 0 );
silk_LPC_analysis_filter( &sLTP[ start_idx ], &NSQ->xq[ start_idx + k * psEncC->subfr_length ],
- A_Q12, psEncC->ltp_mem_length - start_idx, psEncC->predictLPCOrder );
+ A_Q12, psEncC->ltp_mem_length - start_idx, psEncC->predictLPCOrder, psEncC->arch );
NSQ->rewhite_flag = 1;
NSQ->sLTP_buf_idx = psEncC->ltp_mem_length;
@@ -172,7 +175,11 @@ void silk_NSQ(
/***********************************/
/* silk_noise_shape_quantizer */
/***********************************/
-static OPUS_INLINE void silk_noise_shape_quantizer(
+
+#if !defined(OPUS_X86_MAY_HAVE_SSE4_1)
+static OPUS_INLINE
+#endif
+void silk_noise_shape_quantizer(
silk_nsq_state *NSQ, /* I/O NSQ state */
opus_int signalType, /* I Signal type */
const opus_int32 x_sc_Q10[], /* I */