Commit graph

80 commits

Author SHA1 Message Date
Jean-Marc Valin
c3086a98f4 Making CELT_GET_MODE "private" 2011-03-21 13:26:03 -04:00
Jean-Marc Valin
3806c1d738 Relicensing under the simplified (2-clause) BSD license
Got authorization from all copyright holders
2011-02-09 22:37:41 -05:00
Jean-Marc Valin
5aa57e4f07 Configure option for custom modes 2011-02-04 00:04:26 -05:00
Gregory Maxwell
95becbeec8 This fixes the frame_size check on the encoder and decoder and removes some unused variable warnings when compiling without custom modes. 2011-02-03 22:38:28 -05:00
Jean-Marc Valin
3a8f04db17 Enabling the post-filter and exporting the ec functions for Opus 2011-02-02 23:02:25 -05:00
Jean-Marc Valin
665da0ba4d Merge branch 'exp_api_change' 2011-01-30 13:39:56 -05:00
Timothy B. Terriberry
c564307463 Use a smarter per-band bitrate cap.
The previous "dumb cap" of (64<<LM)*(C<<BITRES) was not actually
 achievable by many (most) bands, and did not take the cost of
 coding theta for splits into account, and so was too small for some
 bands.
This patch adds code to compute a fairly accurate estimate of the
 real maximum per-band rate (an estimate only because of rounding
 effects and the fact that the bit usage for theta is variable),
 which is then truncated and stored in an 8-bit table in the mode.

This gives improved quality at all rates over 160 kbps/channel,
 prevents bits from being wasted all the way up to 255 kbps/channel
 (the maximum rate allowed, and approximately the maximum number of
 bits that can usefully be used regardless of the allocation), and
 prevents dynalloc and trim from producing enormous waste
 (eliminating the need for encoder logic to prevent this).
2011-01-30 11:42:38 -05:00
Jean-Marc Valin
d9e4b1d72c Adding the auto-generated static modes for float and fixed 2011-01-28 22:24:40 -05:00
Jean-Marc Valin
88bab52abc Bump bit-stream version 2010-12-20 16:58:29 -05:00
Timothy B. Terriberry
ef2e650592 Add coarse energy entropy model tuning.
This tunes the entropy model for coarse energy introduced in commit
 c1c40a76.
It uses a constant set of parameters, tuned from about an hour and a
 half of randomly selected test data encoded for each frame size,
 prediction type (inter/intra), and band number.
These will be slightly sub-optimal for different frame sizes, but
 should be better than what we were using.

For inter, this saves an average of 2.8, 5.2, 7.1, and 6.7 bits/frame
 for frame sizes of 120, 240, 480, and 960, respectively.
For intra, this saves an average of 1.5, 3.0, 4.5, and 5.3 bits/frame
 (for the same frame sizes, respectively).
2010-11-09 17:54:41 +08:00
Jean-Marc Valin
35095c6991 Squashed commit of the following:
commit a2cc77cb2744a2cb0551b9bfdf06b97457b6d449
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Thu Nov 4 13:11:21 2010 -0400

    Adding a switch to enable the post-filter (off by default)

commit 8e860dc0dfbe57e59fcbd5352588c5edff020e27
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Thu Nov 4 11:57:12 2010 -0400

    Allowing pitches up to 3000 Hz

commit 837412d37bbca32bb34bfb5941e132ff4b0a568c
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Wed Nov 3 20:47:11 2010 -0400

    Pitch estimation tuning to prevent some cases of pitch halving

commit 34e20f24c85b40fffd1a15c5b632f2f78b26f081
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Nov 3 16:31:51 2010 -0400

    Resynthesis now purely a compile-time option with RESYNTH

commit d83fb5a9cc2ec4b6cce938662997643da1c5ed0d
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Nov 3 16:28:25 2010 -0400

    Fixes a divide by zero in remove_doubling()

commit bb91e05b7f8f91fd15a8a0daae3d8cb6bd8d81db
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Nov 3 15:55:48 2010 -0400

    Bring back resynthesis with RESYNTH macro

commit 31fe6f6b4997af0a46b8c62f523fe2dfdb7f56ae
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Tue Nov 2 17:55:04 2010 -0400

    Tuning the allocation tilt to give more bits to higher frequencies.

    Especially useful now that the post-filter can reduce low freq noise.

commit 919ba48f0369a87885334756cdfac2a448ce52d0
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 17:27:19 2010 -0400

    C89 fix

commit ee0dbb1855a82ee8c132ddaffcab4d072bb3455e
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 11:45:10 2010 -0400

    Complete fixed-point port of the pitch code (I think).

commit 4c7b3fd12a8f7469607b5ac57c85301a5de9fa81
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 10:55:43 2010 -0400

    More fixed-point pitch gain work

