Jean-Marc Valin
0d584b905a
Prevents LFE from busting at really low bitrate
2013-11-13 22:42:04 -05:00
Jean-Marc Valin
a71c9adf52
Fixes MSVC conversion warnings
2013-11-13 12:07:01 -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
c1959e7dc3
Taking into account the frame size in more encoder decisions
...
Stereo mode, stereo width, min bandwidth, VBR damping
2013-11-08 19:24:10 -05:00
Jean-Marc Valin
8f466274d3
Removes a float var that shouldn't have been there
...
Defining FIXED_POINT and DISABLE_FLOAT_API now leaves no float instruction
2013-10-28 21:50:10 -04:00
Jean-Marc Valin
9c23f5cdca
Makes stereo savings still less aggressive
...
Caps the savings at 1 bit per (coded) sample. This doesn't really increase
the bitrate and fixes some issues, e.g. with IgorC's "twilight" sample.
2013-10-28 14:15:18 -04:00
Jean-Marc Valin
942fc816d1
Replaces log2() with celt_log2() and fixes a potential divide-by-zero
2013-10-01 19:27:30 -04:00
Jean-Marc Valin
7c60625f80
Merge branch 'exp_surround1'
2013-10-01 17:06:09 -04:00
Stefan Hacker
a32fa319d3
Avoid using C++ keyword 'new'
...
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-09-29 00:07:52 -04:00
Jean-Marc Valin
36a21ed536
Very basic surround rate calibration
2013-09-14 15:46:09 -04:00
Jean-Marc Valin
ae7dc8a13f
More surround masking tuning
2013-09-13 15:05:50 -04:00
Jean-Marc Valin
039e9ab155
Tuning the surround masking
...
We're now a bit more conservative and only take into account the bands
that are being codec. Also weighting the rate saving by the band width.
2013-09-12 03:05:43 -04:00
Jean-Marc Valin
ba7dbb365e
Analysis scaling fixes
...
This should make the scaling the same for fixed and float. It changes the float
scaling too by normalizing by the number of channels, which matters for
bandwidth detection.
2013-09-09 16:39:19 -04:00
Jean-Marc Valin
3ab03e0556
First pass at making the analysis code run with FIXED_POINT
...
Code is still float, but at least tonality esitmation seems to work.
Speech/music analysis is still disabled.
2013-09-06 16:00:39 -04:00
Jean-Marc Valin
0f68696a97
Adds trim and dynalloc control to surround masking
2013-09-05 12:49:55 -04:00
Jean-Marc Valin
fdceae89bf
Surround masking rewrite
...
The channel energy is now computed using an MDCT in the multi-stream
encoder rather than computing the energy of the stereo downmix.
2013-08-30 21:58:02 -04:00
Jean-Marc Valin
e45509294c
Better handling of the dynalloc cap for CBR/CVBR
2013-07-30 05:12:46 -04:00
Jean-Marc Valin
8259492a7d
Fixes an integer wrap-around due to an exceedingly large QCONST16
2013-07-25 13:55:15 -04:00
Gregory Maxwell
5280c71883
Revert "Fixes a number of double promotions and missing casts."
...
This reverts commit 43279728cd
.
2013-07-15 15:51:24 -07:00
Gregory Maxwell
43279728cd
Fixes a number of double promotions and missing casts.
...
At a minimum MSVC warns on some of this stuff.
2013-07-15 15:23:03 -07:00
Jean-Marc Valin
cd373b54de
Surround masking tuning
...
More conservative surround masking
Disables temporal VBR on surround
Disables tonality on LFE
2013-07-07 02:51:07 -04:00
Jean-Marc Valin
4365498d48
Prevents zero-energy on LFE
2013-07-07 00:39:35 -04:00
Jean-Marc Valin
92a06f51a7
Disables temporal VBR for LFE
2013-07-01 16:27:07 -04:00
Jean-Marc Valin
8e3a1cbf48
Temporal VBR tuning
...
Applies temporal VBR up to higher bitrates after IgorC reported it being
useful at 64 kb/s for amount=0.1
2013-07-01 16:14:48 -04:00
Jean-Marc Valin
16ba19a95b
Fixes MSVC warnings
2013-06-27 03:40:44 -04:00
Jean-Marc Valin
3c0aa8fc25
Adds "temporal VBR", which should be mostly useful at low bitrate.
...
The idea is to allow more noise than the default in quiet segments.
Right now, this hurts for high bitrates , so it's gradually reduced
as the rate goes up, until it's completely disabled above 68 kb/s.
2013-06-25 14:10:27 -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
3afc6ffff0
Don't call denormalise_bands() on silence
2013-06-16 15:40:10 -04:00
Jean-Marc Valin
39cbc45828
Fixes stupid tf calibration bugs introduced/exposed in f77410d
2013-06-13 16:13:51 -04:00
Jean-Marc Valin
28733d1281
Moves VBR calculations to a separate function.
...
Does not change the behaviour of the VBR code in most cases. The only
exception is that the VBR offset is now taken into accound in the base_rate,
which will have a (very minor) impact on CVBR at low rate.
2013-06-10 03:32:12 -04:00
Aurélien Zanelli
cd4c8249bc
Add run-time CPU detection and support for ARM architecture
...
Run-time CPU detection (RTCD) is enabled by default if target platform support
it.
It can be disable at compile time with --disable-rtcd option.
Add RTCD support for ARM architecture.
Thanks to Timothy B. Terriberry for help and code review
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2013-06-04 16:23:22 -07:00
Jean-Marc Valin
b7bd4c20ac
celt_maxabs16() now returns an opus_val32 to avoid problems with -32768
2013-05-18 23:52:18 -04:00
Jean-Marc Valin
bd477ce2bc
Merge branch 'surround'
2013-05-17 14:31:36 -04:00
Jean-Marc Valin
6e277c6291
Conservative use of bandwidth detection in CELT
...
Takes into account the bitrate.
2013-05-17 14:15:31 -04:00
Jean-Marc Valin
d2c484b5e7
Adds spreading to the surround masking computation
...
This avoids a single low-energy band from changing the masking results.
2013-05-06 16:02:31 -04:00
Jean-Marc Valin
a4dccd3f65
Implements basic surround masking
...
The idea is that the rate of each stream is adjusted based on its
contribution to the total energy of a stereo downmix.
2013-05-05 02:44:54 -04:00
Jean-Marc Valin
172f66a3ac
More forced decisions in CELT LFE encoding
2013-05-05 02:32:00 -04:00
Jean-Marc Valin
b08c4ca3f5
Surround: Better LFE handling
...
Forces CELT-only mode for LFE (despite the rate) and "locks" most of the
CELT analysis:
- No transient or TF
- Band boost on first band
- Only first two bands get PVQ bits
- Forced energy decay after the first two bands
2013-05-05 02:31:38 -04:00
Jean-Marc Valin
f77410deb6
VBR bitrate calibration for variable duration.
...
Also fixes uninitialized value in previous commit.
2013-04-19 22:44:03 -04:00
Jean-Marc Valin
3252bf2a68
Variable framesize improvements
...
- Properly apply the transient boost by counting all the bits in the cost
- Disable the post-filter for non-20-ms frames that follow a transient (applies
only to variable framesize)
2013-04-19 03:20:40 -04:00
Jean-Marc Valin
f96fc8cc83
Merge branch 'exp_analysis'
...
Conflicts:
celt/celt_encoder.c
2013-03-08 12:29:53 -05:00
Jean-Marc Valin
69c3dcd105
Fixes a bug introduced in 851f803
2013-02-19 03:42:18 -05:00
Jean-Marc Valin
851f8033f6
Moves mono downmixing and upsampling to the compute_mdcts()
2013-02-18 01:43:43 -05:00
Jean-Marc Valin
541a472ff6
Adds code to revise the transient decision using the band energy
...
Detects a transient when the average band energy jumps by more than 6 dB
between two consecutive frames. This fixes some undetected transients on
Gainless' Muse_Breaks_Rmx sample.
2013-02-17 21:21:30 -05:00
Jean-Marc Valin
2a5f0565b8
Running transient_analysis() even for 2.5 ms frames
...
This means 2.5 ms frames can now use a higher bitrate for transients.
2013-02-10 00:15:49 -05:00
Jean-Marc Valin
48ac122141
Makes analysis usable for all frame sizes
2013-02-10 00:15:49 -05:00
Jean-Marc Valin
ebdfbfb743
Fixes stupid preprocessor-related bug introduced in e368e6209
.
...
Would cause the preemphasis and deemphasis to fail, but only with
custom modes enabled.
2013-01-09 11:13:00 -05:00
Jean-Marc Valin
e368e62092
Remove condition in pre/de-emphasis when not building with custom modes
...
Should slightly improve coverage and reduce code size
2013-01-03 14:28:28 -05:00
Jean-Marc Valin
d683c76b88
Fixes MSVC warnings for double->float and float->int conversion
2012-12-21 16:17:38 -05:00
Jean-Marc Valin
5fb50adb7a
skip bands with no energy
2012-12-21 11:52:03 -05:00