summaryrefslogtreecommitdiffstats
path: root/sbc/sbc_primitives.c
Commit message (Collapse)AuthorAgeFilesLines
* SBC encoder scale factors calculation optimized with __builtin_clzSiarhei Siamashka2009-01-291-0/+41
| | | | | | | | | 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-56/+204
| | | | | | | | 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).
* Audio quality improvement for 16-bit fixed point SBC encoderSiarhei Siamashka2009-01-231-145/+12
| | | | | | | | | | | | | | | | | Multiplying the first part of the analysis filter constant tables by some coefficients and dividing the second part by the same coefficients is a transformation which should produce the same results if rounding errors are not taken into account. These additional C0/C1/... coefficients can be varied in a certain range (the requirement is that we still do not get overflows). The 'magic' values for these coefficients are selected in such a way that the rounding errors are minimized (rounding errors are unavoidable when putting all the floating constants into 16-bit tables and losing some of the fractional part). Also non-SIMD variant of the analysis filter is dropped because keeping it would require applying a similar change to its tables, which is a bit tricky and just increases maintenance overhead.
* Fix indentation to use only tabsJohan Hedberg2009-01-161-15/+15
|
* MMX and ARM NEON optimized versions of analysis filter for SBC encoderSiarhei Siamashka2009-01-161-0/+12
|
* SIMD-friendly variant of SBC encoder analysis filterSiarhei Siamashka2009-01-161-0/+401
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.