aboutsummaryrefslogtreecommitdiff
path: root/src/opus_decoder.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 /src/opus_decoder.c
parent80460334b77d70e665a390503cd8992cdad06c10 (diff)
downloadlibopus-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 'src/opus_decoder.c')
-rw-r--r--src/opus_decoder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 79c8af1e..c41985e9 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -75,6 +75,7 @@ struct OpusDecoder {
#endif
opus_uint32 rangeFinal;
+ int arch;
};
@@ -131,6 +132,7 @@ int opus_decoder_init(OpusDecoder *st, opus_int32 Fs, int channels)
st->prev_mode = 0;
st->frame_size = Fs/400;
+ st->arch = opus_select_arch();
return OPUS_OK;
}
@@ -375,7 +377,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
/* Call SILK decoder */
int first_frame = decoded_samples == 0;
silk_ret = silk_Decode( silk_dec, &st->DecControl,
- lost_flag, first_frame, &dec, pcm_ptr, &silk_frame_size );
+ lost_flag, first_frame, &dec, pcm_ptr, &silk_frame_size, st->arch );
if( silk_ret ) {
if (lost_flag) {
/* PLC failure should not be fatal */