Gregory Maxwell
40f956eed0
Various minor cleanups (removing dead arguments, macros) to libcelt/. Reinstate -Wunused-parameter.
2011-09-01 19:42:37 -04:00
Gregory Maxwell
ec8008b086
Adds many syntactically unnecessary casts to silence MSVC C4244; fix an MDCT encoder reset bug.
...
st->tonal_average was being set to 1 instead of 256 on reset in floating point builds, otherwise the object code is unchanged.
2011-08-30 17:08:49 -04:00
Gregory Maxwell
d830d08923
Avoid passing 'resynth' argument since resynth is either !encode
...
or it's always 1 if -DRESYNTH.
2011-08-15 16:05:40 -04:00
Gregory Maxwell
da752d1883
Eliminate some unreachable cases from the cwrs code and fixup the
...
asserts to reflect the actual limits. Update the cwrs test to cover
the complete n,k range used by opus/opus_custom.
2011-08-12 13:08:13 -04:00
Gregory Maxwell
662587d9c5
Remove many unused defines and convert some double constants to float.
2011-08-01 20:41:54 -04:00
Gregory Maxwell
71d39ad841
Correct many whitespace errors under libcelt/ and remove
...
non-ascii characters from the source.
2011-07-30 21:54:59 -04:00
Jean-Marc Valin
ff5f7228fd
Renamed celt_word* to opus_val*
2011-07-29 18:59:12 -04:00
Jean-Marc Valin
21b1134aa2
Code cleanup
...
defining HALF16() too
2011-05-13 17:41:33 -04:00
Gregory Maxwell
58ecb1ac15
The encoder would crash in the PVQ search if fed NaNs via the float interface. This patch protects against it in two sufficient ways: Making the PVQ search robust against NaNs and by squashing NaNs to zero on input.
...
Thanks to David Richards for reporting this failure mode.
2011-05-09 15:54:08 -04:00
Jean-Marc Valin
1e9fb6291c
Fixes the inversion of SPREAD_LIGHT and SPREAD_AGGRESSIVE
...
Change the bit-stream (without causing desync)
2011-02-14 13:51:06 -05:00
Jean-Marc Valin
3806c1d738
Relicensing under the simplified (2-clause) BSD license
...
Got authorization from all copyright holders
2011-02-09 22:37:41 -05:00
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