Commit graph

283 commits

Author SHA1 Message Date
Jean-Marc Valin
83c26e713c Now storing the band energies in de-interleaved format when doing stereo 2009-06-14 09:19:51 -04:00
Jean-Marc Valin
9a44cde205 Removed support for band-per-band stereo_mode that was never really used 2009-06-02 20:21:53 -04:00
Jean-Marc Valin
7353203b81 Updating DISABLE_STEREO to the new stereo code (i.e. disabling more stuff) 2009-06-02 20:07:25 -04:00
Jean-Marc Valin
527db5c450 Adding a decision mechanism for turning folding on or off depending on the
signal characteristics
2009-06-02 07:56:19 -04:00
Jean-Marc Valin
1cca151671 This fixes a bug in the new stereo code triggered only at ridiculously high
bitrates. It was caused by excessive "balance" bits leading to qb>14.
2009-05-23 22:28:04 -04:00
Jean-Marc Valin
6f18d11148 Adds support for up to 32767 pulses for the N=3 case (disabled for now) 2009-05-22 07:45:58 -04:00
Gregory Maxwell
8842fdee21 Fixing stereo: Do not attempt to use more bits than are available.
This change breaks the bitstream.

Make the first frame out of the encoder an intra-frame. (While not required this may help
in the case that the decoder has old state laying around, and it shouldn't hurt)
2009-05-05 07:31:44 -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
ca53b7c919 Squashed commit of the following:
commit ea807b68678dd76175def2c5eb006c6bdb16679e
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Wed Mar 25 23:24:41 2009 -0400

    cleanup before merge

commit 73ad1a0202641be6a23903e464ece21fe332a131
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sat Mar 21 00:02:16 2009 -0400

    Some tuning of the new stereo

commit c05057eb57a7723045214a2f830fd561388ae48a
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Mar 15 19:56:11 2009 -0400

    fixed-point: atan2() converted

commit a8476cf8be55b0612d42df98d9807ca1335adfe3
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sat Mar 14 23:10:04 2009 -0400

    fixed-point: Getting the new stereo code working in fixed-point (still more
    work left)

commit 70a452761a5ce15700664e7167886dce5914cbd0
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Mon Mar 2 23:36:25 2009 -0500

    Coding left and right independently for lower bands

commit 4efd1e6385c7d036749080265a8d26668312b91b
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Mar 1 23:56:46 2009 -0500

    Removed the sqrt(C) from the normalisation, which simplifies a lot of things.

commit a4f3c5c60bc396bf644afa49b49e6b24ccf144f8
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Fri Feb 20 20:49:38 2009 -0500

    Better point stereo calculation when we don't encode the side anyway

commit f08525de4739f4017d19ec2e2022883deda8f826
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Thu Feb 19 19:43:09 2009 -0500

    Apparently, Timothy's calculations for fine energy allocation also apply
    to the quantisation of theta.

commit 6548cffc9d3f996b8a8dbfab982f0da0bc6c2dc2
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Thu Feb 19 07:35:24 2009 -0500

    Better handling of the "theta bits" and disabling the orthogonalize()

commit 7aa82c694967afa85dd30be8cc670663f98829fe
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Wed Feb 18 08:01:07 2009 -0500

    tuning the new stereo

commit c2b780a773de66fd9613c7cd54c09b705fe9ce45
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Feb 15 22:24:52 2009 -0500

    The new stereo coupling actually decodes properly now.

commit 85513c203d773bebcf0a6055f953170d563d890c
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Feb 15 21:31:16 2009 -0500

    First attempt at a new "constrained" MS stereo scheme
2009-03-26 20:23:14 -04:00
Gregory Maxwell
fea148f284 Additional copyright notices. 2009-02-03 23:09:52 -05:00
Gregory Maxwell
0b2c46dc24 This fixes a budget overrun and segfault for unreasonably low bitrates. 2009-02-03 15:08:49 -05:00
Jean-Marc Valin
aca0be91f4 Pitch now quantised at the band level, got rid of all the VQ code. 2009-01-13 23:04:12 -05:00
Jean-Marc Valin
77c80ce524 Moved the application of the pitch gain to (un)quant_bands(). This doesn't
change anything to the codec, but will make the next changes easier.
2009-01-13 20:48:30 -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
Jean-Marc Valin
bc79991742 The fold bit can now be used by the encoder and decoder (encoder still needs
EXP_PSY)
2008-11-07 22:53:13 -05:00
Jean-Marc Valin
896471dc3d Disabling the folding sign bit 2008-11-06 21:55:41 -05:00
Jean-Marc Valin
a2012d8dc5 experimental code for choosing whether to apply folding for the high bands 2008-11-05 21:54:37 -05:00
Gregory Maxwell
3b34e188ed In some conditions the allocation could run out of bits and attempt to allocate a negative number of pulses. 2008-10-29 23:37:32 -04:00
Jean-Marc Valin
2b08d7a210 Removing the 64-bit part of the range coder. 2008-10-04 21:10:26 -04:00
Gregory Maxwell
b6a3b0c464 Fix stereo support; correctly deallocate bits_stereo. 2008-10-04 00:39:17 -04:00
Gregory Maxwell
34952f3e45 Add an additional 1/16th bit of padding to avoid budget busting on some inputs. 2008-09-23 21:08:44 -04:00
Jean-Marc Valin
1dab60cc91 Better use of the arithmetic operators 2008-09-16 13:29:37 -04:00
Jean-Marc Valin
7b0cb4ba0d One-at-a-time allocator now uses direct feedback from ec_*_tell(). 2008-09-11 00:20:08 -04:00
Jean-Marc Valin
5c3bc67959 Fixed a bunch of fixed-point overflows on insanely hot signals by changing
the time-domain representation from Q14 to Q12 (Q29 to Q27 using the
standard convention).
2008-08-28 23:34:24 -04:00
Jean-Marc Valin
6775de3eae Unified allocation of fine energy and pulses. 2008-08-02 08:14:42 -04:00
Jean-Marc Valin
1d27ef8b2c Re-implemented renormalise_bands() based on renormalise_vector(). 2008-07-20 23:30:29 -04:00
Jean-Marc Valin
df38f2bf01 Re-enabling folding/intra for transients 2008-07-20 20:36:54 -04:00
Jean-Marc Valin
9375aa4faa Cleaned up the pre-echo avoidance code so it works when compiled as fixed-point
(still requires float ops though). Also, removed the per-band IDCT.
2008-06-27 07:57:35 +10:00
Jean-Marc Valin
9d1decd1bb short-block MDCT 2008-06-17 13:28:13 +10:00
Jean-Marc Valin
12b22484e2 Implemented two pre-echo avoidance techniques: time-domain pre-emphasis and
per-band IDCT.
2008-06-16 14:13:05 +10:00
Jean-Marc Valin
f4f5dac8ba Doing mid-side stereo when not doing intensity. 2008-05-23 17:27:39 +10:00
Jean-Marc Valin
bf2d648bbd Implemented intensity stereo, which required changes all over the place
to make sure that stereo coupling is done at the band level. Previously
the stereo coupling was done all at once, but there were all kinds of
interactions with the prediction and folding.
2008-05-23 16:57:34 +10:00
Jean-Marc Valin
7bd2b9e001 More stereo infrastructure 2008-05-23 14:23:22 +10:00
Jean-Marc Valin
fe0b8e8db4 infrastructure changes for upcoming stereo improvements 2008-05-23 13:35:35 +10:00
Jean-Marc Valin
2de66199b2 Disabled pulse spreading until I can show it actually helps 2008-05-05 16:05:34 +10:00
Jean-Marc Valin
9a8bac019c Using only a sign for the intra prediction instead of using up to 5 bits for
an offset.
2008-05-05 12:02:14 +10:00
Jean-Marc Valin
ba11d78372 Passing the mode to the intra prediction functions so the single-channel case
can be optimised
2008-04-21 21:59:37 +10:00
Jean-Marc Valin
50bf8b0121 Removing some unnecessary initialisations to zero. 2008-04-21 12:14:16 +10:00
Jean-Marc Valin
dff9b7eb65 Another bunch of do-while() loops 2008-04-21 11:43:51 +10:00
Jean-Marc Valin
5369578962 better indexing in exp_rotation() 2008-04-19 12:58:29 +10:00
Jean-Marc Valin
d583b2463c a few minor optimisations 2008-04-18 22:19:58 +10:00
Jean-Marc Valin
3956de98eb fix minor compilation error/warning 2008-04-12 06:55:39 +10:00
Jean-Marc Valin
05e56c4d6c Defining DISABLE_STEREO now optimises for the mono case 2008-04-10 09:13:05 +10:00
Jean-Marc Valin
ae76e553db Changed the rules for using the pulse spreading. It should be used less often
and mainly in the mid-range.
2008-03-28 17:59:36 +11:00
Jean-Marc Valin
e28f25f0d1 Removed a few int divisions from the intra prediction code. 2008-03-27 14:18:28 +11:00
Jean-Marc Valin
0828b6506c fixed-point: using MULT16_16 instead of * in compute_band_energies() 2008-03-27 10:22:42 +11:00
Jean-Marc Valin
a56c34f381 optimisations: faster handling of the zero for compute_band_energies() and
normalise_bands(). Also, another bunch of restrict qualifiers -- mainly
to tell the compiler there's no aliasing between the array bounds and the
data.
2008-03-26 14:36:07 +11:00
Jean-Marc Valin
25aeed74f1 changed 1*rcp(x) to just rcp(x) 2008-03-26 13:45:01 +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
bd718ba577 Removed the "pitch compression" in the residual quantisation. Also, removed
the more complex "n-best search" and replaced it with a greedy search
2008-03-25 14:15:41 +11:00