Jean-Marc Valin
c39bb8ab8c
Removes unused function parameters
2011-01-26 10:50:55 -05:00
Jean-Marc Valin
ad3d813f01
Stop uselessly calling haar1() when resynth=0
...
This was computing on uninitialized data (though the result was never
used)
2011-01-22 21:22:03 -05:00
Jean-Marc Valin
63fb61f176
Using previous range coder state for PRNG
...
This provides more entropy and allows some more flexibility on the
encoder side.
2011-01-20 23:29:05 -05:00
Timothy B. Terriberry
21af73eb21
Make collapse-detection bitexact.
...
Jean-Marc's original anti-collapse patch used a threshold on the
content of a decoded band to determine whether or not it should
be filled with random noise.
Since this is highly sensitive to the accuracy of the
implementation, it could lead to significant decoder output
differences even if decoding error up to that point was relatively
small.
This patch detects collapsed bands from the output of the vector
quantizer, using exact integer arithmetic.
It makes two simplifying assumptions:
a) If either input to haar1() is non-zero during TF resolution
adjustments, then the output will be non-zero.
b) If the content of a block is non-zero in any of the bands that
are used for folding, then the folded output will be non-zero.
b) in particular is likely to be false when SPREAD_NONE is used.
It also ignores the case where mid and side are orthogonal in
stereo_merge, but this is relatively unlikely.
This misses just over 3% of the cases that Jean-Marc's anti-collapse
detection strategy would catch, but does not mis-classify any (all
detected collapses are true collapses).
This patch overloads the "fill" parameter to mark which blocks have
non-zero content for folding.
As a consequence, if a set of blocks on one side of a split has
collapsed, _no_ folding is done: the result would be zero anyway,
except for short blocks with SPREAD_AGGRESSIVE that are split down
to a single block, but a) that means a lot of bits were available
so a collapse is unlikely and b) anti-collapse can fill the block
anyway, if it's used.
This also means that if itheta==0 or itheta==16384, we no longer
fold at all on that side (even with long blocks), since we'd be
multiplying the result by zero anyway.
2011-01-19 19:43:08 -05:00
Timothy B. Terriberry
320cf2e2cd
Re-organize spreading/folding constants.
...
These were stored internally in one order and in the bitstream in a
different order.
Both used bare constants, making it unclear what either actually
meant.
This changes them to use the same order, gives them named constants,
and renames all the "fold" decision stuff to "spread" instead,
since that is what it is really controlling.
2010-12-17 10:35:51 -05:00
Jean-Marc Valin
85bbab0b4a
Fixes a fixed-point overflow in stereo angle calculation
2010-12-09 15:23:45 -05:00
Jean-Marc Valin
9b4ed5e290
Implementing intensity stereo.
...
There's no explicit signaling for it yet.
2010-11-24 18:01:20 -05:00
Jean-Marc Valin
3295b5d56b
Folding code moved to quant_band() to prevent duplication.
2010-10-15 23:43:45 -04:00
Jean-Marc Valin
c4711e4e11
More VQ search simplifications
2010-10-15 23:31:06 -04:00
Jean-Marc Valin
bbc010c4f3
Removing yshift from the fixed-point VQ search
2010-10-15 22:55:35 -04:00
Jean-Marc Valin
3d25e71b40
More simplifications to the VQ search
2010-10-15 22:45:02 -04:00
Jean-Marc Valin
aca7a63040
VQ search no longer needs to put more than one pulse at a time
2010-10-15 22:06:36 -04:00
Jean-Marc Valin
ccd51fe947
No longer filling the stereo side with noise.
2010-10-13 11:48:17 -04:00
Jean-Marc Valin
009978ee6c
Moves the bit-side gain application to the quantizer
2010-09-13 11:05:08 -04:00
Jean-Marc Valin
eea914cb88
Simplifies vector renormalisation (and using it less)
2010-09-12 20:11:32 -04:00
Jean-Marc Valin
736efd6909
Fixes some MSVC warnings
2010-08-31 11:52:45 -04:00
Jean-Marc Valin
d38d6b9aa1
Implemented variable spreading amount in the decoder
...
Decision not yet implemented in the encoder
2010-08-07 09:21:32 -04:00
Timothy B. Terriberry
828da91d66
Minor simplification to exp_rotation().
2010-08-06 21:43:49 -04:00
Jean-Marc Valin
39ffbeec9a
Comments
2010-08-06 07:40:11 -04:00
Jean-Marc Valin
6f1cbca519
More cleanup
2010-07-24 22:06:29 -04:00
Jean-Marc Valin
f276b23415
Using random noise in upper bands when signal is "normal"
2010-07-24 17:13:17 -04:00
Jean-Marc Valin
ea245c5ca9
Fixed C99-style declaration
2010-07-06 20:25:54 -04:00
Jean-Marc Valin
67217ee746
Splitting transients in time domain
2010-05-21 13:58:51 -04:00
Jean-Marc Valin
2123f358b1
Cleaning up the folding code.
...
Folding now moved to alg_quant() and alg_unquant(). No more funny short block
alignment checks because bands now have to be aligned.
2010-05-09 19:45:31 -04:00
Jean-Marc Valin
65ee67ac55
Making the band definition the same at all frame sizes.
2010-04-26 07:08:44 -04:00
Jean-Marc Valin
8271dc8a22
Tuning the amount of spreading based on Koen's feedback
2010-04-20 00:47:22 -04:00
Jean-Marc Valin
b8ba70c99b
Disabling resynthesis when not needed (need to remove folding for this to work)
2010-04-18 22:10:24 -04:00
Jean-Marc Valin
b8a06ee00d
Re-introducing the successive spreading rotations, but in a two-step
...
scheme. Keeping Hadamard as an option (disabled for now) for transients.
2010-04-18 09:57:42 -04:00
Jean-Marc Valin
65a487069d
Corrected some non-sensical code
2010-04-17 17:29:03 -04:00
Jean-Marc Valin
628c025373
Converted a few double-precision constants to single precision
2010-04-16 20:57:56 -04:00
Jean-Marc Valin
137f3366bc
Changed compute_allocation_table() so it handles ebands that start and end in the same allocation band. Also fixed a minor C89 issue.
2010-04-14 17:42:22 -04:00
Jean-Marc Valin
9a92d61ee8
A bit more tuning on the pseudo-frac-Hadamard. Also Trying to improve
...
transient spreading.
2010-04-06 20:33:12 -04:00
Jean-Marc Valin
354bf60b04
Doing the spreading with a "pseudo-fractional-Hadamard" transform
2010-04-03 09:23:29 -04:00
Jean-Marc Valin
c7b01bad50
fixed-point: slightly increasing the decoder accuracy again
2010-03-19 23:17:28 -04:00
Jean-Marc Valin
3a4a463f0a
fixed-point: Further reduction in mismatch
2010-03-15 22:55:51 -04:00
Jean-Marc Valin
3a0bc3d95c
Allowing CELT to skip the low frequencies
2010-02-25 22:46:55 -05:00
Timothy Terriberry
8c7bb4c9c7
Expose the normalized range for reciprocal square roots in fixed-point mode. This allows subsequnt calculations to use the full precision of the result.
2009-10-31 13:35:40 -04:00
Jean-Marc Valin
a3803a98af
misc minor changes
2009-10-24 11:24:34 -04:00
Jean-Marc Valin
73bf6332ed
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).
2009-10-20 07:22:04 -04:00
Jean-Marc Valin
234969c903
Removed the _t from all the celt*_t types to avoid clashing with POSIX
2009-10-17 22:12:42 -04:00
Jean-Marc Valin
8b2ff0da5a
Updated copyright notices
2009-10-17 21:40:10 -04:00
Jean-Marc Valin
f7a1e165aa
Renamed mix_pitch_and_residual() to normalise_residual(), after minor
...
simplification.
2009-10-07 06:56:03 -04:00
Jean-Marc Valin
f6dc1eba26
Further simplifications to mix_pitch_and_residual() (which no longer does
...
anything that its name implies)
2009-10-06 20:08:49 -04:00
Jean-Marc Valin
1e3263a267
Fix for some test program compat and an assertion that didn't make sense anymore
2009-10-02 17:48:25 -04:00
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
75732de1a7
Tuning the spreading rotations
2009-09-29 22:35:32 -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
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
164a229644
Reducing the size of the pulses->bits cache by restricting the number of pulses
...
possible
2009-07-23 07:24:03 -04:00