Commit graph

20 commits

Author SHA1 Message Date
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
Timothy B. Terriberry
c1c40a76c2 Rework coarse energy coding.
This changes how the PDF used to code coarse energy.
New features:
1) The probability of 0 (p0) is now indepedent of the decay rate
 of the remaining values; this additional flexibility will allow
 us to model the actual distribution better, though that
 improvement is not part of this patch.
2) There is a guaranteed minimum number of encodable energy
    deltas.
   This ensures that even the most extreme sudden volume changes
    can be accurately represented.
3) The tail end of the distribution has an adjustable (through a
    constant in the code) minimum probability.
   This allows us to lower the worst-case bit cost of a single
    delta.
4) The codebook is interleaved as 0, -1, +1, -2, +2, ... instead
    of the 0, +1, -1, +2, -2, ... order used before (see 5).
5) There is no restriction that p0 be even.
   Any remaining, unused part of the code is assigned to an
    additional negative value (collected inter data suggests that
    very large negative deltas are more common than very large
    positive ones).
   If the minimum probability is greater than 1, then an
    additional positive delta with a smaller probablity may also
    be added.
6) Once the tail of the distribution is reached, the energy delta
    is computed directly, instead of continuing to loop through
    the codebook.
   This reduces the worst-case computational cost.
2010-08-11 20:38:45 -04:00
Jean-Marc Valin
c2f7dff55a Added a SMALL_FOOTPRINT option 2009-10-24 11:44:07 -04:00
Jean-Marc Valin
8b2ff0da5a Updated copyright notices 2009-10-17 21:40:10 -04:00
Jean-Marc Valin
949a29bf0c Raw bits encoding/decoding functions renamed to *_raw() and re-introducing
original ec_encode_bin()/ec_decode_bin() to optimize performance when ft is
a power of two.
2009-07-25 20:16:01 -04:00
Jean-Marc Valin
ece2cfa2d2 removed useless comments 2009-07-04 22:46:38 -04:00
Jean-Marc Valin
331130e0b3 Slightly increasing the range of value by making sure the "start fs" is even
(rounding towards zero).
2009-05-23 21:53:57 -04:00
Jean-Marc Valin
be60725639 Making use of previously unused range of the laplace encoder to have a slightly
wider range of values.
2009-05-23 14:17:02 -04:00
Jean-Marc Valin
ce02e1b49d Setting ft=32768 instead of 32767 so that implementations can use shifts and
thus save a few divisions.
2009-05-23 10:29:55 -04:00
Jean-Marc Valin
4c6ee567ee Preventing encoder-decoder mismatch when energy values are too large to be
represented by the laplace encoder (would have a probability of zero due
to finite precision)
2008-05-27 22:17:13 +10:00
Jean-Marc Valin
4ce9205f38 Optimisation: caching the divisions used in the Laplace encoder. 2008-04-23 13:42:10 +10:00
Jean-Marc Valin
4c2787a45c Laplace encoder now works with 16-bit frequencies 2008-03-03 10:04:48 +11:00
Jean-Marc Valin
7cdc5a34a4 Making it easier to debug laplace testcase 2008-03-01 20:56:17 +11:00
Jean-Marc Valin
86cb7e8600 oops. Another 16-bit fix 2008-03-01 08:45:55 +11:00
Jean-Marc Valin
9e006b6dc0 16-bit fix 2008-03-01 08:33:51 +11:00
Jean-Marc Valin
508de38d22 Trying to be nice with 16-bit chips. 2008-02-26 10:28:20 +11:00
Jean-Marc Valin
9caa3346c4 Testcase for laplace encoder 2008-02-20 15:00:26 +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
6238bc0ece Moved the content of libentcode into libcelt to reduce dependencies,
especially now that we have a custom version of that code anyway. Moved
the test code to tests/
2008-01-28 22:28:54 +11:00
Renamed from libentcode/laplace.c (Browse further)