Commit graph

285 commits

Author SHA1 Message Date
Jean-Marc Valin
dc6d69e64b Ordering Hadamard frequencies when increasing the time-resolution.
This means we're "time-ordered" in all cases except when increasing
the time resolution on frames that already use short blocks.
There's no reordering when increasing the frequency resolution
on short blocks.
2010-12-21 01:04:11 -05:00
Jean-Marc Valin
6e4b9dc034 Turning noise filling back on for cases where we have no data to fold with 2010-12-19 21:58:31 -05:00
Timothy B. Terriberry
e86fb268b0 Replace ec_{enc|dec}_bit_prob() with ec_{enc|dec}_bit_logp().
All of our usage of ec_{enc|dec}_bit_prob had the probability of a
 "one" being a power of two.
This adds a new ec_{enc|dec}_bit_logp() function that takes this
 explicitly into account.
It introduces less rounding error than the bit_prob version, does not
 require 17-bit integers to be emulated by ec_{encode|decode}_bin(),
 and does not require any multiplies or divisions at all.
It is exactly equivalent to
 ec_encode_bin(enc,_val?0:(1<<_logp)-1,(1<<_logp)-(_val?1:0),1<<_logp)

The old ec_{enc|dec}_bit_prob functions are left in place for now,
 because I am not sure if SILK is still using them or not when
 combined in Opus.
2010-12-18 09:06:06 -05:00
Timothy B. Terriberry
320cf2e2cd Re-organize spreading/folding constants.
These were stored internally in one order and in the bitstream in a
 different order.
Both used bare constants, making it unclear what either actually
 meant.
This changes them to use the same order, gives them named constants,
 and renames all the "fold" decision stuff to "spread" instead,
 since that is what it is really controlling.
