Commit graph

103 commits

Author SHA1 Message Date
Jean-Marc Valin
e32cd2729e Avoids reading beyond the current buffer in comb_filter()
This could cause overflows when processing non-saturated TDAC values.
2016-07-24 21:35:15 -04:00
Jean-Marc Valin
cbceaa8579 Directly saturate the comb filter output
Otherwise, the output can grow as large as SIG_SAT/(1-0.75), which can cause
an overflow when adding two values (before multiplying by the filter tap).
2016-07-24 15:30:40 -04:00
Jean-Marc Valin
4c9ce97dbf post-filter saturation 2016-07-22 15:57:01 -04:00
Jean-Marc Valin
2ca6df03df Minor TF cleanup (tf_sum was useless), plus comments 2016-07-19 16:11:50 -04:00
Jonathan Lennox
911ddc0c58 Suppress generation of comb_filter_const_c when not used; avoid warning. 2015-11-03 01:20:50 -08:00
Jonathan Lennox
43120f0075 Reorganize x86 SSE intrinsics code.
Enable x86 intrinsics when building in floating-point mode.
Support SSE as an arch value.
Use RTCD to conditionally enable existing floating-point Celt SSE code.
Call functions directly (without RTCD) when their architecture can be presumed.
Use SSE4.1 intrinsics optimized code for Silk even in floating-point mode.
2015-09-01 17:21:31 -04:00
Timothy B. Terriberry
75d81f5bb3 Document how to tell if your build is fixed-point.
This way we won't break this by accident.
2015-02-20 12:44:10 -08:00
Rhishikesh Agashe
f133bac6f9 MIPS optimizations
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2014-06-19 04:04:51 -04:00
Jean-Marc Valin
e318744469 Skips comb filter overlap when the parameters didn't change. 2014-01-31 15:38:27 -05:00
Jean-Marc Valin
9b3a3ad7ff Unrolled version of the comb filter for ARM (eliminates MOVs) 2014-01-21 16:23:24 -05:00
Jean-Marc Valin
17b197837f Speed up the comb filter on ARM by using MAC16_32_Q16() 2014-01-21 11:07:57 -05:00
Jean-Marc Valin
05291fd6a6 Fixed-point: slight accuracy improvement in the comb filter 2013-12-29 18:31:17 -05:00
Jean-Marc Valin
0d95b3b48c SSE optimization of comb_filter()
Should make it easy to adapt to other architectures.
2013-06-17 03:58:16 -04:00
Ron
2f2f9d63b8 Fully automate version updating
This one meets or exceeds the following requirements:

 - Version is checked/updated for every build action when in the git repo.
   Does not require the user to re- ./configure to get the correct version.

 - Version is not updated automatically when using exported tarball source.
   Avoids accidentally getting a wrong version from some other git repo in
   a parent directory of the source, and allows setting the correct version
   for distro package exports.

 - Automatic updating can be manually suppressed.
   For developers doing lots of change/rebuild cycles they don't plan to
   release, when they don't want a full rebuild triggered for every commit,
   and again for every change made immediately after a commit.
   The version will still always be updated if they do a `make dist`.

 - Does not require any manual updating of versions in the mainline git
   repo for each release aside from normal tagging.  The version is
   recorded in one file only, that is automatically generated and will
   never need to be committed.

 - Does not require gnu-make features for the autoconf builds.

It does not currently:

 - Keep a checksum of every source file in tarball releases to mangle the
   version if people modify the tarball source.  Responsible people can
   manually update the version easily though in such cases.

