Commit graph

303 commits

Author SHA1 Message Date
Jean-Marc Valin
d5e5436e07 Fix for folding_decision() in stereo mode and more cleaning up of the code
now that we no longer do normalized pitch
2009-09-30 20:50:41 -04:00
Jean-Marc Valin
7013db7ca4 Fix stereo mismatch problem 2009-09-29 23:45:03 -04:00
Jean-Marc Valin
4834c92e2b More simplifications from denorm pitch 2009-09-28 19:17:34 -04:00
Jean-Marc Valin
095c1782c5 Removed code that is no longer necessary with denorm pitch and spreading 2009-09-17 22:38:34 -04:00
Jean-Marc Valin
92ae37027f enabling denorm pitch only at low bit-rate 2009-09-16 07:57:17 -04:00
Jean-Marc Valin
00fb6b0765 fixed-point: denorm pitch converted 2009-09-15 23:41:05 -04:00
Jean-Marc Valin
ab220aa212 denorm pitch works in fixed-point (though there's still some floats left) 2009-09-15 22:38:40 -04:00
Jean-Marc Valin
4c77ea96d0 doing pitch in denormalized domain 2009-09-14 22:51:55 -04:00
Jean-Marc Valin
3aa3afe74f Only calling intra_fold() when there's no pulse allocated 2009-09-11 20:28:29 -04:00
Jean-Marc Valin
a7750b90cc Re-introducing the successive rotations as a way to control low-bitrate
tonal artefacts. This replaces folding for all cases where we have at least
one pulse.
2009-08-29 22:52:03 +01:00
Jean-Marc Valin
79b361991e Forcing side to be orthogonal to mid for N=2. This saves one degree of freedom. 2009-08-09 19:18:22 -04:00
Jean-Marc Valin
5a70097d79 C89 and 16-bit fixes 2009-08-08 13:23:03 -04:00
Jean-Marc Valin
91f07dc125 Changing some code to use BITRES directly instead of its value. 2009-07-25 20:42:24 -04:00
Jean-Marc Valin
798ab38b27 Using normalised M/S stereo data for folding and use separate folding gains
for M and S.
2009-07-12 20:41:29 -04:00
Jean-Marc Valin
4da9e94c98 Using MS stereo for all bands, fixing a few bugs in the stereo folding 2009-07-12 00:58:50 -04:00
Jean-Marc Valin
ece2cfa2d2 removed useless comments 2009-07-04 22:46:38 -04:00
Jean-Marc Valin
cd29b02773 fixed-point: fixing two overflows that didn't really affect quality 2009-07-01 09:59:21 -04:00
Gregory Maxwell
a80958b025 Note some more platforms where float-approx is tested, fix a bug in the prediction ctl,
and remove some dead code from bands.c.
2009-06-29 12:48:57 -04:00
Jean-Marc Valin
0dd2cd4958 Simplifies the stereo mixing code, throwing away some old code. 2009-06-18 23:18:39 -04:00
Jean-Marc Valin
08a82ffb45 More de-interleaving: denormalised MDCT no longer stored with interleaved
channels. Fixed two stereo bugs in the process: one in the handling of
mdct_weight_shift and one in the PLC.
2009-06-14 14:20:44 -04:00
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