Jean-Marc Valin
bdc7b93358
Reduces decoder stack usage by only storing one channel of denormalized MDCT
2014-01-06 08:58:38 -05:00
Jean-Marc Valin
4a6744a446
Some cleaning up of the synthesis code.
2014-01-05 21:40:02 -05:00
Jean-Marc Valin
306d7f5a30
fixed-point: slight (but free) accuracy improvement in compute_band_energies()
...
Also moves the VSHR32() condition outside the loop just in case some compilers
don't optimize that properly.
2013-12-16 01:08:21 -05:00
Jean-Marc Valin
e0f26246b0
fixed-point: adds rounding to some shifts to eliminate bias
...
This reduces the peak decoding error by removing small (inaudible) spikes in
the error at the frame boundaries. These were due to the frequency-domain bias
ending up as a small pulse in the middle of the IMDCT overlap. None of this
was ever audible, but fixing it is still cleaner.
2013-12-14 11:07:13 -05:00
Jean-Marc Valin
5752d659fd
Minor fixed-point accuracy improvements that were completely free
2013-12-11 00:21:38 -05:00
Jean-Marc Valin
5607d5d1c8
Annotating pointer arguments with OPUS_RESTRICT and const
2013-12-10 22:09:29 -05:00
Jean-Marc Valin
4fda6b0142
Using celt_inner_prod() in compute_band_energies()
2013-12-09 18:06:34 -05:00
Jean-Marc Valin
ff072009fe
Replaces inline copies and initialization with OPUS_*() macros.
...
This is a bit faster at -O2 because memcpy()/memmove()/memset() are
vectorized. The code is also cleaner.
2013-12-09 15:26:52 -05:00
Jean-Marc Valin
8ea01eed10
Making the CELT fixed-point decoder a bit more robust to extreme signals
...
denormalise_bands() can now produce signals close to the max MDCT amplitude.
2013-11-13 09:40:00 -05:00
Jean-Marc Valin
ca6fac041b
Fixes some minor issues found by scan build
2013-11-09 18:28:40 -05:00
Jean-Marc Valin
b9176a4c3e
Makes dual_inner_prod() more generic to increase its use
2013-06-17 16:37:41 -04:00
Jean-Marc Valin
7fd98c571f
Converts denormalise_bands() to use 16-bit multiplications
2013-06-16 21:56:41 -04:00
Jean-Marc Valin
ee2506b2c7
Moves log2Amp inside denormalise_bands() and get rid of bandE[]
...
Also get rid of the MSE measurement code which is outdated and no longer useful
2013-06-16 20:24:52 -04:00
Jean-Marc Valin
fa28dea7be
Fixes a seed issue introduced in 5367dac
...
Was causing the testvector to pass with lower quality, though
practically there was no quality degradation.
2013-01-03 21:15:16 -05:00
Jean-Marc Valin
5367dac3b0
seed and remaining_bits moved to band context
2012-12-22 21:56:22 -05:00
Jean-Marc Valin
a9d6286ca5
Using a band context to reduce the number of arguments being passed around.
2012-12-22 21:32:28 -05:00
Jean-Marc Valin
f18acee4a6
more bands.c cleaning up
2012-12-22 19:29:05 -05:00
Jean-Marc Valin
ddd0d21442
collapse mask cleanup
2012-12-22 19:29:01 -05:00
Jean-Marc Valin
414fd27056
Removes useless parameters and re-indents the code
2012-12-22 19:28:57 -05:00
Jean-Marc Valin
3d6c341867
Splitting off the recursion in quant_partition()
...
quant_band() now only handles the level0 case.
2012-12-22 19:28:53 -05:00
Jean-Marc Valin
4ffbf21174
stereo part of quant_band() moved to quant_band_stereo()
2012-12-22 19:28:47 -05:00
Jean-Marc Valin
113a5e1b1e
Moves the split angle code to compute_theta()
2012-12-22 19:28:42 -05:00
Jean-Marc Valin
dfe3bf9650
First step in quant_band() cleanup: N=1 case.
2012-12-22 19:28:36 -05:00
Timothy B. Terriberry
8eb9bb7939
Numerous PLC cleanups.
...
This should reduce computation, reduce stack usage, and be
substantially easier to read, but should not change behavior.
It's not quite bit-exact because I collapsed the application of the
decay and the fading into a single pass to save one multiply per
sample, but the difference signal is silent.
It also changes the comments into complete sentences.
2012-12-07 14:07:22 -08:00
Gregory Maxwell
07418d9dd8
Guard _BitScanReverse on MSVC so that MSVC 6 doesn't break.
...
This also adds some extra casts to shut up compiler warnings
reported on MSVC 6 where there is implicit truncation for the
arguments of bitexact_cos().
Lacking access to CLZ/BSR will make the code a fair bit slower but
that is better than failing to compile.
2012-11-27 13:07:45 -05:00
Jean-Marc Valin
8b906c102b
Changed denormalize_bands() to only work between "start" and "end"
2012-11-07 14:15:08 -05:00
Jean-Marc Valin
7aa593a556
Reduces stack in quant_all_bands() for hybrid mode
...
No need to allocate for the low-band
2012-11-07 10:19:46 -05:00
Jean-Marc Valin
fd314f4b7a
More stack usage reduction in quant_all_bands()
...
Reduce size of "norm" because we never need it for the last band
2012-11-07 09:05:45 -05:00
Jean-Marc Valin
5055cf8c13
Removes the need for lowband_scratch in quant_all_bands()
2012-11-07 09:03:43 -05:00
Jean-Marc Valin
7315b35e13
Merge branch 'exp_analysis7'
...
Conflicts:
celt/celt.c
celt/mdct.c
include/opus_defines.h
src/opus_encoder.c
2012-10-09 03:07:06 -04:00
Gregory Maxwell
de0b5324b6
Replace C99 restrict keyword with OPUS_RESTRICT.
...
We had previously advised people to -Drestrict on
non-C99 compilers, but this creates problems for
some of the MSVC headers. Instead this just
uses a macro and defines it sanely.
2012-07-18 12:12:35 -04:00
Jean-Marc Valin
bb7b4f4e5e
Continuous trim calculations, tapset/spread now use new analysis
2012-07-13 14:50:34 -04:00
Jean-Marc Valin
66ac10210c
Fixes some cases where MIN/MAX macros result in duplicated function calls
...
Also enforces an upper bound of 510 kb/s even for frames that are
smaller than 20 ms. This reduces waste for high bitrate VBR.
2012-05-30 14:04:51 -04:00
Gregory Maxwell
37e135677a
Avoid the unnecessary resynth averaging on intensity switch when encoding.
...
Prevents some arithmetic on uninitialized memory that may contain nans.
2012-05-05 23:12:50 -04:00
Jean-Marc Valin
ab5a049705
Merge commit ' 390c89225d
'
2012-04-24 13:39:22 -04:00
Jean-Marc Valin
cb05e7cd96
s/FOUNDATION/COPYRIGHT OWNER/ in CELT code and "glue code"
...
Also added 3rd clause to "master" COPYING file
2012-04-20 16:41:42 -04:00
Jean-Marc Valin
72273000ec
Misc changes to address Robert Sparks' comments
...
See http://www.ietf.org/mail-archive/web/codec/current/msg02833.html
Still more changes to come
2012-04-20 10:26:08 -04:00
Jean-Marc Valin
367c394866
Fixes several overflows in the CELT fixed-point
...
These were all mostly benign and would at worst result in (rare)
suboptimal encoder decisions rather than signal corruption.
2012-04-12 11:09:09 -04:00
Jean-Marc Valin
fdb039badc
Eliminates an unused parameter warning in anti_collapse()
2012-03-05 17:13:59 -05:00
Jean-Marc Valin
17c5966045
Last updates for draft -11
...
- Draft updates
- Updated code to produce and check test vectors
- Making sure that the test vectors pass at all rates as well as for mono and stereo
2012-02-17 16:18:08 -05:00
Jean-Marc Valin
1c80f64960
All variables named "bank" renamed to "bandE" to avoid problems on SHARC
...
SHARK compiler treaks "bank" as a reserved keyword -- go figure.
2011-12-02 12:38:32 -05:00
Ralph Giles
120800f8fa
Rename '_FOO' to avoid potentional collisions with reserved identifiers.
...
C reserves identifiers of the from _[A-Z]+ and we have a number of
those in the code. This patch renames the various function arguments,
MACROS and preprocessor symbols to avoid the reserved form.
It also removes the CHANNELS() macro altogether. This was a
minor optimization for TI DSP to force a mono-only build,
as were the associated local 'const' versions. Since stereo
support is manditory, it wasn't worth keeping.
Thanks to John Ridges for raising the issue, and Jean-Marc Valin
and Greg Maxwell for reviewing the changes.
2011-12-02 12:31:36 -05:00
Gregory Maxwell
5d5875a93a
Add the noreturn attribute on the assert functions to aid static analysis, improve test_repacketizer error handling, and silence 19 clang static analysis errors with additional assertions.
2011-10-03 21:38:21 -04:00
Gregory Maxwell
342d654c26
As of commit 44203907
all celt bands N>1 are even, including custom modes. In light of this, remove some pointless tests.
2011-09-30 19:00:51 -04:00
Jean-Marc Valin
803ec8c6b4
Avoiding left shifts of negative values
2011-09-23 23:48:40 -04:00
Jean-Marc Valin
c37499090b
renames the libcelt/ directory to celt/
2011-09-13 18:21:18 -07:00