The version.mk file is now only used by the VC project files.  Once they
are updated to use the package_version file too, then it can be deleted
from the repository.
2013-05-11 02:05:24 +09:30
Jean-Marc Valin
6906210cb0 Splits out the CELT encoder and decoder 2012-11-08 09:42:27 -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
5055cf8c13 Removes the need for lowband_scratch in quant_all_bands() 2012-11-07 09:03:43 -05:00
Jean-Marc Valin
06bab45fb4 Moved up the second encoder mdct to reduce stack usage 2012-11-06 16:29:11 -05:00
Jean-Marc Valin
cc83f6b875 Reduces decoder stack usage
Delays stack allocations as much as possible, and makes some of these
allocations conditional.
2012-11-05 10:25:20 -05:00
Jean-Marc Valin
4ea3ae9af7 Further cleanup of the MDCT code, fixes PLC bug
Doing the overlap coying in the same OPUS_MOVE() as the rest of the synthesis
memory. Also, there was a missing OPUS_MOVE() in the PLC for the hybrid/CNG
case.
2012-11-05 09:04:06 -05:00
Nils Wallménius
21b7164893 Avoid copying imdct output
Use the output buffer directly for imdct output, avoiding use of an
intermediary buffer and copying from it. This works because the output
buffer is offset to always be continous with the overlap buffer in the
decoder. Adjust encoder resynth code to have the same buffer layout.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2012-11-05 09:04:05 -05:00
Jean-Marc Valin
5ab07e6b9a comb_filter() bypass for the case where the gain is zero. 2012-11-03 11:36:39 -04:00
Jean-Marc Valin
fedfe91d37 Oops, put back the "static" for transient_analysis() 2012-11-03 10:43:06 -04:00
Jean-Marc Valin
36890bc852 Fixes a fixed-point overflow in the new transient detector 2012-11-03 00:13:06 -04:00
Jean-Marc Valin
f2729ded66 Fixes a fixed-point divide-by-zero issue 2012-11-02 18:47:47 -04:00
Jean-Marc Valin
fac68ce189 New transient detection algorithm
This one is explicitly based on a simple temporal masking model
2012-11-02 17:32:23 -04:00
Jean-Marc Valin
c8ce2ef391 Keeping the deemphasis coefficients in local variable to avoid aliasing issues 2012-10-29 15:01:32 -04:00
Jean-Marc Valin
aaf40ef259 Moves the pitch prefiltering code to a separate function 2012-10-29 15:01:32 -04:00
Jean-Marc Valin
6930d90c34 oops... fixes a C89 issue 2012-10-24 14:20:43 -04:00
Jean-Marc Valin
1cdfd1b12b Moved pre-emphasis to a separate function and cleaned it up
Removed a bunch of if()s from the loops and made the compiler life's
easier by moving some pointer accesses outside the loops.
2012-10-24 14:07:46 -04:00
Jean-Marc Valin
cc9f28c2ef Optimizations to comb_filter() 2012-10-24 01:49:50 -04:00
Jean-Marc Valin
d3fad97e3f Removes more indirections in celt.c
mode->eBands[]
2012-10-23 20:25:06 -04:00
Jean-Marc Valin
297195b57a Removes a bunch of indirections from the CELT encoder and decoder
st->mode->overlap
st->mode->nbEBands
st->overlap
st->mode
2012-10-23 18:30:02 -04:00
Jean-Marc Valin
4be7fe795e This should speed up deemphasis() quite a bit.
Removes the resampling branches from the main loop and no longer computes
the multiplications for coefs equal to one or zero.
2012-10-23 16:51:37 -04:00
Jean-Marc Valin
8ccaefd39b Take the PLC out of the stack size critical path 2012-10-23 16:15:23 -04:00
Philip Jägenstedt
b7b5872c9d Fix minor issues reported by scan-build 2012-10-11 09:21:44 -04:00
Jean-Marc Valin
1b61303fc7 Fixes a bug in the LSB_DEPTH code introduced in cf1053dc 2012-10-09 20:24:49 -04:00
Jean-Marc Valin
02dcf6aad8 Fixes a fixed-point stereo savings issue causing a celt_ilog2(0) 2012-10-09 15:07:53 -04:00
Jean-Marc Valin
0e490591b7 Gets rid of unused boost analysis code that never worked anyway.
Also removes the -exp_analysis suffix from opus_get_version_string()
and fixes a "ISO C90 forbids mixed declarations and code" warning.
2012-10-09 13:51:44 -04: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
Jean-Marc Valin
2c3b5eeded Saves channels*overlap*4 bytes off the state encoder
These were only needed with RESYNTH defined
2012-09-21 14:33:01 -04:00
Jean-Marc Valin
454d3d5959 s/SHL/SHL16/ 2012-09-15 03:09:35 -04:00
Jean-Marc Valin
97a48473ac Makes dynalloc more conservative for CBR and CVBR 2012-09-14 01:25:05 -04:00
Jean-Marc Valin
26dbb8e782 Adds anslysis code for tf_select
For now, we only allow tf_select=1 on transients. This is just to be
on the safe side.
2012-09-12 23:33:30 -04:00
Jean-Marc Valin
79a6f4d2ad Makes two static tables const 2012-08-29 09:43:23 -04:00
Jean-Marc Valin
dc4f83bef5 Fixes a silly bug where only the left channel was used for depth estimation
Result was that stereo files with silence on the left would result in an
extremely low bitrate
2012-08-14 00:37:47 -04:00
Jean-Marc Valin
1cd5d95b3f Implements OPUS_{GET,SET}_LSB_DEPTH
This implements an API used in future encoders to avoid dynalloc doing silly things
on periodic LSB patterns and to reduce the bitrate on near-silence.
2012-08-06 18:19:30 -04:00
Jean-Marc Valin
c4a95d16cf Enables the second dynalloc MDCT only at complexity 8
Also applies the compensation for tonality boost only when
the analysis is enabled.
2012-07-27 14:42:54 -04:00
Jean-Marc Valin
2b627e12e5 Makes VBR rate variations less aggressive at low bit-rates and for CVBR 2012-07-27 14:28:21 -04:00
Jean-Marc Valin
416dc73f28 Smoother intensity stereo decision thresholds
We now have rates for each possible threshold. This also adds some
histeresis but it's not that useful for now because the effective rate
doesn't changes from frame to frame (unless one changes the target rate).
This change also has the side effect of lowering the intensity stereo
point for 64 kb/s to band 15 (instead of 16).
2012-07-25 21:17:59 -04:00