diff options
author | Aurélien Zanelli <aurelien.zanelli@parrot.com> | 2013-05-31 15:07:00 +0200 |
---|---|---|
committer | Timothy B. Terriberry <tterribe@xiph.org> | 2013-06-04 16:23:22 -0700 |
commit | cd4c8249bc0e091789495a09b8942d28b687273c (patch) | |
tree | 43765658985f2bee5e4dbd5acc198b884cfecf48 /src/opus_decoder.c | |
parent | aa6a1a16ad84a58484d4550d661118fe7b8bb310 (diff) | |
download | libopus-cd4c8249bc0e091789495a09b8942d28b687273c.tar.gz |
Add run-time CPU detection and support for ARM architecture
Run-time CPU detection (RTCD) is enabled by default if target platform support
it.
It can be disable at compile time with --disable-rtcd option.
Add RTCD support for ARM architecture.
Thanks to Timothy B. Terriberry for help and code review
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r-- | src/opus_decoder.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c index f0b2b6f9..6bc70919 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -46,6 +46,7 @@ #include "structs.h" #include "define.h" #include "mathops.h" +#include "cpu_support.h" struct OpusDecoder { int celt_dec_offset; @@ -70,6 +71,7 @@ struct OpusDecoder { #endif opus_uint32 rangeFinal; + int arch; }; #ifdef FIXED_POINT @@ -119,6 +121,7 @@ int opus_decoder_init(OpusDecoder *st, opus_int32 Fs, int channels) st->Fs = Fs; st->DecControl.API_sampleRate = st->Fs; st->DecControl.nChannelsAPI = st->channels; + st->arch = opus_select_arch(); /* Reset decoder */ ret = silk_InitDecoder( silk_dec ); |