Commit graph

964 commits

Author SHA1 Message Date
Jean-Marc Valin
74128befe4 fixed-point: converted PLC filters and LPC parameters 2010-01-01 09:33:17 -05:00
Jean-Marc Valin
303b3b627e fixed-point: starting conversion of the new PLC 2009-12-30 22:40:24 -05:00
Jean-Marc Valin
07fed1bf76 Adding a safeguard against unstable LPC, so now there's no way (that I can
think of) to produce NaNs in the new PLC.
2009-12-28 07:59:42 -05:00
Jean-Marc Valin
d69c1cb37c Making new PLC code work in fixed-point even though it's still using float
arithmetic.
2009-12-28 00:34:29 -05:00
Jean-Marc Valin
aec0ee41ab C89 friendliness 2009-12-21 00:06:12 -05:00
Jean-Marc Valin
d5f99308c9 This fixes a bug in stereo PLC (offset wasn't changed between channels) 2009-12-16 22:42:32 -05:00
Jean-Marc Valin
5a0fae53c7 PLC: Added lag windowing and constraint to synthesis energy 2009-12-14 21:19:37 -05:00
Thorvald Natvig
b8002a0ef3 Varlength arrays fix for C89 2009-12-11 07:38:38 -05:00
Jean-Marc Valin
e14fe9046f New LPC-based PLC code 2009-12-11 00:07:31 -05:00
Jean-Marc Valin
1ccfd3cc03 Oops, forgot to free the pitch bufer 2009-12-02 21:07:11 -05:00
George de Vries
6fd0270621 Fixing (read) array overrun for 1024-sample frames. 2009-12-02 20:59:44 -05:00
Jean-Marc Valin
aebb6fd624 Some work on the pitch search weighting filter (still disabled) 2009-12-02 07:04:28 -05:00
Jean-Marc Valin
e465c1490a Reorganised the pitch code to simplify the PLC case and fixed a buffer overflow
introduced in Thorvald's previous patch.
2009-11-26 00:39:36 -05:00
Jean-Marc Valin
7a7c42a716 Fixing a few memory errors 2009-11-25 20:38:52 -05:00
Thorvald Natvig
065dafdc3e Use stack_alloc for pitch.c 2009-11-24 20:16:03 -05:00
Jean-Marc Valin
e05e7e23bb minor code cleanup 2009-11-21 23:41:26 -05:00
Jean-Marc Valin
6d584acd95 Renamed MDCT functions to avoid symbol clashes with Vorbis 2009-11-21 21:57:44 -05:00
Jean-Marc Valin
9319e3e6df Removing original freq-domain pitch code 2009-11-09 13:51:54 +09:00
Jean-Marc Valin
294863bbea Temporal pitch search 2009-11-08 22:36:51 +09:00
Jean-Marc Valin
5ed24f8155 celt_ilog2() is only used in fixed-point mode 2009-10-31 13:43:43 -04:00
Timothy Terriberry
8c7bb4c9c7 Expose the normalized range for reciprocal square roots in fixed-point mode. This allows subsequnt calculations to use the full precision of the result. 2009-10-31 13:35:40 -04:00
Jean-Marc Valin
630ee44aaa SMALL_FOOTPRINT preserves the special n=1 cwrs case 2009-10-24 14:29:15 -04:00
Jean-Marc Valin
c2f7dff55a Added a SMALL_FOOTPRINT option 2009-10-24 11:44:07 -04:00
Jean-Marc Valin
a3803a98af misc minor changes 2009-10-24 11:24:34 -04:00
Jean-Marc Valin
f81edea012 removing more unused code 2009-10-23 22:33:25 -04:00
Jean-Marc Valin
789fc14163 Removing unused code in the entropy coder 2009-10-23 21:44:54 -04:00
Jean-Marc Valin
954fb110b9 doxygen fix 2009-10-22 21:14:22 -04:00
Jean-Marc Valin
7a047ea096 prevent busting at ridiculously low bit-rate VBR 2009-10-22 00:23:56 -04:00
Jean-Marc Valin
45f1110583 Making sure the VBR controller never busts the number of bytes allowed 2009-10-22 00:13:44 -04:00
Jean-Marc Valin
25767d1ca7 Better computation of the VBR rate upper bound and reducing the coarse energy
budget at low bitrate.
2009-10-21 23:25:22 -04:00
Timothy B. Terriberry
a9ffc14ab7 Enhancements the fixed-point approximations of non-linear functions.
Accuracy for rsqrt, rcp, cos, and log2 is now at the level of truncation error
 for the current output resolution of these functions.
sqrt and exp2 still have non-trivial algebraic error, but this cannot be
 reduced much further using the current method without additional computation.
Also updates the fast float approximations for log2 and exp2 with coefficients
 that give slightly lower maximum relative error.

Patch modified by Jean-Marc Valin to leave the cos approximation as is and
leave the check for x<-15 in exp2 as is.
2009-10-21 20:30:46 -04:00
Jean-Marc Valin
ab4dcc5c90 Allow coarse energy to take almost all the bits. Also, fixed a some issues with
the VBR rate controller.
2009-10-21 07:08:27 -04:00
Jean-Marc Valin
73bf6332ed Making the multiplication in normalise_residual() produce a 32-bit result just
to be on the safe side (not that I observed any overflow, but I can't prove
it can't happen).
2009-10-20 07:22:04 -04:00
Timothy B. Terriberry
4a275d4d8f Accuracy improvements to the fixed-point celt_rsqrt(). 2009-10-20 07:14:24 -04:00
Jean-Marc Valin
a3bba38b49 This should prevent a rare divide-by-zero in the pitch gain code 2009-10-20 07:13:35 -04:00
Jean-Marc Valin
bd5d54adb8 New VBR rate controller that doesn't allow more than one frame worth of excess
bit-rate
2009-10-20 00:25:31 -04:00
Jean-Marc Valin
328b8bd7fc fixed a few trivial bugs: exporting celt_strerror(), changed DB_SCALING to a
shift and removed the chec for DISABLE_STEREO in the mode creation.
2009-10-19 19:07:38 -04:00
Jean-Marc Valin
234969c903 Removed the _t from all the celt*_t types to avoid clashing with POSIX 2009-10-17 22:12:42 -04:00
Jean-Marc Valin
8b2ff0da5a Updated copyright notices 2009-10-17 21:40:10 -04:00
Jean-Marc Valin
30f7f813ea Changed all the celt*int*_t types to remove the _t suffix, which is reserved
by POSIX. The other _t types that are not part of the API are still there
for now. Also, got rid of all that was left of the 64-bit types.
2009-10-17 14:35:13 -04:00
Jean-Marc Valin
d35d677543 Constrain the pitch gain to prevent potential instabilities. 2009-10-16 23:16:47 -04:00
Jean-Marc Valin
163b02eb8e Now using a unique ID for CELT_ALLOC_FAIL 2009-10-16 21:32:52 -04:00
Jean-Marc Valin
ece94a0475 Improved error handling, and implemented celt_strerror() 2009-10-16 07:31:28 -04:00
Jean-Marc Valin
80ed147663 The number of channels is now set when creating the states rather than when
creating the mode. This means that the same mode can be shared for mono and
stereo.
2009-10-15 21:45:32 -04:00
Jean-Marc Valin
bf2398b049 first step for removing the number of channels from the mode 2009-10-15 07:28:19 -04:00
Jean-Marc Valin
6a97802280 Adjusting the allocation for stereo directly in the alloc function rather than
in the table.
2009-10-13 20:35:21 -04:00
Jean-Marc Valin
a9947c480c merged the code for quant_bands() and unquant_bands() 2009-10-08 23:10:45 -04:00
Jean-Marc Valin
f7a1e165aa Renamed mix_pitch_and_residual() to normalise_residual(), after minor
simplification.
2009-10-07 06:56:03 -04:00
Jean-Marc Valin
f6dc1eba26 Further simplifications to mix_pitch_and_residual() (which no longer does
anything that its name implies)
2009-10-06 20:08:49 -04:00
Jean-Marc Valin
8861955d86 Doing the mdct shaping in the normalised domain, so that energy is preserved 2009-10-04 22:43:27 -04:00