commit 26f1412188900199b63e187fcb0bd04db53c898a
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 10:39:25 2010 -0400

    Fixed-point version of the pitch gain calculation code

commit 27c73d008e9f50d282c3ad08e2f05f7006013ae1
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Oct 31 16:50:26 2010 -0400

    Some more fixed-point work in remove_doubling()

commit 59354672cb3af794a0e46c0b2097d6441c75cdd1
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Oct 31 09:57:36 2010 -0400

    Fixed a stupid fixed-point pf bug in the gain handling

commit be9e7dabf6c8b32bc049da260b58ff6085dc1ac3
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sat Oct 30 01:52:09 2010 -0400

    Fixed-point: fixed frac_div32() that was broken a few commits ago.

commit 5b06270afc41a88915252cea14411be43650e704
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 17:45:44 2010 -0400

    This fixes VBR when encoding the pitch period with raw bits

commit 10e0488458ae558aa80d0b30cce70841ad081f73
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 16:50:31 2010 -0400

    Pitch period is now encoder with equal probability for each octave (rather than each lag).

    Max pitch gain allowed is now 0.625.

commit ca19396c1c1511c0e208b400efb51384fc7c200d
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 16:00:01 2010 -0400

    More fixed-point post-filter work

commit f3e42fde1b575bc587b2557b8b31a6085421a99c
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 14:39:23 2010 -0400

    More fixed-point work for the prefilter/postfilter

commit db945132d12b25ff25acc0701b91a1d8a81417d5
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 14:14:02 2010 -0400

    Making the pitch estimation work in fixed-point

    Even if there's still lots of float operations left.

commit acb3f96e04802ac4601295f83bef1f32593e261a
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 10:57:39 2010 -0400

    Making the PLC code consistent with the prefilter/postfilter

commit 8f64f5974ac846b8c35d0b692e0472f279206cf0
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Thu Oct 28 00:33:53 2010 -0400

    More tuning for remove_doubling()

commit 0c08f2ee9dcc135dd222fef30f5ad93e95e0d364
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 17:48:02 2010 -0400

    Doing an interpolation step to improve the accuracy of the pitch estimate

    Also increasing the gain slightly.

commit 23d303e992f1fdc3d2668652603ae6311d3b91c5
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 16:56:42 2010 -0400

    Implements a fixed 3-tap prefilter/postfilter to make the gain roll off with frequency

commit 881c5928adc1af9eb75c4b68e9eba94ab1d65adc
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 14:47:30 2010 -0400

    Partially whitening the down-sampled signal before the pitch search

commit 4a8687deea8587007f14051cb966f6fd748893a1
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 14:27:47 2010 -0400

    pitch_search() no longer computes the gain

commit a7f85bb6b10d9c509caec521ca444efb3f27df05
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 14:00:53 2010 -0400

    remove_doubling() now works on the down-sampled signal

commit 06cb70e876873f79fed214ebbca35cb4c5057ec8
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 11:28:53 2010 -0400

    Simplification to the pitch continuity code

commit 5201927c284a424eb8f21f63d358844b3de8c285
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 11:04:02 2010 -0400

    Some more pitch doubling prevention code

commit 7ef63fbe1f78f79e1923bc42e06fbdf1ec28ffd3
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Wed Oct 27 06:49:28 2010 -0400

    Minor fix

commit eb37eaab32e7df074a7ddf0ae4781e57f827c4ad
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Tue Oct 26 18:32:25 2010 -0400

    Enforcing some pitch continuity

commit 751ef6edf2ee7721252cedb264bdf9b3f6244a9d
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Tue Oct 26 17:29:47 2010 -0400

    Code for preventing pitch doubling/halving

commit c12647ecb55b645005efbeede91880db72936f8d
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Tue Oct 26 00:04:34 2010 -0400

    Finally getting perfect reconstruction when pitch changes

    Post-filter now delays the filter coefs by the overlap so that the pre-filter
    and post-filter are synchronised.

commit f854311d945bb375039a4a4a4fea782b648581f8
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Oct 25 14:59:13 2010 -0400

    Very simple/inefficient signalling of the prefilter period/gain

commit b4e1215432e3d89a29c998639a6d8b07e28c5a2a
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Oct 25 14:09:17 2010 -0400

    using the actual pitch gain

commit e7cd4f07bb073b6955a001e56c0bbf16156f4195
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Oct 25 12:16:11 2010 -0400

    Adding some pitch prediction though side information still isn't coded

commit 77a03aa27c9b6ed2fe80c27a1196b460ccb5079e
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Mon Oct 25 00:12:48 2010 -0400

    prefilter implemented as well

commit a3fd81b6ca213d4a9f8ddfa2883fd0e238d64d04
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Oct 24 01:14:10 2010 -0400

    Implementing Raymond Chen's comb filter idea

    So far, only the post-filter is there.
