9 years agoSetting fine_priority for skipped bands
Jean-Marc Valin [Thu, 16 Dec 2010 18:07:29 +0000 (13:07 -0500)]
Setting fine_priority for skipped bands

9 years agoRebalance N=1 allocations during interp_bits2pulses().
Timothy B. Terriberry [Thu, 16 Dec 2010 16:39:37 +0000 (08:39 -0800)]
Rebalance N=1 allocations during interp_bits2pulses().

Excess fractions of a bit can't be re-used in N=1 bands during
 quant_all_bands() because there's no shape, only a sign bit.
This meant that all the fractional bits in these bands accumulated,
 often up to 5 or 6 bits for stereo, until the first band with N>1,
 where they were dumped all at once.
This patch moves the rebalancing for N=1 bands to
 interp_bits2pulses() instead, where excess bits still have a
 chance to be moved into fine energy.

9 years agoChange strategies for allocation hole prevention.
Timothy B. Terriberry [Thu, 16 Dec 2010 04:46:09 +0000 (20:46 -0800)]
Change strategies for allocation hole prevention.

In commit ffe10574 JM added a "done" flag to the allocation
 interpolation loop: whenver a band did not have enough bits to
 pass its threshold for receiving PVQ pulses, all of the rest of
 band were given just enough bits for fine energy only.
This patch implements JM's "backwards done" idea: instead work
 backwards, dropping bands until the first band that is over the
 threshold is encountered, and don't artificially reduce the
 allocation any more after that.
This is much more stable: we can continue to signal manual skips if
 we want to, but we aren't forced to skip a large number of bands
 because of an isolated hole in he allocation.

This makes low-bitrate 120-sample frames much less rough.
It also reduces the force skip threshold from
 alloc_floor+(1<<BITRES)+1 to just alloc_floor+(1<<BITRES), because
 the former can now cascade to cause many bands to be skipped.
The difference here is subtle, and increases signaling overhead by
 0.11% of the total bitrate, but Monty confirmed that removing the
 +1 reduces noise in the bass (i.e., in N=1 bands where such a skip
 could cascade).

Finally the 64*C<<BITRES<<LM ceiling is moved into the bisection
 search, instead of just being imposed afterwards, again because I
 wouldn't want to try to explain in a spec why they're different.

9 years agoMore compute_allocation() fixes.
Timothy B. Terriberry [Wed, 15 Dec 2010 16:22:14 +0000 (08:22 -0800)]
More compute_allocation() fixes.

1) Continue to update left and percoeff if we skip all the way to the
    first band.
   This doesn't actually matter for correctness, but I don't want to
    try to explain in a spec why we aren't doing this.
2) Force all the bits in skipped bands to go to fine energy.
   Before some of them could continue to be given to pulses, even though no
    pulses would actually be allocate for them.

9 years agoStore the total budget of compute_allocation in BITRES units.
Timothy B. Terriberry [Wed, 15 Dec 2010 14:56:00 +0000 (06:56 -0800)]
Store the total budget of compute_allocation in BITRES units.

The margin of safety was supposed to be 1/8th bit, not 1 bit, and the
 bit we reserved to terminate skip signalling before was actually 8
This patch updates the margin of safety to the correct value and
 accounts for the one bit (not 8) needed for skip signalling.
It also fixes the remainder calculation in the skip loop to work
 correctly when start>0.

9 years agoDon't stop force-skipping on the first manually skipped band.
Timothy B. Terriberry [Wed, 15 Dec 2010 13:35:54 +0000 (05:35 -0800)]
Don't stop force-skipping on the first manually skipped band.

Now that manual skipping is in the same loop as forced skipping, there
 is no reason to do all of one, then all of the other.
This ensures we won't propagate bits to bands that have almost nothing
 later in quant_all_bands() because we didn't have enough bits to
 signal them skipped.

9 years agoMove skip coding into interp_bits2pulses().
Timothy B. Terriberry [Wed, 15 Dec 2010 13:12:43 +0000 (05:12 -0800)]
Move skip coding into interp_bits2pulses().

