Commit Graph

9 Commits

Author SHA1 Message Date
Siarhei Siamashka
01084686e1 sbc: added "cc" to the clobber list of mmx inline assembly
In the case of scale factors calculation optimizations, the inline
assembly code has instructions which update flags register, but
"cc" was not mentioned in the clobber list. When optimizing code,
gcc theoretically is allowed to do a comparison before the inline
assembly block, and a conditional branch after it which would lead
to a problem if the flags register gets clobbered. While this is
apparently not happening in practice with the current versions of
gcc, the clobber list needs to be corrected.

Regarding the other inline assembly blocks. While most likely it
is actually unnecessary based on quick review, "cc" is also added
there to the clobber list because it should have no impact on
performance in practice. It's kind of cargo cult, but relieves
us from the need to track the potential updates of flags register
in all these places.
2010-11-11 15:06:41 +02:00
Siarhei Siamashka
95465b816f sbc: MMX optimization for scale factors calculation
Improves SBC encoding performance when joint stereo is not used.
Benchmarked on Pentium-M:

== Before: ==

$ time ./sbcenc -b53 -s8 test.au > /dev/null

real    0m1.439s
user    0m1.336s
sys     0m0.104s

samples  %        image name               symbol name
8642     33.7473  sbcenc                   sbc_pack_frame
5873     22.9342  sbcenc                   sbc_analyze_4b_8s_mmx
4435     17.3188  sbcenc                   sbc_calc_scalefactors
4285     16.7331  sbcenc                   sbc_calculate_bits
1942      7.5836  sbcenc                   sbc_enc_process_input_8s_be
322       1.2574  sbcenc                   sbc_encode

== After: ==

$ time ./sbcenc -b53 -s8 test.au > /dev/null

real    0m1.319s
user    0m1.220s
sys     0m0.084s

samples  %        image name               symbol name
8706     37.9959  sbcenc                   sbc_pack_frame
5740     25.0513  sbcenc                   sbc_analyze_4b_8s_mmx
4307     18.7972  sbcenc                   sbc_calculate_bits
1937      8.4537  sbcenc                   sbc_enc_process_input_8s_be
1801      7.8602  sbcenc                   sbc_calc_scalefactors_mmx
307       1.3399  sbcenc                   sbc_encode
2010-06-30 10:30:12 +03:00
Johan Hedberg
5592142cb9 Update Nokia copyrights 2010-01-07 01:11:05 -08:00
Marcel Holtmann
9184e2eeb7 Update copyright information 2010-01-01 17:08:17 -08:00
Marc-André Lureau
8e544e0dac sbc: provide implementation info as a readable string
This is mainly useful for logging and debugging.
2009-02-17 23:54:45 +02:00
Lennart Poettering
218de8c6ae make check_mmx_support() a proper C function
Signed-off-by: Lennart Poettering <lennart@poettering.net>
2009-02-01 17:39:06 -08:00
Siarhei Siamashka
19af3c49e6 Performance optimizations for input data processing in SBC encoder
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).
2009-01-28 06:42:10 +01:00
Johan Hedberg
1fb5ffff0b Fix indentation to use only tabs 2009-01-16 20:29:43 +02:00
Siarhei Siamashka
188d5f24a6 MMX and ARM NEON optimized versions of analysis filter for SBC encoder 2009-01-16 08:23:24 +01:00