2010-11-04 13:24:44 -04:00
Jean-Marc Valin
f9fdbffb72 Don't allow transients for 2.5 ms frames.
It never made sense anyway.
2010-09-05 21:02:38 -04:00
Jean-Marc Valin
f9950e0624 Remove model markers 2010-08-27 16:15:20 -04:00
Jean-Marc Valin
bce1dd0d75 Remove check_mode() 2010-08-27 16:10:39 -04:00
Jean-Marc Valin
bb5288174d coarse probability model in static modes too 2010-08-25 22:12:18 -04:00
Jean-Marc Valin
732ea38810 Updated static modes for new pulse cache.
Fixed a few minor bugs in the process.
2010-08-25 13:52:27 -04:00
Jean-Marc Valin
3ad8db49c5 New pulse cache 2010-08-25 13:11:09 -04:00
Jean-Marc Valin
8cbea177ba Removing pitch prediction code 2010-08-05 15:28:27 -04:00
Jean-Marc Valin
ca6533cd88 Energy quantization tuning.
Prediction coefficient now depends on the frame size. Also, the pdfs and means
have been adjusted and better quantized. This breaks compatibility of course.
2010-07-23 16:10:36 -04:00
Jean-Marc Valin
85f41b20df Some work towards being able to encode a 48 kHz stream from 32 kHz audio (incomplete) 2010-07-16 18:12:45 -04:00
Jean-Marc Valin
af1fce93b1 Pre-emphasis coefficients now part of the mode and has a numerator as well
as a denominator
2010-07-16 11:05:06 -04:00
Jean-Marc Valin
72513f3cc7 Sharing twiddle factors across all MDCTs 2010-07-07 21:26:38 -04:00
Jean-Marc Valin
b6a5f9d38f fixed point bug fix in tf_analysis() 2010-07-06 17:57:14 -04:00
Jean-Marc Valin
961f723ab7 Prototypes for the _ec variants of the calls 2010-07-01 10:14:20 -04:00
Jean-Marc Valin
60ff999118 Mode cleanup (removed redundant mdctSize field) 2010-06-27 13:49:38 -04:00
Jean-Marc Valin
01b54b9964 Completely removed the old allocation table.
Also made the new table an unsigned char array.
2010-06-03 23:29:35 -04:00
Jean-Marc Valin
cae30df09a Getting rid of PVQ-level split
Adding one more level of band splitting so that splitting at the
PVQ encoding level is no longer necessary.
2010-05-21 00:26:03 -04:00
Jean-Marc Valin
017fa85775 Changing the encoder API to add the frame size 2010-05-07 21:20:22 -04:00
Jean-Marc Valin
073d0bc925 Yet another step towards variable frame size 2010-05-07 21:20:22 -04:00
Jean-Marc Valin
5f633543c7 shortWindow hadn't been used for a while 2010-05-07 21:20:21 -04:00
Jean-Marc Valin
281a63eae8 Bump bitstream version now that we broke everything 2010-04-20 10:43:51 -04:00
Jean-Marc Valin
f400a3c573 Caching log2_frac(N, BITRES) in the more data to save some CPU 2010-04-06 20:33:50 -04:00
Jean-Marc Valin
6c79a9325c Getting "make dist" to work again with the files that got removed 2010-01-16 23:35:45 -05:00
Jean-Marc Valin
9319e3e6df Removing original freq-domain pitch code 2009-11-09 13:51:54 +09: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
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
4213a7254c Demoved the divisions from the inner pitch prediction loops, bumped the version
and bit-stream version
2009-10-01 19:42:18 -04:00
Jean-Marc Valin
4834c92e2b More simplifications from denorm pitch 2009-09-28 19:17:34 -04:00
Jean-Marc Valin
798ab38b27 Using normalised M/S stereo data for folding and use separate folding gains
for M and S.
2009-07-12 20:41:29 -04:00
Jean-Marc Valin
6ca7f10ee3 Bump version to 0.6.0 and increase bitstream version. 2009-06-23 21:23:18 -04:00
Jean-Marc Valin
d27e6e34a5 Cleanup: getting rid of some old bits of stereo code that are no longer useful 2009-03-29 22:29:52 -04:00
Jean-Marc Valin
28f0f65325 Preparing for version 0.5.2 2009-02-16 07:35:19 -05:00
Jean-Marc Valin
763abd0475 Bump version to 0.5.1 2008-12-17 20:00:35 -05:00
Jean-Marc Valin
5ac6d42e81 Preparing for 0.5.0 2008-10-09 07:29:39 -04:00
Jean-Marc Valin
400d76e5e2 bump bit-stream version 2008-07-26 09:15:26 -04:00
Jean-Marc Valin
16ca18b9b0 Automatically choosing the overlap based on the frame size. 2008-06-18 23:44:48 +10:00