This allows us to a) not pay a coding cost to avoid skipping bands that are
 stupid to skip (e.g., the first band, or bands that have so few bits that we
 wouldn't redistribute anything) and b) not reserve bits to pay that cost.

9 years agoMore allocation function updates.
Timothy B. Terriberry [Wed, 15 Dec 2010 05:55:49 +0000 (21:55 -0800)]
More allocation function updates.

This moves more of the decisions about when to stop skipping bands into the
 encoder-specific branch, so they are not forced in the decoder (because there
 is currently no bit-savings from forcing them).
It also no longer requires an extra bit to code the fine energy in a skipped
 band: that was meant to account for the skip flag, but we already subtracted

9 years agoTim just rewrote half of the bit allocator -- hope it works now
Jean-Marc Valin [Wed, 15 Dec 2010 05:36:41 +0000 (00:36 -0500)]
Tim just rewrote half of the bit allocator -- hope it works now

Making sure we never waste bits due to band skip and also making
sure we don't skip bands "in the middle".

9 years agoThis fixes a bunch of bit allocation bugs
Jean-Marc Valin [Tue, 14 Dec 2010 21:41:03 +0000 (16:41 -0500)]
This fixes a bunch of bit allocation bugs

Now properly (I think) handling thresh[] and skipping

9 years agoMore negative bits prevention
Jean-Marc Valin [Tue, 14 Dec 2010 20:02:21 +0000 (15:02 -0500)]
More negative bits prevention

9 years agoPreventing negative bit allocation
Jean-Marc Valin [Tue, 14 Dec 2010 18:39:30 +0000 (13:39 -0500)]
Preventing negative bit allocation

9 years agoTuning for 2.5 ms frames
Jean-Marc Valin [Tue, 14 Dec 2010 16:53:39 +0000 (11:53 -0500)]
Tuning for 2.5 ms frames

9 years agoFix 2-phase stereo in the encoder
Jean-Marc Valin [Mon, 13 Dec 2010 21:56:35 +0000 (16:56 -0500)]
Fix 2-phase stereo in the encoder

9 years agoUsing overlap=shortMdctSize even for 2.5 ms frames.
Jean-Marc Valin [Mon, 13 Dec 2010 18:50:29 +0000 (13:50 -0500)]
Using overlap=shortMdctSize even for 2.5 ms frames.

And fixed a post-filter bug for that special case.

9 years agoAdapting the allocation trim based on the spectral tilt
Jean-Marc Valin [Fri, 10 Dec 2010 22:18:17 +0000 (17:18 -0500)]
Adapting the allocation trim based on the spectral tilt

9 years agoAdding some hysteresis on the folding threshold frequency
Jean-Marc Valin [Fri, 10 Dec 2010 04:23:34 +0000 (23:23 -0500)]
Adding some hysteresis on the folding threshold frequency

This adds some side-information that can be used to change the
threshold freq arbitrarily.

9 years agoFixes a fixed-point overflow in stereo angle calculation
Jean-Marc Valin [Thu, 9 Dec 2010 20:23:45 +0000 (15:23 -0500)]
Fixes a fixed-point overflow in stereo angle calculation

9 years agoCompletely new transient analysis algorithm
Jean-Marc Valin [Thu, 9 Dec 2010 19:28:26 +0000 (14:28 -0500)]
Completely new transient analysis algorithm

Should be more robust to closely-spaced transients

9 years agoSimplifying the allocation code and making sure both channels get a bit
Jean-Marc Valin [Wed, 8 Dec 2010 16:06:09 +0000 (11:06 -0500)]
Simplifying the allocation code and making sure both channels get a bit

9 years agoTake into accound the 32-bit limit in the VQ
Jean-Marc Valin [Tue, 7 Dec 2010 02:31:15 +0000 (21:31 -0500)]
Take into accound the 32-bit limit in the VQ

This reduces waste at high bit-rate

9 years agoAdd API support for unconstrained VBR
Jean-Marc Valin [Sun, 5 Dec 2010 22:22:06 +0000 (17:22 -0500)]
Add API support for unconstrained VBR

celtenc now defaults to unconstrained VBR.

9 years agoKeeping the allocation of the intensity-codec bands
Jean-Marc Valin [Sat, 4 Dec 2010 15:27:22 +0000 (10:27 -0500)]
Keeping the allocation of the intensity-codec bands

Also some code to select between constrained and unconstrained VBR

9 years agoMaking VBR slightly exceed the budget rather than fail
Jean-Marc Valin [Fri, 3 Dec 2010 20:20:11 +0000 (15:20 -0500)]
Making VBR slightly exceed the budget rather than fail

9 years agoFixing the most obvious problems with the VBR code
Jean-Marc Valin [Fri, 3 Dec 2010 19:35:59 +0000 (14:35 -0500)]
Fixing the most obvious problems with the VBR code

9 years agoFixes some side-information rate control issues in VBR mode
Jean-Marc Valin [Thu, 2 Dec 2010 21:09:51 +0000 (16:09 -0500)]
Fixes some side-information rate control issues in VBR mode

9 years agoAdding a dual stereo option.
Jean-Marc Valin [Thu, 2 Dec 2010 18:46:48 +0000 (13:46 -0500)]
Adding a dual stereo option.

Left and right are coded independently.

9 years agonothing to see here
Jean-Marc Valin [Wed, 1 Dec 2010 23:45:45 +0000 (18:45 -0500)]
nothing to see here

9 years agoFix totally broken bit allocation for non-mainstream modes (e.g. powers of two).
Jean-Marc Valin [Wed, 1 Dec 2010 21:11:38 +0000 (16:11 -0500)]
Fix totally broken bit allocation for non-mainstream modes (e.g. powers of two).

Also, making per-band dynamic allocation less aggressive.

9 years agoBetter tuning for 5 ms frames
Jean-Marc Valin [Wed, 1 Dec 2010 19:54:10 +0000 (14:54 -0500)]
Better tuning for 5 ms frames

9 years agoIncreasing resolution of the alloc trim
Jean-Marc Valin [Wed, 1 Dec 2010 02:08:31 +0000 (21:08 -0500)]
Increasing resolution of the alloc trim

9 years agoTuning higher bit-rate to behave a bit more like Vorbis.
Jean-Marc Valin [Tue, 30 Nov 2010 20:31:45 +0000 (15:31 -0500)]
Tuning higher bit-rate to behave a bit more like Vorbis.

9 years agoIntensity stereo now in the bit-stream
Jean-Marc Valin [Fri, 26 Nov 2010 15:32:03 +0000 (10:32 -0500)]
Intensity stereo now in the bit-stream

Bands that are intensity-coded also get less bits than the others

9 years agoAllocate remaining bits with constant SNR offset
Jean-Marc Valin [Thu, 25 Nov 2010 21:32:54 +0000 (16:32 -0500)]
Allocate remaining bits with constant SNR offset

9 years agoImplementing intensity stereo.
Jean-Marc Valin [Wed, 24 Nov 2010 23:01:20 +0000 (18:01 -0500)]
Implementing intensity stereo.

There's no explicit signaling for it yet.

9 years agoTuning the allocation trim_offset for shorter frames
Jean-Marc Valin [Wed, 24 Nov 2010 22:43:38 +0000 (17:43 -0500)]
Tuning the allocation trim_offset for shorter frames

9 years agoMinor tuning to the last band
Jean-Marc Valin [Fri, 19 Nov 2010 19:43:05 +0000 (14:43 -0500)]
Minor tuning to the last band

9 years agoNew bit allocation tuning now enabled by default
Jean-Marc Valin [Fri, 19 Nov 2010 19:06:10 +0000 (14:06 -0500)]
New bit allocation tuning now enabled by default

9 years agoBit allocation wotk.
Jean-Marc Valin [Fri, 19 Nov 2010 16:45:37 +0000 (11:45 -0500)]
Bit allocation wotk.

Mimimum resolution is now 1/4 bit/sample instead of 3/8. The allocation
tilt now gives more LF bits for small frame sizes. There's also a new
"alternate" allocation that should soon replace the current one.

9 years agoGood catch by John Ridges
Jean-Marc Valin [Tue, 16 Nov 2010 15:55:38 +0000 (10:55 -0500)]
Good catch by John Ridges

9 years agoAdd coarse energy entropy model tuning.
Timothy B. Terriberry [Tue, 9 Nov 2010 09:43:18 +0000 (01:43 -0800)]
Add coarse energy entropy model tuning.

This tunes the entropy model for coarse energy introduced in commit
It uses a constant set of parameters, tuned from about an hour and a
 half of randomly selected test data encoded for each frame size,
 prediction type (inter/intra), and band number.
These will be slightly sub-optimal for different frame sizes, but
 should be better than what we were using.

For inter, this saves an average of 2.8, 5.2, 7.1, and 6.7 bits/frame
 for frame sizes of 120, 240, 480, and 960, respectively.
For intra, this saves an average of 1.5, 3.0, 4.5, and 5.3 bits/frame
 (for the same frame sizes, respectively).

9 years ago0.9.1 release
Jean-Marc Valin [Mon, 8 Nov 2010 16:13:06 +0000 (00:13 +0800)]
0.9.1 release

9 years agoFixes several fixed-point overflows in the PLC code
Jean-Marc Valin [Sun, 7 Nov 2010 02:02:32 +0000 (22:02 -0400)]
Fixes several fixed-point overflows in the PLC code

9 years agoFixes a silly fixed-point scaling PLC bug
Jean-Marc Valin [Sun, 7 Nov 2010 01:41:40 +0000 (21:41 -0400)]
Fixes a silly fixed-point scaling PLC bug

9 years agoGiving up on reusing the saved overlap in the PLC
Jean-Marc Valin [Sun, 7 Nov 2010 00:30:17 +0000 (20:30 -0400)]
Giving up on reusing the saved overlap in the PLC

9 years agoPLC fixes
Jean-Marc Valin [Sat, 6 Nov 2010 22:11:06 +0000 (18:11 -0400)]
PLC fixes

Fixed an off-by-one in the handling of the IIR filter memory and
disabled "TDAC blending" at the beginning of a lost packet until it
can be made to work properly.

9 years agoAdding float|fixed suffixes to static mode files
Jean-Marc Valin [Sat, 6 Nov 2010 16:11:18 +0000 (12:11 -0400)]
Adding float|fixed suffixes to static mode files

9 years agoIncreases the probability of alloc_trim==2 to reflect the latest changes
Jean-Marc Valin [Fri, 5 Nov 2010 18:55:55 +0000 (14:55 -0400)]
Increases the probability of alloc_trim==2 to reflect the latest changes

9 years agoMinor tuning
Jean-Marc Valin [Fri, 5 Nov 2010 15:39:50 +0000 (11:39 -0400)]
Minor tuning

9 years agoSwitch iteration over channels to the do{}while(); construct in order to inform the...
Gregory Maxwell [Fri, 5 Nov 2010 00:45:09 +0000 (20:45 -0400)]
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.)

