opus.git
9 years agoChange name of libcelt to libcelt0
Thorvald Natvig [Sat, 16 Jan 2010 13:06:41 +0000 (08:06 -0500)]
Change name of libcelt to libcelt0

9 years agoUpdates celtclient to the new API.
Stefan de Konink [Fri, 8 Jan 2010 02:27:42 +0000 (21:27 -0500)]
Updates celtclient to the new API.

9 years agofixed-point: converted PLC filters and LPC parameters
Jean-Marc Valin [Fri, 1 Jan 2010 14:33:17 +0000 (09:33 -0500)]
fixed-point: converted PLC filters and LPC parameters

9 years agofixed-point: starting conversion of the new PLC
Jean-Marc Valin [Thu, 31 Dec 2009 03:40:24 +0000 (22:40 -0500)]
fixed-point: starting conversion of the new PLC

9 years agoAdding a safeguard against unstable LPC, so now there's no way (that I can
Jean-Marc Valin [Mon, 28 Dec 2009 12:59:42 +0000 (07:59 -0500)]
Adding a safeguard against unstable LPC, so now there's no way (that I can
think of) to produce NaNs in the new PLC.

9 years agoMaking new PLC code work in fixed-point even though it's still using float
Jean-Marc Valin [Mon, 28 Dec 2009 05:34:29 +0000 (00:34 -0500)]
Making new PLC code work in fixed-point even though it's still using float
arithmetic.

9 years agoC89 friendliness
Jean-Marc Valin [Mon, 21 Dec 2009 05:06:12 +0000 (00:06 -0500)]
C89 friendliness

