Jean-Marc Valin
d77d6a58fc
Renamed celt_[u]int* to opus_[u]int*
2011-07-29 17:33:06 -04:00
Timothy B. Terriberry
9bac8c17d5
Eliminate the ec_int32 and ec_uint32 typedefs.
...
These were used because the entropy coder originally came from
outside libcelt, and thus did not have a common type system.
It's now undergone enough modification that it's not ever likely to
be used as-is in another codec without some porting effort, so
there's no real reason to maintain the typedefs separately.
Hopefully we'll replace these all again somedate with a common set
of Opus typedefs, but for now this will do.
This fixes an issue caused by commit 6c8acbf1
, which moved the
ec_ilog() prototype from entcode.h to ecintrin.h, where the
ec_uint32 typedef was not yet available.
Thanks to John Ridges for the report.
2011-03-02 21:14:19 -05: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
5ad35bf3bf
Enabling the standard static mode by default
2011-01-28 22:42:09 -05:00
Jean-Marc Valin
3fc0aada01
FFT cleanup
2010-08-25 17:15:05 -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
Timothy B. Terriberry
68242ac58c
Eliminate the loop when decoding the split angle.
...
Use a closed-form formula for the search instead.
This requires an integer sqrt, so it is not actually closed-form,
but the number of iterations is O(qb) instead of O(2**qb).
2010-07-28 00:20:16 +02:00
Jean-Marc Valin
2fcb239736
Removing the rest of the >32-bit PVQ code
2010-05-24 09:05:36 -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
811f21ab76
Fix for very short frame size (M=1)
2010-05-07 21:20:22 -04:00
Jean-Marc Valin
9319e3e6df
Removing original freq-domain pitch code
2009-11-09 13:51:54 +09: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
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
Timothy B. Terriberry
6391fe8229
Minor optimisation -- using do-while() instead of for() in isqrt32()
2009-05-26 23:15:05 -04:00
Gregory Maxwell
8eadcdc611
Switch the N=5 case of CWRS to also use a binary search.
...
This avoids the need for 64-bit addition and is faster on x86_64.
It may be slower on some platforms so the direct solution is still
available in the source.
2009-05-26 19:17:48 -04:00
Timothy B. Terriberry
d98d8ae087
CWRS clean-ups and optimizations.
...
Adds specialized O(N*log(K)) versions of cwrsi() and O(N) versions of icwrs()
for N={3,4,5}, which allows them to operate all the way up to the theoretical
pulse limit without serious performance degredation.
Also substantially reduces the computation time and stack usage of
get_required_bits().
On x86-64, this gives a 2% speed-up for 256 sample frames, and almost a 16%
speed-up for 64 sample frames.
2009-05-26 19:07:41 -04:00
Jean-Marc Valin
381d05aa0b
Make it possible to use more than 255 pulses (not used yet).
2009-05-19 10:12:34 -04:00
Timothy B. Terriberry
747378a43b
Fix (unexploitable) buffer overrun when _m=1 during the cwrs table init, as
...
reported by Bjoern Rasmussen.
2009-04-11 22:21:06 -04:00
Gregory Maxwell
122c98920f
Minor enhancements to celtenc to avoid silently capping bitrate and allow an
...
adjustable frame size. Indentation fix in cwrs.c.
2009-02-03 18:22:50 -05:00
Timothy B. Terriberry
2036c57b8a
Ensure that log2_frac() is _really_ an upper bound.
...
This version has actually been tested for all 32-bit inputs.
2008-12-17 07:31:44 -05:00
Timothy B. Terriberry
c7ace558fe
Fix log2_frac() to return an upper bound, not a lower bound.
2008-12-17 07:31:38 -05:00
Timothy B. Terriberry
310fb3cb4d
Compute the real maximum required bits for a split.
2008-12-17 07:31:08 -05:00
Jean-Marc Valin
5a3d49eb11
Fixes two bugs in get_required_bits() for the split cwrs case.
2008-12-07 14:39:42 -05:00
Jean-Marc Valin
f3190f26b9
s/unsigned/celt_uint32_t/
2008-10-01 19:41:54 -04:00
Jean-Marc Valin
b155bb8860
Merge branch 'cwrs_speedup'
...
Conflicts:
libcelt/cwrs.c
tests/cwrs32-test.c
2008-09-21 22:38:43 -04:00
Timothy B.B Terriberry
5ee9715c5c
Change cwrsi() to operate on rows of U instead of columns.
...
It is no slower with a large number of pulses, and as much as 30% faster with
a large number of dimensions.
2008-09-21 21:37:41 -04:00
Jean-Marc Valin
abf5c8ed64
Merge branch 'cwrs_speedup' (derf's cwrs changes)
...
Conflicts:
libcelt/cwrs.c
2008-09-19 08:02:50 -04:00
Timothy B.B Terriberry
d910274f79
Change CWRS indexing to use Pyramid VQ's magnitude ordering.
...
This lets us encode and decode directly from the pulse vector without an
intermediate transformation.
This makes old streams undecodable.
Additionally, ncwrs_u32() has been sped up for large N by using the sliding
recurrence from Mohorko et al.
ncwrs_u64 could be sped up in a similar manner, but would require a larger
table of multiplicative inverses (or several 32x32->64 bit multiplies).
Note that U(N,M) is now everywhere 1/2 the value it used to be.
2008-09-19 07:38:24 -04:00
Jean-Marc Valin
b781877e80
Converted everything to 32-bit CWRS (using split after that)
2008-09-12 21:27:35 -04:00
Jean-Marc Valin
453ccd829a
Generate slightly more accurate WMOPS figures
2008-09-12 20:52:27 -04:00
Jean-Marc Valin
9eba823cf7
Turns out that the worse case of the vector split is the same as that of the
...
pulse split. Also, added an allocation line for even higher bit-rates
2008-08-02 20:51:44 -04:00
Jean-Marc Valin
b0c153b15d
Doing the cwrs split in dimensions should save a few bits.
2008-06-11 18:05:57 +10:00
Jean-Marc Valin
f892d5f68e
Turns out maxK and maxM were also inverted in fits_in64()
2008-06-10 23:46:12 +10:00
Jean-Marc Valin
51891c9d5c
fixed a cwrs bug in fits_in32()
2008-06-10 20:57:52 +10:00
Jean-Marc Valin
679083f449
Implemented split-cwrs for very large codebooks (>64 bits), but still getting
...
a few decoding errors.
2008-06-10 17:23:03 +10:00
Jean-Marc Valin
5aff7c04d4
Implemented a cleaner way to detect whether CWRS codebooks fit in 32 or 64 bits
2008-06-10 16:25:45 +10:00
Jean-Marc Valin
d7291d2430
Further simplifications to comb2pulses() to remove all conditional branches.
2008-04-21 07:53:40 +10:00
Jean-Marc Valin
ba8295241c
optimisation: one less conditional branch in pulse2comb()
2008-04-18 16:58:19 +10:00
Jean-Marc Valin
e6ce0c6a22
optimisation: Removed a bunch of conditional branches from comb2pulse()
2008-04-18 16:46:39 +10:00
Jean-Marc Valin
558c50eb3d
optimisation: Making it clear to the compiler that many of the loops in cwrs
...
need to iterate at least once.
2008-04-16 14:15:07 +10:00
Jean-Marc Valin
ed317c94c3
optimisation: another bunch of simplifications to the "simple case" of the
...
alg_quant() search.
2008-04-15 17:31:23 +10:00
Jean-Marc Valin
766257109e
fixed a few warnings, no real change
2008-04-11 07:23:53 +10:00
Timothy B. Terriberry
d883670bf7
Rework CWRS code.
...
This eliminates an extra O(nm) lookups on decode, and reduces the rate control
from O(nm^2) to O(nm), in addition to eliminating O(m) lookups on both encode
and decode.
Although the interface is slightly more complex, the internal code is also
simpler.
2008-04-05 14:31:35 +10:00
Jean-Marc Valin
98c86c7885
Trying to clean up celt_ilog2() vs. EC_ILOG a bit.
2008-03-27 08:40:45 +11:00
Jean-Marc Valin
9ce7fbc421
making {next|prev}_cwrs* inline
2008-03-26 23:33:06 +11:00
Jean-Marc Valin
233e317202
optimisation: shaving a few cycles off prev_cwrs* by not computed the values
...
we're not going to use.
2008-03-26 15:46:51 +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