Commit Graph

51 Commits

Author SHA1 Message Date
Brad Midgley
d352bd0438 avoid an (unlikely) overflow 2008-01-27 04:29:08 +00:00
Brad Midgley
c2ce7c2d41 get 32-bit products whenever we're sure the multiplicands are both 16 bits 2008-01-27 03:35:53 +00:00
Brad Midgley
c9b5101059 shorten the encoder tables to 16 bits, take out mula32/mul32 for now for simplicity 2008-01-26 19:45:54 +00:00
Brad Midgley
dae52eacba pcm input array should be 16 not 32 bits
use 32-bit product when multiplying two values limited to 16 bits each
2008-01-26 05:24:50 +00:00
Brad Midgley
66fe637352 update copyrights 2008-01-19 15:56:52 +00:00
Brad Midgley
910d620357 coding style 2008-01-14 22:15:17 +00:00
Brad Midgley
8c72b28a0c comment typo 2008-01-14 20:03:42 +00:00
Brad Midgley
23f3e84ba4 fix initialization 2008-01-14 15:03:23 +00:00
Brad Midgley
d4d085c9a0 take out memmove in sbc analyze 2008-01-14 14:40:57 +00:00
Brad Midgley
0dda8d7230 tweak to the memmove for 4 subbands 2008-01-11 20:28:18 +00:00
Brad Midgley
40d383bb1e optimizations: use memmove instead of a loop, unroll short loop 2008-01-08 20:56:17 +00:00
Brad Midgley
1da4920f71 smooth out last shift-in-place wrinkle 2007-12-14 06:54:19 +00:00
Brad Midgley
9a14d423e7 push in-place-shift optimization up into scalefactors section 2007-12-14 06:43:06 +00:00
Brad Midgley
c1ce3b25c4 shift-in-place opt is back in, with a bugfix for the 4-subband case 2007-12-14 06:07:52 +00:00
Brad Midgley
5acc7043cf coding style on ?: 2007-12-14 00:46:09 +00:00
Brad Midgley
356a8b48cd be more strict about calculating from joint since client may set it to
a funky value other than 0/1
2007-12-14 00:15:33 +00:00
Brad Midgley
c5e43eefcc roll back the shift-in-place bitpack optimization while we figure out if
it tickles a bug or creates a bug for 4 subbands
2007-12-14 00:13:07 +00:00
Brad Midgley
2e6b3caf16 don't need to memset the data header 2007-12-13 17:16:20 +00:00
Brad Midgley
87f83cd605 combine two conditionals in bit packing 2007-11-30 15:53:04 +00:00
Brad Midgley
76e595a98b change inner loop bit packing to use shift-in-place instead of complex ops 2007-11-30 01:20:01 +00:00
Brad Midgley
4161e8201e don't use the audio_sample array inside the frame struct
it's totally unnecessary to keep all these temporary results around
2007-11-29 21:48:12 +00:00
Luiz Augusto von Dentz
56dc26cadc Remove unnecessary checks for output buffer length and some optimizations. 2007-11-29 20:23:22 +00:00
Brad Midgley
41c4587774 eliminate another max_bitneed loop, eliminate extraneous loop termination tests 2007-11-27 06:47:38 +00:00
Brad Midgley
4a2b8a2e67 eliminate extra loop for bitneed compute
make a couple while loops easier to read as for loops
2007-11-27 06:22:48 +00:00
Brad Midgley
6a2bcc32bf combine the blk loops inside the joint conditional 2007-11-27 03:15:36 +00:00
Brad Midgley
75d93a3225 rework joint subband test--uses a lot less stack space, simplify multiple
loops into one, unroll one tiny loop
2007-11-27 02:42:29 +00:00
Luiz Augusto von Dentz
8db224b3ca Introduce sbc_get_frame_duration. 2007-11-23 14:24:23 +00:00
Luiz Augusto von Dentz
54e6e9fcea Change name of sbc_fill_defaults to sbc_set_defaults. 2007-11-13 20:59:17 +00:00
Luiz Augusto von Dentz
6d94a5b2e3 Add sbc_reinit. 2007-11-13 20:04:12 +00:00
Luiz Augusto von Dentz
397d6c2b3b Make sbc codec to write directly in application buffers and so avoiding memcpys. 2007-11-12 18:15:59 +00:00
Brad Midgley
316166212f correction in the 4 subband optimization 2007-11-05 15:54:50 +00:00
Johan Hedberg
ec233a1f84 More coding style cleanup 2007-11-02 09:05:57 +00:00
Johan Hedberg
9138f99acb Coding style cleanup 2007-11-01 15:27:38 +00:00
Brad Midgley
f06a303b02 8-subband encoder had a sign error that made high frequencies noisy 2007-10-17 07:36:25 +00:00
Brad Midgley
8fab528b86 a little more factoring 2007-10-06 00:34:35 +00:00
Brad Midgley
3820937249 clean out dead code 2007-10-06 00:01:51 +00:00
Brad Midgley
99b92496ac fix MUL* macros with ()
factor more multiplies in 4-subband encoder
2007-10-05 05:42:55 +00:00
Brad Midgley
7fbcefdd87 enable 4 subband lower half optimizations 2007-10-04 18:28:17 +00:00
Brad Midgley
4cbaa35cb3 fix & enable 8-subband second half optimization 2007-10-04 16:05:40 +00:00
Brad Midgley
aaad5f279f off-by-one problem in 8 subband optimization 2007-10-04 08:08:59 +00:00
Brad Midgley
6ee3949547 a (disabled for now) cpu optimization for the bottom half of the 8 subbands encoder. seems to work fine. 2007-10-04 07:42:57 +00:00
Brad Midgley
c434c0b495 optimizations for 2nd stage of 4-subband encoder
disabled but in place so indt folks don't duplicate the optimization effort
2007-10-04 05:15:07 +00:00
Marcel Holtmann
d9bccae488 Add simple implementation of sbc_parse() 2007-08-26 13:54:24 +00:00
Brad Midgley
c82412ad9e indicate 0 bytes consumed in encoder if input is too short.
caller is responsible for filling the end of the input if it really wants the frame encoded (ie with silence
at the end)
2007-08-26 01:05:25 +00:00
Marcel Holtmann
5689ce1423 Update copyright information 2007-08-25 13:23:51 +00:00
Luiz Augusto von Dentz
b1618922db Add swap member to sbc struct and fix pcm plugin to not swap the buffer. 2007-08-21 21:32:09 +00:00
Johan Hedberg
46e860574f Don't hardcode allocation method to SNR 2007-08-11 10:56:46 +00:00
Brad Midgley
a745805cb3 whitespace fixes 2007-03-24 14:01:31 +00:00
Brad Midgley
ad868bd413 update the sbc encoder from the working fixed-point code in the sbc project
I also tagged the sbc project with "copied-to-bluez-utils" at the same time.
We will do sbc work under bluez and sync it with the old sbc project if necessary.
2007-03-17 13:37:31 +00:00
Marcel Holtmann
ec31984c45 Add SBC helper includes 2007-02-21 14:23:25 +00:00