summaryrefslogtreecommitdiffstats
path: root/sbc/sbc_primitives.h
Commit message (Collapse)AuthorAgeFilesLines
* SBC encoder scale factors calculation optimized with __builtin_clzSiarhei Siamashka2009-01-291-0/+4
| | | | | | | | | Count leading zeros operation is often implemented using a special instruction for it on various architectures (at least this is true for ARM and x86). Using __builtin_clz gcc intrinsic allows to eliminate innermost loop in scale factors calculation and improve performance. Also scale factors calculation can be optimized even more using SIMD instructions.
* Performance optimizations for input data processing in SBC encoderSiarhei Siamashka2009-01-281-7/+19
| | | | | | | | Channels deinterleaving, endian conversion and samples reordering is done in one pass, avoiding the use of intermediate buffer. Also this code is implemented as a new "performance primitive", which allows further platform specific optimizations (ARMv6 and ARM NEON should gain quite a lot from assembly optimizations here).
* Use of -funroll-loops option to improve SBC encoder performanceSiarhei Siamashka2009-01-231-0/+6
| | | | | | | | | 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.
* Fix indentation to use only tabsJohan Hedberg2009-01-161-4/+4
|
* SBC arrays and constant tables aligned at 16 byte boundary for SIMDSiarhei Siamashka2009-01-161-1/+1
| | | | | | | Most SIMD instruction sets benefit from data being naturally aligned. And even if it is not strictly required, performance is usually better with the aligned data. ARM NEON and SSE2 have different instruction variants for aligned/unaligned memory accesses.
* SIMD-friendly variant of SBC encoder analysis filterSiarhei Siamashka2009-01-161-0/+52
Added SIMD-friendly C implementation of SBC analysis filter (the structure of code had to be changed a bit and constants in the tables reordered). This code can be used as a reference for developing platform specific SIMD optimizations. These functions are put into a new file 'sbc_primitives.c', which is going to contain all the basic stuff for SBC codec.