Commit graph

385 commits

Author SHA1 Message Date
Jean-Marc Valin
a56c34f381 optimisations: faster handling of the zero for compute_band_energies() and
normalise_bands(). Also, another bunch of restrict qualifiers -- mainly
to tell the compiler there's no aliasing between the array bounds and the
data.
2008-03-26 14:36:07 +11:00
Jean-Marc Valin
25aeed74f1 changed 1*rcp(x) to just rcp(x) 2008-03-26 13:45:01 +11:00
Jean-Marc Valin
89c5fd161b optimisation: intra_prediction() no longer needs to divide inside the search 2008-03-26 12:16:00 +11:00
Jean-Marc Valin
35a1f88e81 optimisation: The "simple" Rxy/sqrt(Ryy) case in alg_quant no longer requires
a division
2008-03-26 10:34:23 +11:00
Jean-Marc Valin
bd2828f64b Decision on whether to use pitch is now taken only based on energy in the
first three bands (instead of total MDCT window energy)
2008-03-26 08:10:27 +11:00
Jean-Marc Valin
d9584dbafc properly defined EPSILON for the float case 2008-03-26 00:00:18 +11:00
Jean-Marc Valin
5de868c6d3 A bunch of pointers marked as "restrict" to ease the job of the compiler 2008-03-25 22:38:58 +11:00
Jean-Marc Valin
1bc8a2e4b1 optimisation: spreading_func now in-place with no branch in the loop and half
the multiplications
2008-03-25 22:09:32 +11:00
Jean-Marc Valin
ac72c2821a oops. find_max32() now uses VERY_LARGE32 (instead of VERY_LARGE16) 2008-03-25 21:31:12 +11:00
Jean-Marc Valin
44c63350d1 optimisations: Another bunch of simplifications to alg_quant(), mainly to
remove unnecessary copying and some conditional branches.
2008-03-25 21:28:40 +11:00
Jean-Marc Valin
059749355d optimisation: Making use of restrict in find_spectral_pitch() to disambiguate
X and Y.
2008-03-25 18:04:08 +11:00
Jean-Marc Valin
49134381d0 optimisations: caching sign of x in alg_quant(), changed celt_div()/celt_rcp()
to assume denominator is positive.
2008-03-25 16:07:05 +11:00
Jean-Marc Valin
208ae6e33d Optimised intra prediction a bit -- removed a conditional branch and replaced
some calls to ec_enc_uint() by calls to ec_enc_bits() (saves divisions)
2008-03-25 15:25:08 +11:00
Jean-Marc Valin
b886ddc08c Removed support for more than one MDCT blocks per frame. I don't think there's
a use for that anymore now that the overlap can be less than one frame.
2008-03-25 14:38:55 +11:00
Jean-Marc Valin
bd718ba577 Removed the "pitch compression" in the residual quantisation. Also, removed
the more complex "n-best search" and replaced it with a greedy search
2008-03-25 14:15:41 +11:00
Jean-Marc Valin
7cf79a7a5c Unrolled the inner loop in vq_index() so that the codebook unpacking doesn't
require a branch.
2008-03-24 21:39:49 +11:00
Jean-Marc Valin
0de9d8abec Making bits2pulses() use a fixed number of iterations to allow further
optimisations.
2008-03-24 17:06:08 +11:00
Jean-Marc Valin
a75e25dac5 include "dsplib.h" in fixed_c5x.h 2008-03-24 08:32:49 +11:00
Jean-Marc Valin
23e82b26dd replaced divisions by recoprocals in intra prediction and folding 2008-03-24 08:15:40 +11:00
Jean-Marc Valin
17ad401c2c defined find_max16 and overrode it for C55x 2008-03-23 08:06:29 +11:00
Jean-Marc Valin
c2decd39a6 Made a second version of ec_{en|de}code optimised for encoding bits (no div
required) and using it in ec_{en|de}c_bits()
2008-03-22 22:58:45 +11:00
Jean-Marc Valin
dc767f67f9 No longer trying to save bits when encoding integers near the upper limit
(and fix for celt_div with 16-bit numerator on a 16-bit CPU)
2008-03-22 22:23:58 +11:00
Jean-Marc Valin
2282383434 fixed-point: added cheap celt_div() division using a reciprocal 2008-03-22 21:17:45 +11:00
Jean-Marc Valin
ba238d8793 more use of restrict 2008-03-22 17:53:12 +11:00
Jean-Marc Valin
3203474732 Using restrict to make it clear there's no aliasing issues in the mdct. 2008-03-22 11:23:57 +11:00
Jean-Marc Valin
a536f77202 Added a few "restrict" keywords and changed some divisions to shifts 2008-03-22 09:01:50 +11:00
Jean-Marc Valin
3c2fe0fbee fixed TI fft code -- again 2008-03-21 22:54:41 +11:00
Jean-Marc Valin
32d8c10df9 Removed potentially unused var in MDCT init 2008-03-21 13:11:16 +11:00
Jean-Marc Valin
ac5dc40ae8 oops (TI FFT) 2008-03-21 13:02:53 +11:00
Jean-Marc Valin
c163fc6207 local var name maxval was shadowing the TI function used to compute it 2008-03-21 12:53:37 +11:00
Jean-Marc Valin
03de605ec8 make sure TRIG_UPSCALE is properly defined 2008-03-21 12:51:05 +11:00
Jean-Marc Valin
59f42b5dcc fix for TI version of celt_maxabs16() 2008-03-21 12:49:36 +11:00
Jean-Marc Valin
6e09f680f1 fixed-point: fix for 32-bit TI FFT 2008-03-21 12:47:41 +11:00
Jean-Marc Valin
70162a4f82 fixed-point: Wrapper for the 32-bit complex FFT used in the MDCT so we can use
the TI dsplib FFT.
2008-03-21 12:09:27 +11:00
Jean-Marc Valin
9901cb9e82 fixed-point: defined celt_maxabs16() as basic operator 2008-03-21 11:13:51 +11:00
Jean-Marc Valin
948dabc7da fixed-point: MULT16_32_Q15 for TI DSP (not entirely happy with it) 2008-03-21 10:53:09 +11:00
Jean-Marc Valin
f5b0587bd2 s/ROUND/ROUND16/ 2008-03-21 10:46:17 +11:00
Jean-Marc Valin
83006eec60 fixed-point: using TI intrinsic for celt_ilog2() if available. 2008-03-21 10:40:43 +11:00
Jean-Marc Valin
983f6387e0 Wrapper for the TI dsplib FFT 2008-03-20 23:17:18 +11:00
Jean-Marc Valin
fcb841aa0b Making the real/single FFT easier to replace 2008-03-20 22:23:54 +11:00
Jean-Marc Valin
b311554ccd fixed-point: more TI macros. Comments on the existing ones. 2008-03-16 23:33:02 +11:00
Jean-Marc Valin
c7e0b76c06 Making sure not to use the C library calls directly 2008-03-16 07:55:29 +11:00
Jean-Marc Valin
4ff068e670 Some work on assertions. 2008-03-15 23:34:39 +11:00
Jean-Marc Valin
bfcbd184b5 New C55 macro 2008-03-15 08:12:49 +11:00
Jean-Marc Valin
fb7359a61f fixed-point: Fixed a "shift too large" warning by using a 16-bit mul instead
of 32-bit in find_spectral_pitch()
2008-03-15 08:04:16 +11:00
Jean-Marc Valin
15b9be3a29 fixed-point: playing it safe. SHL32() now automatically casts input to 32-bit
to prevent surprises. Also, a few comments.
2008-03-14 17:58:33 +11:00
Jean-Marc Valin
0773fec4ad fixed-point: fixed a 16-bit issue in normalise_bands() where Q15ONE was directly
shifted left
2008-03-14 16:28:28 +11:00
Jean-Marc Valin
71a84590e7 Removed unnecessary header inclusions 2008-03-14 11:09:50 +11:00
Jean-Marc Valin
a82dfdd240 Adjusting/fixing warnings 2008-03-13 23:01:55 +11:00
Jean-Marc Valin
2b35de9164 fixed-point: Using reciproqual instead of DIV32_16 for find_spectral_pitch() 2008-03-13 17:55:03 +11:00