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>
This commit is contained in:
Aurélien Zanelli 2013-05-31 15:07:00 +02:00 committed by Timothy B. Terriberry
parent aa6a1a16ad
commit cd4c8249bc
11 changed files with 295 additions and 0 deletions

View file

@ -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 );