Felicia Lim [Tue, 3 Sep 2019 16:56:25 +0000 (09:56 -0700)]
Fix NEON optimizations buffer read overrun
Thanks to Ray Essick
Felicia Lim [Mon, 8 Jul 2019 16:44:35 +0000 (09:44 -0700)]
Avoid processing LPC coeffs beyond the given order in NEON optimizations
Marcus Asteborg [Tue, 23 Apr 2019 20:41:14 +0000 (13:41 -0700)]
Fix typo in _FORTIFY_SOURCE define.
Signed-off-by: Ralph Giles <giles@thaumas.net>
Felicia Lim [Fri, 31 May 2019 20:58:44 +0000 (13:58 -0700)]
Silk CNG adapts faster to received packets with lower gains
Jean-Marc Valin [Fri, 26 Apr 2019 15:16:52 +0000 (11:16 -0400)]
Add mising cmake file from make dist
Thanks to theislander on HA for reporting this.
Jean-Marc Valin [Sun, 14 Apr 2019 07:57:18 +0000 (03:57 -0400)]
Update checksums
Jean-Marc Valin [Fri, 12 Apr 2019 20:26:57 +0000 (16:26 -0400)]
Bump LT version
Adding the OPUS_GET_IN_DTX() query
Marcus Asteborg [Thu, 11 Apr 2019 16:50:14 +0000 (09:50 -0700)]
CMake changes
If CMAKE_BUILD_TYPE is empty and CFlags are set then only use CFlags.
If None are set then use CMAKE_BUILD_TYPE by Release by default.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Marcus Asteborg [Wed, 10 Apr 2019 23:34:01 +0000 (16:34 -0700)]
CMake changes
Make release build default
Made CUSTOM_MODE an option with default off
Added missing buildflags for Linux and security.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Gustaf Ullberg [Thu, 20 Dec 2018 14:35:41 +0000 (15:35 +0100)]
API for checking whether the encoder is in DTX
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Mark Harris [Mon, 8 Apr 2019 06:27:57 +0000 (23:27 -0700)]
Correctly enable/disable SILK DTX with forced mode
Mark Harris [Mon, 8 Apr 2019 06:25:27 +0000 (23:25 -0700)]
Fix build errors using Makefile.mips
Broken by earlier ARM optimizations.
Marcus Asteborg [Fri, 16 Nov 2018 03:48:38 +0000 (19:48 -0800)]
Adding CMake support for Windows, Mac, Linux and Android Co-Authored-By: evpobr
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Jean-Marc Valin [Mon, 1 Apr 2019 05:45:36 +0000 (01:45 -0400)]
Fix #elif OPUS_ARM_INLINE_EDSP
Reported in https://github.com/xiph/opus/issues/108
Felicia Lim [Fri, 1 Mar 2019 21:00:18 +0000 (13:00 -0800)]
Fix mismatching arg names in function declaration and definition
Mark Harris [Tue, 26 Feb 2019 04:09:00 +0000 (20:09 -0800)]
test_opus_encode: Use fprintf instead of snprintf
snprintf is not in C89. Fixes opus-pedantic test failure introduced
in
59f8e5e4f.
Jean-Marc Valin [Wed, 13 Feb 2019 21:15:38 +0000 (16:15 -0500)]
Reset nb_no_activity_frames when analysis DTX isn't used
Jean-Marc Valin [Wed, 13 Feb 2019 18:33:42 +0000 (13:33 -0500)]
Improve silence handling
Copy the previous analysis data instead of flagging as invalid
Jean-Marc Valin [Wed, 13 Feb 2019 16:48:20 +0000 (11:48 -0500)]
Fixing initialization issues on small frame sizes
Jean-Marc Valin [Wed, 13 Feb 2019 00:33:26 +0000 (19:33 -0500)]
Fixes analysis buffering for silence and complexity changes
The previous code would go out of sync in those cases.
Jean-Marc Valin [Tue, 12 Feb 2019 21:13:04 +0000 (16:13 -0500)]
Avoiding problems with x87
logE[b] can end up slightly larger than tonal->highE[b] due to rounding
Jean-Marc Valin [Wed, 23 Jan 2019 18:47:40 +0000 (13:47 -0500)]
Properly handle a bad stream_id in OPUS_MULTISTREAM_GET_*_STATE_REQUEST
Thanks to Dmitriy for reporting this.
evpobr [Sun, 20 Jan 2019 03:13:36 +0000 (08:13 +0500)]
Fix FIXED_POINT conditional check
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Mark Harris [Sat, 29 Dec 2018 23:51:16 +0000 (15:51 -0800)]
Clean up resources in projection test
Jean-Marc Valin [Thu, 22 Nov 2018 19:06:34 +0000 (14:06 -0500)]
Refactoring: Isolating the matrix-vector product in gemm_accum()
Jean-Marc Valin [Sat, 3 Nov 2018 06:49:44 +0000 (02:49 -0400)]
missing script
Jean-Marc Valin [Sat, 3 Nov 2018 06:39:15 +0000 (02:39 -0400)]
Adding the scripts used to train the RNN classifier
Sorry, no doc for now
Janne Johansson [Fri, 19 Oct 2018 07:12:07 +0000 (09:12 +0200)]
Trivial sprintf to snprintf conversion. Some linkers warn about unbounded sprintf calls.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Jean-Marc Valin [Wed, 31 Oct 2018 06:36:17 +0000 (02:36 -0400)]
Make float2int() static with VS
Addresses the rest of https://github.com/xiph/opus/pull/79
Jean-Marc Valin [Tue, 30 Oct 2018 18:23:09 +0000 (14:23 -0400)]
Remove useless OPUS_SET_EXPERT_FRAME_DURATION() on CELT
frame diration is only handled at the Opus layer. There's no change
in behaviour, just less puzzling code.
Thanks to Dmitriy <dmilvdv@gmail.com> for reporting this.
Jean-Marc Valin [Tue, 16 Oct 2018 19:48:31 +0000 (15:48 -0400)]
Fixes misleading initialization with not enough zeros
Jean-Marc Valin [Tue, 30 Oct 2018 18:19:38 +0000 (14:19 -0400)]
update checksums
Jean-Marc Valin [Tue, 16 Oct 2018 23:44:13 +0000 (19:44 -0400)]
Bump LT version numbers
We're adding the ambisonics API
Pavel P [Tue, 27 Feb 2018 21:16:14 +0000 (13:16 -0800)]
Proper detection of _mm_cvtss_si32 for MS compiler
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Jean-Marc Valin [Tue, 16 Oct 2018 19:57:04 +0000 (15:57 -0400)]
Renaming compute_allocation to clt_compute_allocation() to avoid symbol clashes
As suggested in https://github.com/xiph/opus/pull/83
Jean-Marc Valin [Thu, 27 Sep 2018 02:57:36 +0000 (22:57 -0400)]
Prevent the SILK counter from overflowing after 2 years and 9 months
or "just" 1 year and 4 months for 10-ms frames.
The overflow can eventually cause a divide-by-zero when counter == -16
Thanks to Dmitry Malinin for reporting the bug.
Jean-Marc Valin [Mon, 24 Sep 2018 20:02:37 +0000 (16:02 -0400)]
Retrain RNN classifier weights to include reverberated speech
Jean-Marc Valin [Fri, 14 Sep 2018 20:27:03 +0000 (16:27 -0400)]
Fixes packet parsing for 16-bit CPUs
Without that change, a very long (> 682 ms) illegal packet could trigger
a wrap-around in the test and be accepted as valid.
Only 16-bit architectures (e.g. TI C5x) were affected.
Jean-Marc Valin [Fri, 14 Sep 2018 17:12:53 +0000 (13:12 -0400)]
Clarify configure --help
Ralph Giles [Thu, 13 Sep 2018 01:42:51 +0000 (18:42 -0700)]
Update ISO Base Media Format draft to version 0.8.1.
- Switch to 'Opus' file type identification.
- Revise channel mapping to better support ambisonics.
Jean-Marc Valin [Mon, 10 Sep 2018 17:49:38 +0000 (13:49 -0400)]
Avoiding get_demixing_matrix() symbol clash on unified build
Jean-Marc Valin [Mon, 10 Sep 2018 17:30:35 +0000 (13:30 -0400)]
OpusMSDecoder does not have an arch field
Jean-Marc Valin [Thu, 6 Sep 2018 22:14:38 +0000 (18:14 -0400)]
Add include/opus_projection.h to opus_headers.mk
Marcin Gorzel [Thu, 30 Aug 2018 12:15:21 +0000 (13:15 +0100)]
Apply equal bit allocation to ambisonic channels
Fixes issue #95 on GitHub.
Signed-off-by: Felicia Lim <flim@google.com>
Mark Harris [Sat, 28 Jul 2018 20:07:15 +0000 (13:07 -0700)]
Work around VS2015 internal compiler error
The error was:
c:\projects\opus\celt\celt_encoder.c(1019): fatal error C1001: An internal error has occurred in the compiler. [C:\projects\opus\win32\VS2015\opus.vcxproj]
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe. You will be prompted to send an error report to Microsoft later.
Jean-Marc Valin [Sat, 28 Jul 2018 17:50:45 +0000 (13:50 -0400)]
Fixing arithmetic problems for 16-bit CPUs in ambisonics_rate_allocation()
Felicia Lim [Sat, 28 Jul 2018 01:10:05 +0000 (18:10 -0700)]
Fix bitrate allocation for channel mapping 2
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Joshua Bowman [Sat, 7 Jul 2018 01:07:09 +0000 (18:07 -0700)]
win32: Add ambisonics sources to VS project
[mark.hsj: Add other missing files and update filter file]
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Fixes https://github.com/xiph/libopusenc/issues/9
Fixes https://github.com/xiph/opus-tools/issues/32
Jean-Marc Valin [Fri, 27 Jul 2018 00:13:55 +0000 (20:13 -0400)]
Fixes C90 "mixed declarations and code" error
Jean-Marc Valin [Thu, 26 Jul 2018 16:06:35 +0000 (12:06 -0400)]
Remove ambisonics experimental flag
Jean-Marc Valin [Wed, 4 Jul 2018 18:37:12 +0000 (14:37 -0400)]
Enable ambisonics by default
Jean-Marc Valin [Wed, 4 Jul 2018 18:36:53 +0000 (14:36 -0400)]
Enable hardening by default
Jean-Marc Valin [Thu, 26 Jul 2018 02:47:50 +0000 (22:47 -0400)]
Fix comma that should have been a semicolon
Didn't cause any problem, but still good to fix. Reported by
keithchugg on github.
Jean-Marc Valin [Thu, 26 Jul 2018 04:19:11 +0000 (00:19 -0400)]
oops
Jean-Marc Valin [Fri, 15 Jun 2018 20:52:14 +0000 (16:52 -0400)]
Use ambisonics families 2 and 3 instead of 254 and 253
Mark Harris [Sun, 22 Jul 2018 04:10:17 +0000 (21:10 -0700)]
Validate multistream/projection decoder frame_size
Mark Harris [Sun, 22 Jul 2018 00:55:24 +0000 (17:55 -0700)]
Silence compiler warnings
clang -Wcast-align warnings with ambisonics enabled
clang -Wnull-pointer-arithmetic warnings in test_opus_api.c
gcc -Wimplicit-fallthrough warnings on arm
msvc warning C4244 in celt_encoder.c with fixed point
Jean-Marc Valin [Thu, 14 Jun 2018 17:22:48 +0000 (13:22 -0400)]
Make bandwidth detection more conservative to avoid low-passing frames
Jean-Marc Valin [Fri, 1 Jun 2018 19:54:56 +0000 (15:54 -0400)]
update checksums
Jean-Marc Valin [Tue, 29 May 2018 04:35:02 +0000 (00:35 -0400)]
Avoiding arithmetic on NULL pointer
Causes a warning with -Wnull-pointer-arithmetic and the code wasn't doing
anything anyway (the ctl call ignores NULLs)
Jean-Marc Valin [Tue, 29 May 2018 04:28:50 +0000 (00:28 -0400)]
Avoiding leaks when opus_demo exits with an error
This gets rid of false positives in static analysis
(see https://trac.webkit.org/changeset/232236/webkit)
Mark Harris [Mon, 28 May 2018 08:09:09 +0000 (01:09 -0700)]
Fix DISABLE_FLOAT_API unused parameter warning
Mark Harris [Mon, 28 May 2018 00:47:28 +0000 (17:47 -0700)]
Only call isqrt32() with a positive argument
Fixes test_opus_projection failure under ubsan, due to clz(0).
Jean-Marc Valin [Thu, 24 May 2018 17:15:39 +0000 (13:15 -0400)]
Switch from narrowband to wideband at 9 kb/s, don't use mediumband
Jean-Marc Valin [Thu, 24 May 2018 06:36:30 +0000 (02:36 -0400)]
Fix decision thresholds for larger frame sizes
Don't assume that frames larger than 20 ms save any overhead compared to 20 ms.
Jean-Marc Valin [Wed, 23 May 2018 20:59:23 +0000 (16:59 -0400)]
Fixes a SILK bandwidth switching regression
The bug was triggered because
f982b84d started using prefill for
SILK bandwidth changes, which reinitialized the encoder state and
prevented the variable lowpass from working properly. To fix the problem,
we preserve the sampling rate and variable low-pass when prefilling.
Jean-Marc Valin [Thu, 17 May 2018 00:05:47 +0000 (20:05 -0400)]
Improving rate control for low bitrate
Using a finer table for the rate to SNR curves in silk_control_SNR().
It's now possible to have an SNR that reaches 0, so we can lower bitrate
down to ~5 kbps for narrowband and 5.5 kbps for wideband.
Jean-Marc Valin [Thu, 17 May 2018 19:26:19 +0000 (15:26 -0400)]
Oops, fix NaN test
Jean-Marc Valin [Tue, 15 May 2018 19:36:33 +0000 (15:36 -0400)]
Aborting on NaN in CELT
NaNs should be filtered at the Opus layer, so if there are any in the CELT
encoder, then it's likely something went horribly wrong (e.g. corrupted state).
In that case, better abort than have something bad happen.
Gustaf Ullberg [Tue, 10 Apr 2018 11:37:49 +0000 (13:37 +0200)]
Silk makes use of Opus VAD
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Mark Harris [Mon, 7 May 2018 03:31:30 +0000 (20:31 -0700)]
README: Update to reflect RFC 7845 and 8251
Mark Harris [Fri, 4 May 2018 05:55:54 +0000 (22:55 -0700)]
Fix opus_packet_parse() non-null arg attribute
It is the size array that must be non-null.
Jean-Marc Valin [Tue, 27 Mar 2018 07:54:21 +0000 (03:54 -0400)]
two more asserts I forgot
Jean-Marc Valin [Mon, 26 Mar 2018 17:48:39 +0000 (13:48 -0400)]
Misc assertion cleanup
Jean-Marc Valin [Mon, 26 Mar 2018 16:54:38 +0000 (12:54 -0400)]
Harden SILK x86 code
Jean-Marc Valin [Mon, 26 Mar 2018 16:46:47 +0000 (12:46 -0400)]
Hardening silk/fixed
Jean-Marc Valin [Mon, 26 Mar 2018 07:23:09 +0000 (03:23 -0400)]
Hardening asserts for SILK float
Jean-Marc Valin [Sat, 24 Mar 2018 06:16:15 +0000 (02:16 -0400)]
Converting some silk_assert()s into hardening celt_assert()s
Only converted the ones that are really sure (not signal-dependent)
and that shouldn't add much run-time complexity
Jean-Marc Valin [Fri, 23 Mar 2018 20:13:59 +0000 (16:13 -0400)]
Some missing checks
Jean-Marc Valin [Fri, 23 Mar 2018 18:29:11 +0000 (14:29 -0400)]
Adding multistream decoder validation
Jean-Marc Valin [Fri, 23 Mar 2018 17:25:01 +0000 (13:25 -0400)]
Asserting on some ctl() calls that should never fail
Jean-Marc Valin [Fri, 23 Mar 2018 17:04:13 +0000 (13:04 -0400)]
Adds Opus decoder state validation
Jean-Marc Valin [Fri, 23 Mar 2018 07:16:33 +0000 (03:16 -0400)]
Adding decoder state validation
Jean-Marc Valin [Fri, 23 Mar 2018 16:13:30 +0000 (12:13 -0400)]
Fixing no-redundancy CELT->SILK and CELT->hybrid transitions
We make sure the CELT PLC we do in the transition uses the same bandwidth
as the previous (CELT) packet and not the new bandwidth
Jean-Marc Valin [Thu, 22 Mar 2018 21:40:35 +0000 (17:40 -0400)]
Adding ENABLE_HARDENING
Enables "safes" assertions even with ENABLE_ASSERTIONS isn't set
Andrew Allen [Mon, 19 Mar 2018 21:55:24 +0000 (14:55 -0700)]
Support for Ambisonics.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Jean-Marc Valin [Mon, 12 Mar 2018 15:39:08 +0000 (11:39 -0400)]
Using a first-order filter for DC rejection
A second-order DC rejection filter is uselsss unless we have complex
poles. However, complex poles means we have to compute the filter as a
single pass (rather than two casdaded first-order filters), which has
numerical issues that would require a higher complexity to solve.
So rather than waste cycles with a second-order filter (with a longer
impulse response), we just go with a first-order filter.
Jean-Marc Valin [Fri, 2 Mar 2018 20:08:21 +0000 (15:08 -0500)]
Don't enable -fstack-protector-strong on Windows for now
It adds a libssp-0.dll dependency and prevents static linking
Jean-Marc Valin [Thu, 22 Feb 2018 22:18:57 +0000 (17:18 -0500)]
Adding -D_FORTIFY_SOURCE=2 when possible
Gustaf Ullberg [Wed, 22 Nov 2017 10:38:18 +0000 (11:38 +0100)]
Fixed off-by-one issue in Silk DTX
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Jean-Marc Valin [Thu, 22 Feb 2018 19:51:52 +0000 (14:51 -0500)]
Enable -fstack-protector-strong by default on x86
The size overhead seems to be about 1% and the speed overhead is
"in the noise" (<2%).
The automake code is copied from opus-tools
Jean-Marc Valin [Wed, 21 Feb 2018 08:15:52 +0000 (03:15 -0500)]
Fix comment to take into account previous commit
Jean-Marc Valin [Wed, 21 Feb 2018 06:33:59 +0000 (01:33 -0500)]
Increasing the CELT bit allocation slightly for stereo hybrid
Fixes a "regression" from 1.2 to 1.3-beta that was especially noticeable
on a Korean speech sample. (it wasn't a real regression since 1.2 only
worked because it was using CELT)
Jean-Marc Valin [Tue, 20 Feb 2018 06:54:33 +0000 (01:54 -0500)]
Fix divide-by-zeros in opus_demo stats code
Jean-Marc Valin [Fri, 16 Feb 2018 17:36:44 +0000 (12:36 -0500)]
Fixes integer overflow in SILK VAD for 10-ms frames
Reported by Chandrakala Madhira on the mailing list
Jean-Marc Valin [Fri, 16 Feb 2018 17:36:17 +0000 (12:36 -0500)]
Forgot one RFC8251 behaviour to disable with --disable-rfc8251
Reported by daddesio in #opus
Jean-Marc Valin [Thu, 15 Feb 2018 19:58:53 +0000 (14:58 -0500)]
Disabling weak transients and 5ms resolution on voiced frames
Jean-Marc Valin [Mon, 12 Feb 2018 23:44:36 +0000 (18:44 -0500)]
Add a simple masking model to the spreading decision
This improves cases where a whole region is dominated by a handful of tones
Jean-Marc Valin [Tue, 13 Feb 2018 19:09:07 +0000 (14:09 -0500)]
Making sure importance[] is initialized even when we don't use dynalloc
Jean-Marc Valin [Tue, 13 Feb 2018 18:39:06 +0000 (13:39 -0500)]
oops