summaryrefslogtreecommitdiffstats
path: root/sbc
Commit message (Collapse)AuthorAgeFilesLines
* fix up sbc.h prototypes to use const/size_t wherever applicableLennart Poettering2009-03-234-21/+44
|
* sbc: ensure 16-byte buffer position alignment for 4 subbands encodingSiarhei Siamashka2009-03-142-4/+4
| | | | | | | Buffer position in X array was not always 16-bytes aligned. Strict 16-byte alignment is strictly required for powerpc altivec simd optimizations because altivec does not have support for unaligned vector loads at all.
* Fix misuse of 'frame.joint' when estimating the frame length.Luiz Augusto von Dentz2009-03-211-17/+12
| | | | | 'frame.joint' is not the flag for joint stereo mode, it is a set of bits which show for which subbands channels joining was actually used.
* Fix a couple of other places that should use size_t and ssize_tJohan Hedberg2009-03-123-8/+11
|
* sbc: don't dereference sbc pointer if NULLMarc-André Lureau2009-02-171-2/+2
|
* sbc: provide implementation info as a readable stringMarc-André Lureau2009-02-176-0/+19
| | | | This is mainly useful for logging and debugging.
* make check_mmx_support() a proper C functionLennart Poettering2009-02-011-1/+1
| | | | Signed-off-by: Lennart Poettering <lennart@poettering.net>
* Fix SBC to compile cleanly with -Wsign-compareMarcel Holtmann2009-01-302-6/+9
|
* Fix for SBC encoding with block sizes other than 16Siarhei Siamashka2009-01-291-6/+13
| | | | | | Thanks to Christian Hoene for finding and reporting the problem. This regression was intruduced in commit 19af3c49e61aa046375497108e05a3a0605da158
* Add -Wno-sign-compare for the library and fix the other warningsMarcel Holtmann2009-01-294-6/+7
|
* SBC encoder scale factors calculation optimized with __builtin_clzSiarhei Siamashka2009-01-293-16/+50
| | | | | | | | | 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-285-203/+258
| | | | | | | | 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-233-17/+41
| | | | | | | | | 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.
* Audio quality improvement for 16-bit fixed point SBC encoderSiarhei Siamashka2009-01-232-347/+270
| | | | | | | | | | | | | | | | | 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 sbcenc breakage when au file header size is larger than 24 bytesSiarhei Siamashka2009-01-191-7/+17
|
* Performance optimizations for sbcenc utilitySiarhei Siamashka2009-01-181-72/+50
| | | | | | Read and write buffers sizes increased, memmove overhead eliminated. Nonportable cast from 'unsigned char *' to 'struct au_header *' is now also resolved as part of the changes.
* Coding style fixesSiarhei Siamashka2009-01-181-21/+32
|
* Fix indentation to use only tabsJohan Hedberg2009-01-165-219/+219
|
* Add missing sbc headers to distJohan Hedberg2009-01-161-0/+1
|
* MMX and ARM NEON optimized versions of analysis filter for SBC encoderSiarhei Siamashka2009-01-166-1/+765
|
* SBC arrays and constant tables aligned at 16 byte boundary for SIMDSiarhei Siamashka2009-01-164-15/+36
| | | | | | | 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-166-160/+703
| | | | | | | | | 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.
* Fix for big endian problems in SBC codecSiarhei Siamashka2009-01-071-12/+0
|
* Fixed correct handling of frame sizes in the encoderChristian Hoene2009-01-063-5/+7
|
* Use of constant shift in SBC quantization code to make it fasterSiarhei Siamashka2009-01-061-10/+13
| | | | | | | | | The result of 32x32->64 unsigned long multiplication is returned in two registers (high and low 32-bit parts) for many 32-bit architectures. For these architectures constant right shift by 32 bits is optimized out by the compiler to just taking the high 32-bit part. Also some data needed at the quantization stage is precalculated beforehand to improve performance.
* Update copyright informationMarcel Holtmann2009-01-019-13/+13
|
* Added possibility to analyze 4 blocks at once in SBC encoderSiarhei Siamashka2009-01-011-49/+82
| | | | | | | | | | | This change is needed for SIMD optimizations which will follow shortly. And even for non-SIMD capable platforms it still may be useful to have possibility to merge several analyzing functions together into one for better code scheduling or reusing loaded constants. Also analysis filter functions are now called using function pointers, which allows the default implementation to be overrided at runtime (with high precision variant or MMX/SSE2/NEON optimized code).
* New SBC analysis filter function to replace current broken codeSiarhei Siamashka2008-12-293-244/+323
| | | | | | | | | | | | | | This code is heavily based on the patch submitted by Jaska Uimonen. Additional changes include preserving extra bits in the output of filter function for better precision, support for both 16-bit and 32-bit fixed point implementation. Sign of some table values was changed in order to preserve a regular code structure and have multiply-accumulate oparations only. No additional optimizations were applied as this code is intended to be some kind of "reference" implementation. Platform specific optimizations may require different tricks and can be branched off from this implementation. Some extra information about this code can be found in linux-bluetooth mailing list archive for December 2008.
* Fixed subbands selection for joint-stereo in SBC encoderSiarhei Siamashka2008-12-291-4/+4
|
* Add more options to control encoding methodsMarcel Holtmann2008-12-231-16/+51
|
* Don't decode a frame if it is too smallMarcel Holtmann2008-12-231-0/+3
|
* Remove unnecessary code and fix a coding style.Luiz Augusto von Dentz2008-12-181-14/+11
|
* Fix for overflow bug in SBC quantization codeSiarhei Siamashka2008-12-181-1/+1
| | | | | | | The result of multiplication does not always fit into 32-bits. Using 64-bit calculations helps to avoid overflows and sound quality problems in encoded audio. Overflows are more likely to show up when using high values for bitpool setting.
* Bitstream writing optimization for SBC encoderSiarhei Siamashka2008-12-181-28/+37
| | | | | SBC encoder performance improvement up to 1.5x for ARM11 and almost twice faster for Intel Core2 in some cases.
* Add more options to SBC encoder and decoderMarcel Holtmann2008-11-012-13/+48
|
* Fix SBC gain mismatchMarcel Holtmann2008-10-312-4/+5
|
* Fix SBC decoding handlingMarcel Holtmann2008-10-301-4/+4
|
* Let the decoder write Sun/NeXT audio S16_BE filesMarcel Holtmann2008-10-264-33/+76
|
* Add bitpool option to encoderMarcel Holtmann2008-10-261-5/+13
|
* Fix missing encoding of last frameMarcel Holtmann2008-10-262-5/+4
|
* Avoid direct inclusion of malloc.hMarcel Holtmann2008-06-111-1/+0
|
* rollback an unintended commit on Makefile.amBrad Midgley2008-03-081-1/+2
|
* Cidorvan found another place where the spec had us saving a bunch of valuesBrad Midgley2008-03-082-26/+14
| | | | that were used immediately. Just compute and use instead of saving. In the decoder.
* decoder optimization, now using nested multiply callsBrad Midgley2008-03-061-48/+51
|
* Enable gcc -O3 optimizations for SBCMarcel Holtmann2008-03-051-0/+2
|
* Cidorvan's 4-subband overflow fixesBrad Midgley2008-02-292-7/+7
|
* Replace 64bits multiplies by 32bits to further optimize the codeJohan Hedberg2008-02-222-35/+29
|
* Introduce sbc new API.Luiz Augusto von Dentz2008-02-194-171/+247
|
* fix for decoder noise at high bitpoolsBrad Midgley2008-02-152-18/+10
|
* Update copyright informationMarcel Holtmann2008-02-028-14/+13
|