Commit graph

202 commits

Author SHA1 Message Date
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
74f4e9f385 The intra decision is now made for the following frame, not the current one.
Also, setting transient shift to zero when not using short blocks (this causes a
failed assertion otherwise)
2009-05-02 23:37:48 -04:00
Jean-Marc Valin
32ec58cc3e Dynamically selecting intra energy based on energy variations from the previous
frame
2009-05-01 21:28:58 -04:00
Jean-Marc Valin
18a3b79d24 Add support for intra-coding of the coarse energy. 2009-05-01 19:58:55 -04:00
Jean-Marc Valin
a8be38a376 Apparently the 0b notation used for the flags isn't standard C. 2009-04-29 22:16:26 -04:00
Jean-Marc Valin
05ed03e6e3 New code for encoding the flags 2009-04-29 07:44:13 -04:00
Jean-Marc Valin
eafbdd5531 Making it easier to Torben to develop his new PLC code 2009-04-27 20:05:30 -04:00
Jean-Marc Valin
6db6cbd4f0 Making the "data" argument to celt_decode() const as pointed out by Bjoern
Rasmussen.
2009-04-11 22:01:20 -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
54547f16d5 Miscellaneous comment, copyright notice, readme updates. 2009-02-16 19:52:02 -05:00
Jean-Marc Valin
28f0f65325 Preparing for version 0.5.2 2009-02-16 07:35:19 -05:00
Gregory Maxwell
520eeaee1a Simple check that application supplied packet length is not negative. 2009-02-09 01:33:21 -05:00
Gregory Maxwell
fea148f284 Additional copyright notices. 2009-02-03 23:09:52 -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
Gregory Maxwell
98046cadcf Add a SET_LTP call to allow on the fly activation/deactivation of the long term
predictor even in high complexity mode (LTP off is more loss robust), fix the
case where turning on LTP on a running stream can cause prediction against
bogus data by delaying the usage of the LTP until enough data has been encoded.
2008-12-13 21:31:38 -05:00
Gregory Maxwell
abe40f02a9 Minor pitch handling cleanups. 2008-12-13 01:31:32 -05:00
Gregory Maxwell
b0a73a0b1e Fix optional synthesis bug in fixed point mode. 2008-12-12 16:58:27 -05:00
Jean-Marc Valin
de1fd28740 Fixes a denormalisation issue occuring when multiple packets are lost and the
signal decays to "not quite zero"
2008-11-27 23:34:15 -05:00
Jean-Marc Valin
37ab9c6642 Bit of cleaning up and comments 2008-11-08 09:14: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
a2012d8dc5 experimental code for choosing whether to apply folding for the high bands 2008-11-05 21:54:37 -05:00
Jean-Marc Valin
c5f2a9d988 Latest psychoacoustics work -- still highly experimental 2008-10-26 22:00:26 -04:00
Jean-Marc Valin
8679a80ee2 Encoder now writes data directly in the user buffer 2008-10-18 07:44:35 -04:00
Jean-Marc Valin
dffd9449b5 Tonality estimation code 2008-10-15 07:29:58 -04:00
Jean-Marc Valin
b6f9061343 celt_encoder_ctl() is a bit more type-safe. 2008-10-05 22:39:13 -04:00
Wessel Lubberhuizen
33ba6cc6b6 fix stack handling 2008-10-03 07:09:29 -04:00
Gregory Maxwell
8259531160 API: Change celt_encode and celt_encode_float so that they take an optional synthesis parameter after the PCM input. If optional_synthesis is null the encoder will be able to save some computation. If optional_synthesis is non-null if will be used to write the encoder's expectation of the decoder's output. Synthesis may alias the input pcm, so calling the encoder with the same buffer twice will achieve the old behavior. Remove 'restrict' from the CTL prototype. 2008-09-30 23:32:35 -04:00
Jean-Marc Valin
c18fb1d031 Added celt_encoder_ctl() and CELT_SET_COMPLEXITY 2008-09-30 07:36:54 -04:00
Gregory Maxwell
23e654ff82 Allow all even frame sizes, change the selection of number of short MDCTs per frame to be more intelligent. 2008-09-27 21:23:54 -04:00
Gregory Maxwell
0527f37352 Fix support for 64 sample frames. 2008-09-24 20:27:51 -04:00
Jean-Marc Valin
b4ce40cb55 Fixing the manual stack handling code 2008-09-19 11:50:50 -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
d9b9565a4b Added Erik de Castro Lopo's float_cast.h to use lrintf() when available. Also
disables the synthesis on the encoder side when pitch is disabled.
2008-08-31 23:34:47 -04:00
Jean-Marc Valin
c994394fc3 Added signalling bits for enabling/disabling pitch, short blocks, and folding.
Also, making it possible to disable pitch for all frames.
2008-08-30 00:55:07 -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
8dff923a5d Added hooks for tuning pulses and fine energy quant 2008-08-13 22:07:20 -04:00
Gregory Maxwell
5f2a74b38b Adding a floating point interface to encode and decode 2008-08-12 00:14:33 -04:00
Jean-Marc Valin
9c70906fdb Changing the allocation algorithm to better take into account the fixed cost
per frames for each mode.
2008-08-03 22:07:06 -04:00
Jean-Marc Valin
6775de3eae Unified allocation of fine energy and pulses. 2008-08-02 08:14:42 -04:00
Jean-Marc Valin
c890b58b69 Completed the separation of coarse and fine energy quantisation 2008-08-01 22:26:49 -04:00
Jean-Marc Valin
6361ad8d41 Simplified the folding normalisation by creating renormalise_vector(). 2008-07-20 23:14:31 -04:00
Jean-Marc Valin
7028d62f85 Do not encode the short-window bit when not applicable. 2008-07-10 23:06:58 -04:00
Jean-Marc Valin
bd7de0a7d5 cleaned up transient_analysis() and replaced the algorithm with a simpler one
based on the max absolute value in a range.
2008-07-06 10:57:26 -04:00
Jean-Marc Valin
f457819668 fixed-point: conversion of pre-echo avoidance now complete. 2008-07-04 16:47:28 -04:00
Jean-Marc Valin
0ceccb2dbd fixed-point: more work on the time window (almost done) 2008-07-03 20:41:06 -04:00
Jean-Marc Valin
e4aeb47277 More fixed-point conversion of the time window. 2008-06-29 12:06:05 +10:00
Jean-Marc Valin
528f4b8660 More fixed-point work on the time window -- including conversion of the gain
to power-of-two.
2008-06-29 03:46:39 +10:00