9 years agoThis fixes a bug in stereo PLC (offset wasn't changed between channels)
Jean-Marc Valin [Thu, 17 Dec 2009 03:42:32 +0000 (22:42 -0500)]
This fixes a bug in stereo PLC (offset wasn't changed between channels)

9 years agoPLC: Added lag windowing and constraint to synthesis energy
Jean-Marc Valin [Tue, 15 Dec 2009 02:19:37 +0000 (21:19 -0500)]
PLC: Added lag windowing and constraint to synthesis energy

9 years agoVarlength arrays fix for C89
Thorvald Natvig [Fri, 11 Dec 2009 12:19:09 +0000 (13:19 +0100)]
Varlength arrays fix for C89

9 years agoNew LPC-based PLC code
Jean-Marc Valin [Fri, 11 Dec 2009 05:07:31 +0000 (00:07 -0500)]
New LPC-based PLC code

9 years agoOops, forgot to free the pitch bufer
Jean-Marc Valin [Thu, 3 Dec 2009 02:07:11 +0000 (21:07 -0500)]
Oops, forgot to free the pitch bufer

9 years agoFixing (read) array overrun for 1024-sample frames.
George de Vries [Thu, 3 Dec 2009 01:59:44 +0000 (20:59 -0500)]
Fixing (read) array overrun for 1024-sample frames.

9 years agoSome work on the pitch search weighting filter (still disabled)
Jean-Marc Valin [Wed, 2 Dec 2009 12:04:28 +0000 (07:04 -0500)]
Some work on the pitch search weighting filter (still disabled)

9 years agoReorganised the pitch code to simplify the PLC case and fixed a buffer overflow
Jean-Marc Valin [Thu, 26 Nov 2009 05:39:36 +0000 (00:39 -0500)]
Reorganised the pitch code to simplify the PLC case and fixed a buffer overflow
introduced in Thorvald's previous patch.

9 years agoFixing a few memory errors
Jean-Marc Valin [Thu, 26 Nov 2009 01:38:52 +0000 (20:38 -0500)]
Fixing a few memory errors

9 years agoUse stack_alloc for pitch.c
Thorvald Natvig [Wed, 25 Nov 2009 00:02:42 +0000 (01:02 +0100)]
Use stack_alloc for pitch.c

9 years agominor code cleanup
Jean-Marc Valin [Sun, 22 Nov 2009 04:41:26 +0000 (23:41 -0500)]
minor code cleanup

9 years agoRenamed MDCT functions to avoid symbol clashes with Vorbis
Jean-Marc Valin [Sun, 22 Nov 2009 02:57:44 +0000 (21:57 -0500)]
Renamed MDCT functions to avoid symbol clashes with Vorbis

9 years agoRemoving original freq-domain pitch code
Jean-Marc Valin [Mon, 9 Nov 2009 04:51:54 +0000 (13:51 +0900)]
Removing original freq-domain pitch code

9 years agoTemporal pitch search
Jean-Marc Valin [Sun, 8 Nov 2009 13:29:54 +0000 (22:29 +0900)]
Temporal pitch search

9 years agocelt_ilog2() is only used in fixed-point mode
Jean-Marc Valin [Sat, 31 Oct 2009 17:43:43 +0000 (13:43 -0400)]
celt_ilog2() is only used in fixed-point mode

9 years agoExpose the normalized range for reciprocal square roots in fixed-point mode. This...
Timothy Terriberry [Sat, 31 Oct 2009 17:19:06 +0000 (10:19 -0700)]
Expose the normalized range for reciprocal square roots in fixed-point mode. This allows subsequnt calculations to use the full precision of the result.

9 years agoSMALL_FOOTPRINT preserves the special n=1 cwrs case
Jean-Marc Valin [Sat, 24 Oct 2009 18:29:15 +0000 (14:29 -0400)]
SMALL_FOOTPRINT preserves the special n=1 cwrs case

9 years agoAdded a SMALL_FOOTPRINT option
Jean-Marc Valin [Sat, 24 Oct 2009 15:44:07 +0000 (11:44 -0400)]
Added a SMALL_FOOTPRINT option

9 years agomisc minor changes
Jean-Marc Valin [Sat, 24 Oct 2009 15:24:34 +0000 (11:24 -0400)]
misc minor changes

9 years agoremoving more unused code
Jean-Marc Valin [Sat, 24 Oct 2009 02:33:25 +0000 (22:33 -0400)]
removing more unused code

9 years agoRemoving unused code in the entropy coder
Jean-Marc Valin [Sat, 24 Oct 2009 01:44:54 +0000 (21:44 -0400)]
Removing unused code in the entropy coder

9 years agodoxygen fix
Jean-Marc Valin [Fri, 23 Oct 2009 01:14:22 +0000 (21:14 -0400)]
doxygen fix

9 years agoprevent busting at ridiculously low bit-rate VBR
Jean-Marc Valin [Thu, 22 Oct 2009 04:23:56 +0000 (00:23 -0400)]
prevent busting at ridiculously low bit-rate VBR

9 years agoMaking sure the VBR controller never busts the number of bytes allowed
Jean-Marc Valin [Thu, 22 Oct 2009 04:12:31 +0000 (00:12 -0400)]
Making sure the VBR controller never busts the number of bytes allowed

9 years agoBetter computation of the VBR rate upper bound and reducing the coarse energy
Jean-Marc Valin [Thu, 22 Oct 2009 03:24:18 +0000 (23:24 -0400)]
Better computation of the VBR rate upper bound and reducing the coarse energy
budget at low bitrate.

9 years agoEnhancements the fixed-point approximations of non-linear functions.
Timothy B. Terriberry [Wed, 21 Oct 2009 04:18:41 +0000 (00:18 -0400)]
Enhancements the fixed-point approximations of non-linear functions.

Accuracy for rsqrt, rcp, cos, and log2 is now at the level of truncation error
 for the current output resolution of these functions.
sqrt and exp2 still have non-trivial algebraic error, but this cannot be
 reduced much further using the current method without additional computation.
Also updates the fast float approximations for log2 and exp2 with coefficients
 that give slightly lower maximum relative error.

Patch modified by Jean-Marc Valin to leave the cos approximation as is and
leave the check for x<-15 in exp2 as is.

9 years agoAllow coarse energy to take almost all the bits. Also, fixed a some issues with
Jean-Marc Valin [Wed, 21 Oct 2009 11:08:27 +0000 (07:08 -0400)]
Allow coarse energy to take almost all the bits. Also, fixed a some issues with
the VBR rate controller.

9 years agoMaking the multiplication in normalise_residual() produce a 32-bit result just
Jean-Marc Valin [Tue, 20 Oct 2009 11:22:04 +0000 (07:22 -0400)]
Making the multiplication in normalise_residual() produce a 32-bit result just
to be on the safe side (not that I observed any overflow, but I can't prove
it can't happen).

9 years agoAccuracy improvements to the fixed-point celt_rsqrt().
Timothy B. Terriberry [Tue, 20 Oct 2009 06:39:45 +0000 (02:39 -0400)]
Accuracy improvements to the fixed-point celt_rsqrt().

9 years agoThis should prevent a rare divide-by-zero in the pitch gain code
Jean-Marc Valin [Tue, 20 Oct 2009 11:13:35 +0000 (07:13 -0400)]
This should prevent a rare divide-by-zero in the pitch gain code

9 years agoNew VBR rate controller that doesn't allow more than one frame worth of excess
Jean-Marc Valin [Tue, 20 Oct 2009 04:25:31 +0000 (00:25 -0400)]
New VBR rate controller that doesn't allow more than one frame worth of excess
bit-rate

9 years agofixed a few trivial bugs: exporting celt_strerror(), changed DB_SCALING to a
Jean-Marc Valin [Mon, 19 Oct 2009 23:07:38 +0000 (19:07 -0400)]
fixed a few trivial bugs: exporting celt_strerror(), changed DB_SCALING to a
shift and removed the chec for DISABLE_STEREO in the mode creation.

9 years agoRemoved the _t from all the celt*_t types to avoid clashing with POSIX
Jean-Marc Valin [Sun, 18 Oct 2009 02:12:42 +0000 (22:12 -0400)]
Removed the _t from all the celt*_t types to avoid clashing with POSIX

9 years agoUpdated copyright notices
Jean-Marc Valin [Sun, 18 Oct 2009 01:40:10 +0000 (21:40 -0400)]
Updated copyright notices

9 years agoChanged all the celt*int*_t types to remove the _t suffix, which is reserved
Jean-Marc Valin [Sat, 17 Oct 2009 18:35:13 +0000 (14:35 -0400)]
Changed all the celt*int*_t types to remove the _t suffix, which is reserved
by POSIX. The other _t types that are not part of the API are still there
for now. Also, got rid of all that was left of the 64-bit types.

9 years agoConstrain the pitch gain to prevent potential instabilities.
Jean-Marc Valin [Sat, 17 Oct 2009 03:16:47 +0000 (23:16 -0400)]
Constrain the pitch gain to prevent potential instabilities.

9 years agoNow using a unique ID for CELT_ALLOC_FAIL
Jean-Marc Valin [Sat, 17 Oct 2009 01:32:52 +0000 (21:32 -0400)]
Now using a unique ID for CELT_ALLOC_FAIL

9 years agoImproved error handling, and implemented celt_strerror()
Jean-Marc Valin [Fri, 16 Oct 2009 11:30:14 +0000 (07:30 -0400)]
Improved error handling, and implemented celt_strerror()

9 years agoThe number of channels is now set when creating the states rather than when
Jean-Marc Valin [Fri, 16 Oct 2009 01:45:32 +0000 (21:45 -0400)]
The number of channels is now set when creating the states rather than when
creating the mode. This means that the same mode can be shared for mono and
stereo.

9 years agofirst step for removing the number of channels from the mode
Jean-Marc Valin [Thu, 15 Oct 2009 11:28:19 +0000 (07:28 -0400)]
first step for removing the number of channels from the mode

9 years agoAdjusting the allocation for stereo directly in the alloc function rather than
Jean-Marc Valin [Wed, 14 Oct 2009 00:35:21 +0000 (20:35 -0400)]
Adjusting the allocation for stereo directly in the alloc function rather than
in the table.

9 years agomerged the code for quant_bands() and unquant_bands()
Jean-Marc Valin [Fri, 9 Oct 2009 03:10:45 +0000 (23:10 -0400)]
merged the code for quant_bands() and unquant_bands()

9 years agoRenamed mix_pitch_and_residual() to normalise_residual(), after minor
Jean-Marc Valin [Wed, 7 Oct 2009 10:56:03 +0000 (06:56 -0400)]
Renamed mix_pitch_and_residual() to normalise_residual(), after minor
simplification.

9 years agoFurther simplifications to mix_pitch_and_residual() (which no longer does
Jean-Marc Valin [Wed, 7 Oct 2009 00:08:49 +0000 (20:08 -0400)]
Further simplifications to mix_pitch_and_residual() (which no longer does
anything that its name implies)

9 years agoDoing the mdct shaping in the normalised domain, so that energy is preserved
Jean-Marc Valin [Mon, 5 Oct 2009 01:35:36 +0000 (21:35 -0400)]
Doing the mdct shaping in the normalised domain, so that energy is preserved

9 years agostereo allocator tuning
Jean-Marc Valin [Sun, 4 Oct 2009 05:17:42 +0000 (01:17 -0400)]
stereo allocator tuning

9 years agomaking compute_ebands() a tiny bit less stupid.
Jean-Marc Valin [Sun, 4 Oct 2009 03:27:52 +0000 (23:27 -0400)]
making compute_ebands() a tiny bit less stupid.

9 years agomoved the de-emphasis code to a separate function (shared between encoder and
Jean-Marc Valin [Sat, 3 Oct 2009 17:57:31 +0000 (13:57 -0400)]
moved the de-emphasis code to a separate function (shared between encoder and
decoder), declared a few things static

9 years agoSimplifying the IMDCT
Jean-Marc Valin [Sat, 3 Oct 2009 14:36:27 +0000 (10:36 -0400)]
Simplifying the IMDCT

9 years agoSimplifications to the code
Jean-Marc Valin [Sat, 3 Oct 2009 13:27:59 +0000 (09:27 -0400)]
Simplifications to the code

9 years agomore stereo simplifications
Jean-Marc Valin [Sat, 3 Oct 2009 04:33:16 +0000 (00:33 -0400)]
more stereo simplifications

9 years agoNo longer interleaving channels of the normalised spectrum. Also fixed the
Jean-Marc Valin [Sat, 3 Oct 2009 04:25:15 +0000 (00:25 -0400)]
No longer interleaving channels of the normalised spectrum. Also fixed the
indexing of the pitch code for stereo

9 years agosimplifications to the stereo code
Jean-Marc Valin [Sat, 3 Oct 2009 03:50:05 +0000 (23:50 -0400)]
simplifications to the stereo code

9 years agoFix for some test program compat and an assertion that didn't make sense anymore
Jean-Marc Valin [Fri, 2 Oct 2009 21:48:25 +0000 (17:48 -0400)]
Fix for some test program compat and an assertion that didn't make sense anymore

9 years agoDemoved the divisions from the inner pitch prediction loops, bumped the version
Jean-Marc Valin [Thu, 1 Oct 2009 23:42:18 +0000 (19:42 -0400)]
Demoved the divisions from the inner pitch prediction loops, bumped the version
and bit-stream version

9 years agoFix for folding_decision() in stereo mode and more cleaning up of the code
Jean-Marc Valin [Thu, 1 Oct 2009 00:50:41 +0000 (20:50 -0400)]
Fix for folding_decision() in stereo mode and more cleaning up of the code
now that we no longer do normalized pitch

9 years agoFix stereo mismatch problem
Jean-Marc Valin [Wed, 30 Sep 2009 03:45:03 +0000 (23:45 -0400)]
Fix stereo mismatch problem

9 years agoBringing back min_bins=3 for now
Jean-Marc Valin [Wed, 30 Sep 2009 03:16:26 +0000 (23:16 -0400)]
Bringing back min_bins=3 for now

9 years agoTuning the spreading rotations
Jean-Marc Valin [Wed, 30 Sep 2009 02:35:32 +0000 (22:35 -0400)]
Tuning the spreading rotations

9 years agoMore simplifications from denorm pitch
Jean-Marc Valin [Mon, 28 Sep 2009 23:17:34 +0000 (19:17 -0400)]
More simplifications from denorm pitch

10 years agoRemoved code that is no longer necessary with denorm pitch and spreading
Jean-Marc Valin [Fri, 18 Sep 2009 02:38:34 +0000 (22:38 -0400)]
Removed code that is no longer necessary with denorm pitch and spreading

10 years agoenabling denorm pitch only at low bit-rate
Jean-Marc Valin [Wed, 16 Sep 2009 11:57:17 +0000 (07:57 -0400)]
enabling denorm pitch only at low bit-rate

10 years agofixed-point: denorm pitch converted
Jean-Marc Valin [Wed, 16 Sep 2009 03:39:27 +0000 (23:39 -0400)]
fixed-point: denorm pitch converted

10 years agodenorm pitch works in fixed-point (though there's still some floats left)
Jean-Marc Valin [Wed, 16 Sep 2009 02:38:40 +0000 (22:38 -0400)]
denorm pitch works in fixed-point (though there's still some floats left)

10 years agodoing pitch in denormalized domain
Jean-Marc Valin [Tue, 15 Sep 2009 02:50:41 +0000 (22:50 -0400)]
doing pitch in denormalized domain

10 years agoremoved unused #ifdefs
Jean-Marc Valin [Mon, 14 Sep 2009 00:15:24 +0000 (20:15 -0400)]
removed unused #ifdefs

10 years agoOnly calling intra_fold() when there's no pulse allocated
Jean-Marc Valin [Sat, 12 Sep 2009 00:28:29 +0000 (20:28 -0400)]
Only calling intra_fold() when there's no pulse allocated

10 years agoRe-introducing the successive rotations as a way to control low-bitrate
Jean-Marc Valin [Sat, 29 Aug 2009 21:52:03 +0000 (22:52 +0100)]
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.

10 years agoBetter fading for PLC: no fading for the first loss, muting after 6
Jean-Marc Valin [Thu, 13 Aug 2009 01:34:01 +0000 (21:34 -0400)]
Better fading for PLC: no fading for the first loss, muting after 6

10 years agoDisabling some checks for the C55
Jean-Marc Valin [Thu, 13 Aug 2009 00:29:57 +0000 (20:29 -0400)]
Disabling some checks for the C55

10 years agoMaking it possible to use the C64x FFT
Jean-Marc Valin [Wed, 12 Aug 2009 02:12:50 +0000 (22:12 -0400)]
Making it possible to use the C64x FFT

10 years agoForcing side to be orthogonal to mid for N=2. This saves one degree of freedom.
Jean-Marc Valin [Tue, 21 Jul 2009 03:33:40 +0000 (23:33 -0400)]
Forcing side to be orthogonal to mid for N=2. This saves one degree of freedom.

10 years agoMaking sure each band has a width that's a multiple of the number of MDCTs
Jean-Marc Valin [Mon, 20 Jul 2009 01:07:12 +0000 (21:07 -0400)]
Making sure each band has a width that's a multiple of the number of MDCTs

10 years agoFixes typo in C6x macro.
Jean-Marc Valin [Sun, 9 Aug 2009 13:21:48 +0000 (09:21 -0400)]
Fixes typo in C6x macro.

10 years agoC89 and 16-bit fixes
Jean-Marc Valin [Sat, 8 Aug 2009 17:23:03 +0000 (13:23 -0400)]
C89 and 16-bit fixes

10 years agoAllocating enough mem in celtenc/celtdec to handle 1024-sample frames
Jean-Marc Valin [Sat, 1 Aug 2009 21:22:51 +0000 (23:22 +0200)]
Allocating enough mem in celtenc/celtdec to handle 1024-sample frames

10 years agoThis fixes a VBR bug introduced by raw bits. We should not write any raw
Jean-Marc Valin [Sat, 1 Aug 2009 21:05:47 +0000 (23:05 +0200)]
This fixes a VBR bug introduced by raw bits. We should not write any raw
bit before the rate is decided (otherwise they'll end up at the wrong place)
and we have to shrink the byte buffer before writing raw bits.

10 years agoChanging some code to use BITRES directly instead of its value.
Jean-Marc Valin [Sun, 26 Jul 2009 00:42:24 +0000 (20:42 -0400)]
Changing some code to use BITRES directly instead of its value.

10 years agoRaw bits encoding/decoding functions renamed to *_raw() and re-introducing
Jean-Marc Valin [Sun, 26 Jul 2009 00:16:01 +0000 (20:16 -0400)]
Raw bits encoding/decoding functions renamed to *_raw() and re-introducing
original ec_encode_bin()/ec_decode_bin() to optimize performance when ft is
a power of two.

10 years agoRaw bits enabled for the multiply-free range coder too.
Jean-Marc Valin [Fri, 24 Oct 2008 00:07:18 +0000 (20:07 -0400)]
Raw bits enabled for the multiply-free range coder too.

10 years agoImplemented "raw bits"
Jean-Marc Valin [Thu, 18 Jun 2009 03:23:46 +0000 (23:23 -0400)]
Implemented "raw bits"

Making it so all the information encoded directly with ec_enc_bits() gets
stored at the end of the stream, without going through the range coder. This
should be both faster and reduce the effects of bit errors.

Conflicts:

tests/ectest.c

10 years agoChange end-of-stream handling in the range coder.
Timothy B. Terriberry [Sun, 19 Oct 2008 18:41:38 +0000 (14:41 -0400)]
Change end-of-stream handling in the range coder.

Instead of trying to maximize the number of trailing zeros (minimize the number
 of bits encoded), we try to maximize the number of trailing bits that can
 contain arbitrary data.
Note that this requires ec_enc_tell() and ec_dec_tell() to reserve an extra
 bit, since depending on the exact final codeword, as little as half the final
 range might be available for storing arbitrary data.
This is the first step needed to start packing literal bits outside the range
 coder (for speed and robustness purposes).

10 years agoReducing the size of the pulses->bits cache by restricting the number of pulses
Jean-Marc Valin [Wed, 22 Jul 2009 11:48:35 +0000 (07:48 -0400)]
Reducing the size of the pulses->bits cache by restricting the number of pulses
possible

10 years agoC89 compatibility fixes for pseudo-stack mode.
Jean-Marc Valin [Tue, 21 Jul 2009 03:40:35 +0000 (23:40 -0400)]
C89 compatibility fixes for pseudo-stack mode.

Conflicts:

libcelt/celt.c

10 years agoBump version number to 0.6.1
Jean-Marc Valin [Tue, 14 Jul 2009 00:37:06 +0000 (20:37 -0400)]
Bump version number to 0.6.1

10 years agoAllocating 100k for the pseudo stack so we're sure to be (more than) safe
Jean-Marc Valin [Mon, 13 Jul 2009 21:50:59 +0000 (17:50 -0400)]
Allocating 100k for the pseudo stack so we're sure to be (more than) safe

10 years agoietf doc: Last minute changes to the drafts
Jean-Marc Valin [Mon, 13 Jul 2009 19:40:17 +0000 (15:40 -0400)]
ietf doc: Last minute changes to the drafts

10 years agoClarifying the transient time-domain pre-emphasis and energy prediction to
Jean-Marc Valin [Mon, 13 Jul 2009 15:10:02 +0000 (11:10 -0400)]
Clarifying the transient time-domain pre-emphasis and energy prediction to
address Koen Vos' comments.

10 years agoUpdating draft to match latest code changes
Jean-Marc Valin [Mon, 13 Jul 2009 02:19:31 +0000 (22:19 -0400)]
Updating draft to match latest code changes

10 years agoUsing normalised M/S stereo data for folding and use separate folding gains
Jean-Marc Valin [Mon, 13 Jul 2009 00:41:29 +0000 (20:41 -0400)]
Using normalised M/S stereo data for folding and use separate folding gains
for M and S.

10 years agoThis patch makes it safe to call the encode / decode functions with a NULL pointer...
Gregory Maxwell [Thu, 9 Jul 2009 21:07:24 +0000 (17:07 -0400)]
This patch makes it safe to call the encode / decode functions with a NULL pointer in place of the pcm buffer.

10 years agoUsing MS stereo for all bands, fixing a few bugs in the stereo folding
Jean-Marc Valin [Sun, 12 Jul 2009 04:58:50 +0000 (00:58 -0400)]
Using MS stereo for all bands, fixing a few bugs in the stereo folding

10 years agoietf doc: clarifications
Jean-Marc Valin [Fri, 10 Jul 2009 15:51:44 +0000 (11:51 -0400)]
ietf doc: clarifications