9 years agoEliminate some promotions to double. A fair number of implicit promotions remain...
Gregory Maxwell [Fri, 5 Nov 2010 00:14:19 +0000 (20:14 -0400)]
Eliminate some promotions to double. A fair number of implicit promotions remain but they all involve math functions which exist only as double precision form in C89.

9 years agoMake sure that we always code the sign of N=1 bands
Jean-Marc Valin [Thu, 4 Nov 2010 19:59:44 +0000 (15:59 -0400)]
Make sure that we always code the sign of N=1 bands

(unless there's no bit left at all in the frame)

9 years agoFixes some stereo issues where the right channel wasn't taken into account
Jean-Marc Valin [Thu, 4 Nov 2010 19:15:54 +0000 (15:15 -0400)]
Fixes some stereo issues where the right channel wasn't taken into account

9 years agoSquashed commit of the following:
Jean-Marc Valin [Thu, 4 Nov 2010 17:24:44 +0000 (13:24 -0400)]
Squashed commit of the following:

commit a2cc77cb2744a2cb0551b9bfdf06b97457b6d449
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Thu Nov 4 13:11:21 2010 -0400

    Adding a switch to enable the post-filter (off by default)

commit 8e860dc0dfbe57e59fcbd5352588c5edff020e27
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Thu Nov 4 11:57:12 2010 -0400

    Allowing pitches up to 3000 Hz

commit 837412d37bbca32bb34bfb5941e132ff4b0a568c
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Wed Nov 3 20:47:11 2010 -0400

    Pitch estimation tuning to prevent some cases of pitch halving

commit 34e20f24c85b40fffd1a15c5b632f2f78b26f081
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Nov 3 16:31:51 2010 -0400

    Resynthesis now purely a compile-time option with RESYNTH

commit d83fb5a9cc2ec4b6cce938662997643da1c5ed0d
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Nov 3 16:28:25 2010 -0400

    Fixes a divide by zero in remove_doubling()

commit bb91e05b7f8f91fd15a8a0daae3d8cb6bd8d81db
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Nov 3 15:55:48 2010 -0400

    Bring back resynthesis with RESYNTH macro

commit 31fe6f6b4997af0a46b8c62f523fe2dfdb7f56ae
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Tue Nov 2 17:55:04 2010 -0400

    Tuning the allocation tilt to give more bits to higher frequencies.

    Especially useful now that the post-filter can reduce low freq noise.

commit 919ba48f0369a87885334756cdfac2a448ce52d0
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 17:27:19 2010 -0400

    C89 fix

commit ee0dbb1855a82ee8c132ddaffcab4d072bb3455e
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 11:45:10 2010 -0400

    Complete fixed-point port of the pitch code (I think).

commit 4c7b3fd12a8f7469607b5ac57c85301a5de9fa81
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 10:55:43 2010 -0400

    More fixed-point pitch gain work

commit 26f1412188900199b63e187fcb0bd04db53c898a
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Nov 1 10:39:25 2010 -0400

    Fixed-point version of the pitch gain calculation code

commit 27c73d008e9f50d282c3ad08e2f05f7006013ae1
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Oct 31 16:50:26 2010 -0400

    Some more fixed-point work in remove_doubling()

commit 59354672cb3af794a0e46c0b2097d6441c75cdd1
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Oct 31 09:57:36 2010 -0400

    Fixed a stupid fixed-point pf bug in the gain handling

commit be9e7dabf6c8b32bc049da260b58ff6085dc1ac3
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sat Oct 30 01:52:09 2010 -0400

    Fixed-point: fixed frac_div32() that was broken a few commits ago.

commit 5b06270afc41a88915252cea14411be43650e704
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 17:45:44 2010 -0400

    This fixes VBR when encoding the pitch period with raw bits

commit 10e0488458ae558aa80d0b30cce70841ad081f73
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 16:50:31 2010 -0400

    Pitch period is now encoder with equal probability for each octave (rather than each lag).

    Max pitch gain allowed is now 0.625.

commit ca19396c1c1511c0e208b400efb51384fc7c200d
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 16:00:01 2010 -0400

    More fixed-point post-filter work

commit f3e42fde1b575bc587b2557b8b31a6085421a99c
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 14:39:23 2010 -0400

    More fixed-point work for the prefilter/postfilter

commit db945132d12b25ff25acc0701b91a1d8a81417d5
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 14:14:02 2010 -0400

    Making the pitch estimation work in fixed-point

    Even if there's still lots of float operations left.

commit acb3f96e04802ac4601295f83bef1f32593e261a
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Fri Oct 29 10:57:39 2010 -0400

    Making the PLC code consistent with the prefilter/postfilter

commit 8f64f5974ac846b8c35d0b692e0472f279206cf0
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Thu Oct 28 00:33:53 2010 -0400

    More tuning for remove_doubling()

commit 0c08f2ee9dcc135dd222fef30f5ad93e95e0d364
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 17:48:02 2010 -0400

    Doing an interpolation step to improve the accuracy of the pitch estimate

    Also increasing the gain slightly.

commit 23d303e992f1fdc3d2668652603ae6311d3b91c5
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 16:56:42 2010 -0400

    Implements a fixed 3-tap prefilter/postfilter to make the gain roll off with frequency

commit 881c5928adc1af9eb75c4b68e9eba94ab1d65adc
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 14:47:30 2010 -0400

    Partially whitening the down-sampled signal before the pitch search

commit 4a8687deea8587007f14051cb966f6fd748893a1
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 14:27:47 2010 -0400

    pitch_search() no longer computes the gain

commit a7f85bb6b10d9c509caec521ca444efb3f27df05
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 14:00:53 2010 -0400

    remove_doubling() now works on the down-sampled signal

commit 06cb70e876873f79fed214ebbca35cb4c5057ec8
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 11:28:53 2010 -0400

    Simplification to the pitch continuity code

commit 5201927c284a424eb8f21f63d358844b3de8c285
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Wed Oct 27 11:04:02 2010 -0400

    Some more pitch doubling prevention code

commit 7ef63fbe1f78f79e1923bc42e06fbdf1ec28ffd3
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Wed Oct 27 06:49:28 2010 -0400

    Minor fix

commit eb37eaab32e7df074a7ddf0ae4781e57f827c4ad
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Tue Oct 26 18:32:25 2010 -0400

    Enforcing some pitch continuity

commit 751ef6edf2ee7721252cedb264bdf9b3f6244a9d
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Tue Oct 26 17:29:47 2010 -0400

    Code for preventing pitch doubling/halving

commit c12647ecb55b645005efbeede91880db72936f8d
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Tue Oct 26 00:04:34 2010 -0400

    Finally getting perfect reconstruction when pitch changes

    Post-filter now delays the filter coefs by the overlap so that the pre-filter
    and post-filter are synchronised.

commit f854311d945bb375039a4a4a4fea782b648581f8
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Oct 25 14:59:13 2010 -0400

    Very simple/inefficient signalling of the prefilter period/gain

commit b4e1215432e3d89a29c998639a6d8b07e28c5a2a
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Oct 25 14:09:17 2010 -0400

    using the actual pitch gain

commit e7cd4f07bb073b6955a001e56c0bbf16156f4195
Author: Jean-Marc Valin <jean-marc.valin@octasic.com>
Date:   Mon Oct 25 12:16:11 2010 -0400

    Adding some pitch prediction though side information still isn't coded

commit 77a03aa27c9b6ed2fe80c27a1196b460ccb5079e
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Mon Oct 25 00:12:48 2010 -0400

    prefilter implemented as well

commit a3fd81b6ca213d4a9f8ddfa2883fd0e238d64d04
Author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Date:   Sun Oct 24 01:14:10 2010 -0400

    Implementing Raymond Chen's comb filter idea

    So far, only the post-filter is there.

9 years agoFixed the PLC, which had been broken for a while
Jean-Marc Valin [Thu, 28 Oct 2010 18:27:05 +0000 (14:27 -0400)]
Fixed the PLC, which had been broken for a while

Oops. The deemphasis was called on the wrong signal!

9 years agoFix crashes with VBR for short duration frames and very low bitrates. This may, howev...
Gregory Maxwell [Thu, 28 Oct 2010 19:00:37 +0000 (15:00 -0400)]
Fix crashes with VBR for short duration frames and very low bitrates. This may, however, cause the encoder to violate the rate target at insanely low rates.

This also generally improves VBR behavior by more carefully accounting
for rounding.

9 years agoSwitch example tools to use VBR and 960 sample frames by default on the basis that...
Gregory Maxwell [Thu, 28 Oct 2010 07:52:21 +0000 (03:52 -0400)]
Switch example tools to use VBR and 960 sample frames by default on the basis that if the user doesn't have any particular requirements that they probably want this.

Minor change in the VBR behavior to hot-start with some internal state
parameters which were observed to be quite consistent across bitrates,
framesizes, and content. This also prevents it from completely burning
the reserve capacity on the first frame if its a short.

Also switch some maximum frame sizes to match the OPUS draft maximums.

9 years agoFurther simplications to compute_mdcts()
Jean-Marc Valin [Sun, 24 Oct 2010 04:22:45 +0000 (00:22 -0400)]
Further simplications to compute_mdcts()

9 years agoDe-interleaves the MDCT input and overlap memory.
Jean-Marc Valin [Sun, 24 Oct 2010 04:08:16 +0000 (00:08 -0400)]
De-interleaves the MDCT input and overlap memory.

9 years agoTuning the allocation trim
Jean-Marc Valin [Fri, 22 Oct 2010 19:12:01 +0000 (15:12 -0400)]
Tuning the allocation trim

9 years agoReworked the allocation trim to be absolute (in bits/sample) rather relative
Jean-Marc Valin [Fri, 22 Oct 2010 18:57:07 +0000 (14:57 -0400)]
Reworked the allocation trim to be absolute (in bits/sample) rather relative

Also making use of alloc_trim_analysis() again because the effect of
inter-channel correlation on the bitstream is really in terms of absolute
number of bits/samples.

9 years agoPrevents a folding artefact due to "folding the folding"
Jean-Marc Valin [Thu, 21 Oct 2010 21:50:27 +0000 (17:50 -0400)]
Prevents a folding artefact due to "folding the folding"

9 years agoAlternate tuning found using exp_tuning_knobs (disabled by default)
Jean-Marc Valin [Thu, 21 Oct 2010 21:10:24 +0000 (17:10 -0400)]
Alternate tuning found using exp_tuning_knobs (disabled by default)

9 years agoTuning the folding bands.
Jean-Marc Valin [Thu, 21 Oct 2010 19:08:27 +0000 (15:08 -0400)]
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.

9 years agoallocation trim doesn't make sense for stereo after all
Jean-Marc Valin [Tue, 19 Oct 2010 20:40:24 +0000 (16:40 -0400)]
allocation trim doesn't make sense for stereo after all

9 years agoFirst shot at automatically adjusting the "allocation trim" for stereo.
Jean-Marc Valin [Tue, 19 Oct 2010 18:24:50 +0000 (14:24 -0400)]
First shot at automatically adjusting the "allocation trim" for stereo.

Also fixed a fixed-point breakage.

9 years agoSimplifying transient_analysis() now that we don't care about the time window
Jean-Marc Valin [Mon, 18 Oct 2010 21:27:56 +0000 (17:27 -0400)]
Simplifying transient_analysis() now that we don't care about the time window

9 years agoMaking sure we can use up to 128 pulses.
Jean-Marc Valin [Mon, 18 Oct 2010 20:20:00 +0000 (16:20 -0400)]
Making sure we can use up to 128 pulses.

Previous limit was effectively 120.

9 years agoRemoving renormalise_bands()
Jean-Marc Valin [Mon, 18 Oct 2010 19:26:46 +0000 (15:26 -0400)]
Removing renormalise_bands()

9 years agos/const/static const/
Jean-Marc Valin [Mon, 18 Oct 2010 19:10:33 +0000 (15:10 -0400)]
s/const/static const/

9 years agoRemoving both the transient window and the mdct_weight_shift.
Jean-Marc Valin [Mon, 18 Oct 2010 18:55:42 +0000 (14:55 -0400)]
Removing both the transient window and the mdct_weight_shift.

Both ended up causing more harm than good (e.g. violating energy conservation)
and provided little benefit. This also saves ~3 kB code size on x86-86.

9 years agoTurning off time-domain window pending decision on what to do with it.
Jean-Marc Valin [Mon, 18 Oct 2010 04:34:32 +0000 (00:34 -0400)]
Turning off time-domain window pending decision on what to do with it.

9 years agoRemoving dead code found by LLVM's static analysis
Jean-Marc Valin [Sun, 17 Oct 2010 20:25:56 +0000 (16:25 -0400)]
Removing dead code found by LLVM's static analysis

9 years agoOptimised float->int cast for Win64
John Ridges [Sat, 16 Oct 2010 22:00:54 +0000 (18:00 -0400)]
Optimised float->int cast for Win64

I've been compiling CELT for 64-bit Windows and it all seems to work
fine (with the occasional benign warning message) except for one place,
and that is in "float_cast.h" where there is some inline assembly
language that gets complied for Windows. Since the Microsoft 64-bit
compiler won't allow inline assembly language (and *still* doesn't have

9 years agoFixed fixed-point overflow for 2.5 ms frames.
Jean-Marc Valin [Sat, 16 Oct 2010 04:01:27 +0000 (00:01 -0400)]
Fixed fixed-point overflow for 2.5 ms frames.

9 years agoFolding code moved to quant_band() to prevent duplication.
Jean-Marc Valin [Sat, 16 Oct 2010 03:43:45 +0000 (23:43 -0400)]
Folding code moved to quant_band() to prevent duplication.

9 years agoMore VQ search simplifications
Jean-Marc Valin [Sat, 16 Oct 2010 03:31:06 +0000 (23:31 -0400)]
More VQ search simplifications

9 years agoRemoving yshift from the fixed-point VQ search
Jean-Marc Valin [Sat, 16 Oct 2010 02:55:35 +0000 (22:55 -0400)]
Removing yshift from the fixed-point VQ search

9 years agoMore simplifications to the VQ search
Jean-Marc Valin [Sat, 16 Oct 2010 02:45:02 +0000 (22:45 -0400)]
More simplifications to the VQ search

9 years agoVQ search no longer needs to put more than one pulse at a time
Jean-Marc Valin [Sat, 16 Oct 2010 02:06:36 +0000 (22:06 -0400)]
VQ search no longer needs to put more than one pulse at a time

9 years agotweaks to the split delta for transients
Jean-Marc Valin [Fri, 15 Oct 2010 21:45:33 +0000 (17:45 -0400)]
tweaks to the split delta for transients

9 years agoTransient detection fix for the case where a transient occurs during the overlap
Jean-Marc Valin [Fri, 15 Oct 2010 18:17:13 +0000 (14:17 -0400)]
Transient detection fix for the case where a transient occurs during the overlap

9 years agoTuning the bias for the L1 tf metric
Jean-Marc Valin [Fri, 15 Oct 2010 15:26:32 +0000 (11:26 -0400)]
Tuning the bias for the L1 tf metric

9 years agoUnb0rked the VBR code: several units issues that made VBR completely useless
Jean-Marc Valin [Fri, 15 Oct 2010 14:24:53 +0000 (10:24 -0400)]
Unb0rked the VBR code: several units issues that made VBR completely useless

9 years agoModifying the L1 metric for tf analysis by merging together all frequencies.
Jean-Marc Valin [Fri, 15 Oct 2010 06:18:47 +0000 (02:18 -0400)]
Modifying the L1 metric for tf analysis by merging together all frequencies.

Still need to make it use the right channel in stereo.

9 years agoMaking it possible to have two transients in a row for longer frames
Jean-Marc Valin [Wed, 13 Oct 2010 22:03:50 +0000 (18:03 -0400)]
Making it possible to have two transients in a row for longer frames

9 years agoAdding a high-pass filter in front of the transient analysis code
Jean-Marc Valin [Wed, 13 Oct 2010 21:32:57 +0000 (17:32 -0400)]
Adding a high-pass filter in front of the transient analysis code

9 years agoNo longer filling the stereo side with noise.
Jean-Marc Valin [Wed, 13 Oct 2010 15:48:17 +0000 (11:48 -0400)]
No longer filling the stereo side with noise.

9 years agoTaking into account TF decisions for VBR
Jean-Marc Valin [Wed, 13 Oct 2010 05:11:55 +0000 (01:11 -0400)]
Taking into account TF decisions for VBR

9 years agoNew TF decision code based on L1-norm. Needs more work.
Jean-Marc Valin [Wed, 13 Oct 2010 03:25:58 +0000 (23:25 -0400)]
New TF decision code based on L1-norm. Needs more work.

9 years agoDon't take into account silence for the coarse energy means
Jean-Marc Valin [Wed, 13 Oct 2010 02:18:09 +0000 (22:18 -0400)]
Don't take into account silence for the coarse energy means

9 years agoRemove lower bound on bit-rate for tf signalling
Jean-Marc Valin [Tue, 12 Oct 2010 18:55:16 +0000 (14:55 -0400)]
Remove lower bound on bit-rate for tf signalling

9 years agoDynamic allocation before VBR
Jean-Marc Valin [Sun, 10 Oct 2010 02:58:52 +0000 (22:58 -0400)]
Dynamic allocation before VBR

9 years agoRetrained coarse energy mean and beta coefficients
Jean-Marc Valin [Sun, 10 Oct 2010 01:07:51 +0000 (21:07 -0400)]
Retrained coarse energy mean and beta coefficients

9 years agoMaking the allocation slightly less insane at very high rate
Jean-Marc Valin [Mon, 4 Oct 2010 22:01:45 +0000 (18:01 -0400)]
Making the allocation slightly less insane at very high rate

9 years agoUsing high-band noise less aggressively
Jean-Marc Valin [Mon, 4 Oct 2010 18:45:59 +0000 (14:45 -0400)]
Using high-band noise less aggressively

9 years agoAllowing to change the allocation dynamically.
Jean-Marc Valin [Thu, 30 Sep 2010 14:16:22 +0000 (10:16 -0400)]
Allowing to change the allocation dynamically.

Uses a scaling factor that gets applied to the allocation matrix.



9 years agoUpdates tandem-test for more robust error reporting and additional frame sizes and...
Gregory Maxwell [Wed, 29 Sep 2010 22:56:32 +0000 (18:56 -0400)]
Updates tandem-test for more robust error reporting and additional frame sizes and sample rates.

9 years agoFixes a ibudget bust and a divide-by-zero at very low bit-rate
Jean-Marc Valin [Thu, 30 Sep 2010 00:05:36 +0000 (20:05 -0400)]
Fixes a ibudget bust and a divide-by-zero at very low bit-rate

9 years agoFixes a fixed-point overflow on 16-bit architectures
Jean-Marc Valin [Wed, 29 Sep 2010 22:05:20 +0000 (18:05 -0400)]
Fixes a fixed-point overflow on 16-bit architectures