Jean-Marc Valin
cefc5ca26d
Revert "compute_band_energies() merged with normalised_bands()"
...
This reverts commit a1bc18a388
.
I think it's easier for now to deal with two functions here, even though they
could be merged.
2008-03-07 14:53:17 +11:00
Jean-Marc Valin
f93747c44a
fixed-point: changed find_spectral_pitch() to use single-precision (16-bit) FFT.
...
This involved adding kfft_single.[ch] that redefines kiss_fft a second time
with a different prefix. All this is still a bit of a mess now. The mask
had to be converted to 16-bit input, but we're still using floats to apply it.
2008-03-05 17:20:30 +11:00
Jean-Marc Valin
d9de593104
Fixed a bunch of warnings
2008-03-05 08:11:57 +11:00
Jean-Marc Valin
a1bc18a388
compute_band_energies() merged with normalised_bands()
2008-03-04 22:52:52 +11:00
Jean-Marc Valin
069c3de65f
Removed deprecated mode interface and added missing include
2008-03-04 20:38:00 +11:00
Jean-Marc Valin
0758689246
pre-emphasis coef now a constant
2008-03-03 17:19:17 +11:00
Jean-Marc Valin
ddb181b75e
A bit more reordering in stack memory allocation -- saved 1024 bytes on peak use
2008-03-03 14:53:47 +11:00
Jean-Marc Valin
137ec8e9b8
applying the pitch windowing directly in find_spectral_pitch()
2008-03-03 14:44:42 +11:00
Jean-Marc Valin
05080b4b9b
No longer storing the zero parts of the in[] array in the encoder
2008-03-03 14:23:51 +11:00
Jean-Marc Valin
632f218b4b
Pitch predictor now uses a larger range of offset by not being limited to the
...
window size when parts of the window are zero.
2008-03-03 14:08:21 +11:00
Jean-Marc Valin
0141723d30
compute_mdcts() no longer reads the part of the input that should be zeros
...
anyway (check-point for pitch improvements to follow)
2008-03-03 13:59:55 +11:00
Jean-Marc Valin
3e08a88389
Only the (rising) overlap part of the window is stored now. No need to hold the
...
zeros and ones (nor even the second half).
2008-03-03 13:49:20 +11:00
Jean-Marc Valin
f28062fe6a
Don't bother multiplying when the window's value is one or zero
2008-03-03 13:42:23 +11:00
Jean-Marc Valin
a556694e12
Stereo pitch search no longer requires twice the memory/complexity.
2008-03-01 20:14:20 +11:00
Jean-Marc Valin
d748cd5570
Another C90-fying pass. Fixed some warnings in the process.
2008-03-01 07:27:03 +11:00
Jean-Marc Valin
81b38c2295
Moved mdct state and window to the mode so it can be shared between multiple
...
encoders and decoders.
2008-02-29 21:08:49 +11:00
Jean-Marc Valin
8d4ac155e6
Saved on stack usage by changing the order of the allocation
2008-02-29 17:24:02 +11:00
Jean-Marc Valin
8600f69f79
Initial support for a managed stack/scratchpad. Still needs some work.
2008-02-29 15:14:12 +11:00
Jean-Marc Valin
5e171490a9
Removed some unused parameters and fixed a couple -W warnings
2008-02-28 00:07:23 +11:00
Jean-Marc Valin
3f382caeb4
Fixing pi again before another massive public outcry
2008-02-27 14:07:45 +11:00
Jean-Marc Valin
e40a19cbe9
fixed-point: no float vars left (and nearly no float ops left) in celt.c
2008-02-27 12:09:50 +11:00
Jean-Marc Valin
5d56183404
fixed-point: log-energy for previous frame now a 16-bit value. This currently
...
intruduces a bit of an encoder-decoder mismatch (Q8 in dB), but it'll be
reduced when the interals of quant_energy_mono() are properly converted to
fixed-point and oldEBands gets rounded instead of truncated.
2008-02-27 11:59:05 +11:00
Jean-Marc Valin
1d6ad108fb
fixed-point: converted window to 16-bit value
2008-02-27 11:25:25 +11:00
Jean-Marc Valin
42074389bd
fixed-point: pre/de-emphasis converted.
2008-02-27 11:08:53 +11:00
Jean-Marc Valin
8835a4df25
Removed useless masking curve for current frame and ignored Fs argument to
...
masking computation functions.
2008-02-26 16:35:19 +11:00
Jean-Marc Valin
017d4455da
pitch gain is now celt_pgain_t
2008-02-26 16:19:03 +11:00
Jean-Marc Valin
e901fe35b8
fixed-point: added a celt_ener_t type for band energy.
2008-02-26 14:46:26 +11:00
Jean-Marc Valin
5c032a4cb4
fixed-point: celt_sig_t now a 32-bit value.
2008-02-25 14:55:09 +11:00
Jean-Marc Valin
49ca99efa5
fixed-point: initial support for using the fixed-point MDCT (rest is still all
...
float)
2008-02-25 14:12:10 +11:00
Jean-Marc Valin
2c1d2f5bcc
MDCT now scales down by N/2 instead of N/4. The factor two is moved to the
...
overlap-add during synthesis.
2008-02-22 21:54:11 +11:00
Jean-Marc Valin
18ddc02afd
Separating types for normalised vs. denormalised data paths
2008-02-22 14:24:50 +11:00
Jean-Marc Valin
44ffd5a8da
Making sure freed or corrupted modes can't be used (produce a run-time warning).
2008-02-22 00:39:25 +11:00
Jean-Marc Valin
d501f6143c
Doing intra-frame prediction backwards (and a few comments)
2008-02-21 12:16:57 +11:00
Jean-Marc Valin
e6b7465087
Some sampling rate cleanup (now in the mode)
2008-02-20 18:01:08 +11:00
Jean-Marc Valin
276de7211d
Mode doc
2008-02-20 17:45:51 +11:00
Jean-Marc Valin
8c19b030df
Changed _new() to _create() in the API. Added some documentation
...
on how to use the API.
2008-02-20 15:53:15 +11:00
Jean-Marc Valin
0bb05bc5ea
Another bunch of C99 array conversions (few more to go)
2008-02-20 13:43:40 +11:00
Jean-Marc Valin
02fa913c32
More C89 fixes, making sure to include config.h from all source files.
2008-02-20 12:09:29 +11:00
Jean-Marc Valin
a85657bd29
removed // comments and added stack_alloc.h (not used everywhere yet)
...
to make the code more C89-friendly.
2008-02-20 11:59:30 +11:00
Jean-Marc Valin
25358cd407
Merged the rate allocation atruct directly into the mode struct.
2008-02-19 12:21:32 +11:00
Jean-Marc Valin
ccea9ce917
Two-pass algorithm for filling the remaining bits. Still not perfect, but close
...
enough.
2008-02-18 22:03:18 +11:00
Jean-Marc Valin
c9cc6d3e34
Introducing a (very) crude budget for the energy encoder.
2008-02-13 11:37:41 +11:00
Jean-Marc Valin
cc4d3dda74
Fixed stereo regression introduced in 05686a5d6e
...
also another stereo bug fixed for static-array ncwrs64().
2008-02-13 00:08:29 +11:00
Jean-Marc Valin
636f5c86ab
bit of cleaning up
2008-02-12 17:40:27 +11:00
Jean-Marc Valin
05686a5d6e
As extra safety, make sure not to use pitch prediction when it would make
...
the "effective gain" too high (>10 dB).
2008-02-11 17:54:28 +11:00
Jean-Marc Valin
7e8a487ed2
No longer encoding the pitch index if the gain is zero anyway.
2008-02-11 16:55:34 +11:00
Jean-Marc Valin
cb7a2a3d52
Re-ordered the parameters in the stream: [energy, pitch index, pitch gains]
...
Also fixed a bug that was exposed by the change (and removed some warnings)
2008-02-11 16:44:48 +11:00
Jean-Marc Valin
6c1f604944
Oops. Fixed spreading function for stereo
2008-02-11 16:17:42 +11:00
Jean-Marc Valin
8f0f4b9421
Limiting intra-frame prediction codebook to 32 entries (plus sign)
2008-02-11 13:52:44 +11:00
Jean-Marc Valin
5b50f4bf81
Decays corresponding to the psychoacoustic spreading function are now
...
pre-computed (instead of computing tons of pow() uselessly all the time)
2008-02-11 11:50:20 +11:00