Commit graph

47 commits

Author SHA1 Message Date
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
Jean-Marc Valin
31b79d1993 Changed definition of VARDECL to make it more flexible. No actual code change. 2008-03-12 17:17:23 +11:00
Jean-Marc Valin
493b38d48f Better heuristic for deciding when to use the 32-bit version of the cwrs code. 2008-03-11 15:24:07 +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
d3b86e5347 cwrs converted to use VARDECL/ALLOC macros 2008-02-20 12:18:41 +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
472a5f03c6 Fixed a bunch of warnings 2008-02-19 13:12:32 +11:00
Jean-Marc Valin
dba28a52ce cwrs.c links to derf's article on pulse vector encoding. 2008-02-18 23:40:43 +11:00
Jean-Marc Valin
0d28aa99c0 Now no divisions required in the cwrs code 2008-02-14 15:02:04 +11:00
Jean-Marc Valin
bf17da60f0 Reduced useless calls to ncwrs64() by half. 2008-02-14 14:18:19 +11:00
Jean-Marc Valin
5fa59954a9 moved pulse [en|de]coding to cwrs.c 2008-02-14 13:50:44 +11:00
Jean-Marc Valin
3134884408 Speeded up cwrsi and icwrs by at least an order of magnitude. Now using
the recursive definition of ncwrs instead of computing it from scratch
every time.
2008-02-14 11:55:01 +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
846d4e240b Allowing the quantiser serch to put more than one pulse at one,
giving a (minor) speedup. Also fixed optional memory-based ncwrs64().
2008-02-12 13:48:48 +11:00
Jean-Marc Valin
7d40730e22 optional fast ncwrs64() implementation (copied from ncwrs) requiring
statis memory allocation (not enabled by default)
2008-02-12 11:32:20 +11:00
Jean-Marc Valin
abe043f0a1 Moving everything to the same type abstraction (sort of). 2008-01-31 14:26:29 +11:00
Timothy B. Terriberry
71c9bbff02 Updated pulse coding to simpler (slightly faster) code included with
http://people.xiph.org/~tterribe/notes/cwrs.html
Removed dead code.
2008-01-01 07:18:06 +11:00
Jean-Marc Valin
f8db800c44 Added support for codebooks up to 64 bits. 2007-12-11 14:52:56 +11:00
Timothy B. Terriberry
c4541ae786 Code for converting back and forth between pulse vectors and the correspondig
VQ index.
2007-12-03 11:51:29 +11:00