diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2009-01-21 21:08:34 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-01-23 21:15:38 +0200 |
commit | c90eb5ba7e77fa0c430354ed8fdcd67ebdc17b9c (patch) | |
tree | 7667a46fec36961d58fb9deb4b7ff55e84eabc81 /sbc/sbc_primitives.h | |
parent | f70d1ada0aba5567fbf67cedfb4a4ba1a9f9852e (diff) |
Use of -funroll-loops option to improve SBC encoder performance
Added the use of -funroll-loops gcc option for SBC. Also in
order to gain better effect, 'sbc_pack_frame' function
body moved to an inline function, which gets instantiated
for 4 different subbands/channels combinations. So that
'frame_subbands' and 'frame_channels' arguments become compile
time constants and can be better optimized by the compiler.
Diffstat (limited to 'sbc/sbc_primitives.h')
-rw-r--r-- | sbc/sbc_primitives.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sbc/sbc_primitives.h b/sbc/sbc_primitives.h index 91b72eef..a418ed8a 100644 --- a/sbc/sbc_primitives.h +++ b/sbc/sbc_primitives.h @@ -28,6 +28,12 @@ #define SCALE_OUT_BITS 15 +#ifdef __GNUC__ +#define SBC_ALWAYS_INLINE __attribute__((always_inline)) +#else +#define SBC_ALWAYS_INLINE inline +#endif + struct sbc_encoder_state { int subbands; int position[2]; |