2010-12-17 10:35:51 -05:00
Jean-Marc Valin
5c80391b35 Comments, low bit-rate busting avoidance 2010-12-16 14:11:48 -05:00
Jean-Marc Valin
425cfd3e15 Fix 2-phase stereo in the encoder 2010-12-13 16:56:35 -05:00
Jean-Marc Valin
9faf740882 Keeping the allocation of the intensity-codec bands
Also some code to select between constrained and unconstrained VBR
2010-12-04 10:27:22 -05:00
Jean-Marc Valin
e65978fea7 Adding a dual stereo option.
Left and right are coded independently.
2010-12-02 13:52:20 -05:00
Jean-Marc Valin
100ae8ce34 nothing to see here 2010-12-01 18:45:45 -05:00
Jean-Marc Valin
4f177e8510 Intensity stereo now in the bit-stream
Bands that are intensity-coded also get less bits than the others
2010-11-26 10:32:03 -05:00
Jean-Marc Valin
9b4ed5e290 Implementing intensity stereo.
There's no explicit signaling for it yet.
2010-11-24 18:01:20 -05:00
Gregory Maxwell
9743bf38ca Switch iteration over channels to the do{}while(); construct in order to inform the compiler that the these loops execute at least once. (This results in more intelligent output from the clang static analysis tool and should also produce faster code on at least some architectures.) 2010-11-04 23:52:43 -04:00
Jean-Marc Valin
fa1ca19934 Make sure that we always code the sign of N=1 bands
(unless there's no bit left at all in the frame)
2010-11-04 15:59:44 -04:00
Jean-Marc Valin
fd54a99e2d Prevents a folding artefact due to "folding the folding" 2010-10-21 17:50:27 -04:00
Jean-Marc Valin
6bf15c55d8 Tuning the folding bands.
The idea here is that it's better to fold a higher band -- even if it was
coded less accurately -- than a lower band that may have a different
temporal structure.
2010-10-21 15:08:27 -04:00
Jean-Marc Valin
5790fba762 Simplifying transient_analysis() now that we don't care about the time window 2010-10-18 17:28:40 -04:00
Jean-Marc Valin
d50b6287f2 Removing renormalise_bands() 2010-10-18 15:26:46 -04:00
Jean-Marc Valin
bb918ef711 Fixed fixed-point overflow for 2.5 ms frames. 2010-10-16 00:01:27 -04:00
Jean-Marc Valin
3295b5d56b Folding code moved to quant_band() to prevent duplication. 2010-10-15 23:43:45 -04:00
Jean-Marc Valin
dfb3e6866e tweaks to the split delta for transients 2010-10-15 17:45:33 -04:00
Jean-Marc Valin
ccd51fe947 No longer filling the stereo side with noise. 2010-10-13 11:48:17 -04:00
Jean-Marc Valin
0f8fc0bead New TF decision code based on L1-norm. Needs more work. 2010-10-12 23:25:58 -04:00
Jean-Marc Valin
b441a157d8 Using high-band noise less aggressively 2010-10-04 14:45:59 -04:00
Jean-Marc Valin
b801da5e83 Preventing bands from being coded at a rate below (for now) 3/8 bit/sample 2010-09-28 14:56:20 -04:00
Jean-Marc Valin
8abc6bee40 Fixes a minor folding bug for N=2 bands in stereo 2010-09-15 06:57:55 -04:00
Jean-Marc Valin
3c15659c39 Fixes fixed-point overflow in stereo_merge() 2010-09-14 16:02:47 -04:00
Jean-Marc Valin
d60e0db0e2 Fixes a fixed-point overflow in haar1() 2010-09-14 12:22:17 -04:00
Jean-Marc Valin
5f3ad5f985 Fix stereo for N=2 2010-09-14 10:30:32 -04:00
Jean-Marc Valin
79b4533846 Copy lowband when needed instead of undoing the transforms 2010-09-14 09:48:41 -04:00
Jean-Marc Valin
ad7d5e002f Allowing a max of 8 bits to qtheta 2010-09-13 17:44:48 -04:00
Jean-Marc Valin
a5ce03fe8a More quant_band() reorganisation. 2010-09-13 15:06:35 -04:00
Jean-Marc Valin
a18c75e55a Restructuring in quant_band() 2010-09-13 14:59:13 -04:00
Jean-Marc Valin
3578076003 Separates stereo_band_mix() into the intensity and MS stereo cases 2010-09-13 13:56:21 -04:00
Jean-Marc Valin
90e7fdd70e Added stereo_merge(), which does the renormalisation too 2010-09-13 13:44:11 -04:00
Jean-Marc Valin
009978ee6c Moves the bit-side gain application to the quantizer 2010-09-13 11:05:08 -04:00
Jean-Marc Valin
eea914cb88 Simplifies vector renormalisation (and using it less) 2010-09-12 20:11:32 -04:00
Jean-Marc Valin
725e5f4b4c Fix a minor, but bitstream-affecting bug 2010-09-11 08:57:59 -04:00
Jean-Marc Valin
5277d2db03 Fixes a divide-by-zero in narrowband mode with small frame size 2010-09-10 20:29:00 -04:00
Jean-Marc Valin
020ef4f810 Ignoring lower bands in folding_decision() 2010-08-31 17:08:45 -04:00
Jean-Marc Valin
1d17b9ae67 New implementation of folding_decision() 2010-08-31 14:51:58 -04:00
Jean-Marc Valin
736efd6909 Fixes some MSVC warnings 2010-08-31 11:52:45 -04:00
Jean-Marc Valin
3ad8db49c5 New pulse cache 2010-08-25 13:11:09 -04:00
Jean-Marc Valin
ba3a28921a MSE measurement details (no codec changes) 2010-08-23 11:14:35 -04:00
Jean-Marc Valin
d38d6b9aa1 Implemented variable spreading amount in the decoder
Decision not yet implemented in the encoder
2010-08-07 09:21:32 -04:00
Jean-Marc Valin
1f589ef143 More simplifications to N=2 stereo 2010-08-05 21:14:49 -04:00
Jean-Marc Valin
960505f074 More N=2 stereo simplifications 2010-08-05 20:35:53 -04:00
Timothy B. Terriberry
e4d271dcfb Simplifications to the N=2 stereo split.
This saves almost 200 bytes of code size.
2010-08-05 20:11:33 -04:00
Jean-Marc Valin
08b88c8d3d This patch makes Tim happy 2010-08-05 18:15:56 -04:00
Jean-Marc Valin
aa995ddde3 Making qn code 16-bit clean while simplifying it 2010-08-05 17:39:13 -04:00
Jean-Marc Valin
8cbea177ba Removing pitch prediction code 2010-08-05 15:28:27 -04:00