Commit graph

94 commits

Author SHA1 Message Date
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
Jean-Marc Valin
32024cb5c2 Adds some histeresis to the stereo saving
This prevents rate reduction due to channel correlation from increasing
by more than 0.25 bit/sample between two frames. This issue was observed
on r.flac where the frame following a transient would lose nearly
1 bit/sample
2012-07-25 01:35:17 -04:00
Jean-Marc Valin
4044ea8a1d VBR tuning: increases transient and dynalloc boost
This only increases the average rate by about 1.5 kb/s, but it
restores the high quality of transients from 1.0. Also it
ensures that dynalloc can never starve other bands when used
aggressively.
2012-07-25 01:32:29 -04:00
Jean-Marc Valin
bfabfd383d Fixes issues with stereo saving and dynalloc
1) Stereo saving was being too aggressive because it only considered the LF
   and because the savings were multiplied by coded_bins rather than by
   just the number of "side bins" below the intensity threshold
2) In the case of bandlimited signals, dynalloc would allocate way too many
   bits to the last non-zero band. We now explicitly check for the last
   band with a meaningful signal.

These issues were really obvious when encoding the decoded test01.mp3
because of the strong inter-channel correlation and (especially) the 16 kHz
lowpass used by the mp3 encoder.
2012-07-23 15:24:40 -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
cf1053dc85 Implements OPUS_{GET,SET}_LSB_DEPTH
This is used to avoid dynalloc doing silly things on periodic LSB
patterns and to reduce the bitrate on near-silence.
2012-07-13 14:52:52 -04:00
Jean-Marc Valin
5d34794d8f Gets rid of // comments 2012-07-13 14:50:37 -04:00
Jean-Marc Valin
b9fe12c42e fixed-point (re-)conversion of the VBR code 2012-07-13 14:50:37 -04:00
Jean-Marc Valin
0918365b51 Fixes a VBR bug with 2.5 ms frames
tf_estimate was being initialized to zero and then never set because
transient_analysis() wasn't being called. This could also have affected
other frame sizes at lower complexity.
2012-07-13 14:50:37 -04:00
Jean-Marc Valin
b15b30ce6d Speeds up analysis by getting rid of calls to atan2() and cos()
atan2() is replaced by Monty's approximation.
2012-07-13 14:50:36 -04:00