summaryrefslogtreecommitdiff
path: root/silk
Commit message (Collapse)AuthorAgeFilesLines
* Fix C90-related warningsexp_warnings1Jean-Marc Valin2022-07-093-3/+4
|
* Silence GCC 11+ -Wmaybe-uninitialized warningsMark Harris2022-07-051-4/+6
| | | | Reviewed by Timothy B. Terriberry.
* Avoid undefined behaviour within the debug macrosJean-Marc Valin2022-07-051-2/+2
| | | | | | Even when the macro itself would overflow. Reviewed by Mark Harris
* Fix some 16-bit overflows (using 32-bit macros)Jean-Marc Valin2022-07-052-6/+6
| | | | Reviewed by Mark Harris
* Avoid left shifts of negative values in debug macrosJean-Marc Valin2022-07-051-19/+13
| | | | Reviewed by Mark Harris
* Fixes valgrind failure caused by silk_find_pred_coefs_*()Jean-Marc Valin2022-06-282-2/+4
| | | | | | | | The function copies NLSFs from the stack to the state which for order 10 means we were copying uninitialized values. That in turn breaks check-asm when comparing the state under valgrind. Reviewed by Timothy B. Terriberry.
* Fixes wrap-around in silk_inner_prod16_sse4_1()Jean-Marc Valin2022-06-271-1/+2
| | | | Thanks Tim
* Update and re-enable SILK SSE4.1 optimisationsFrancis Quiers2022-03-0717-639/+650
|
* Prevent int32 overflow when applying HARM FIR filter in NSQ.c by using a ↵Tom Denton2022-02-241-1/+1
| | | | | | saturating sum. This matches behavior in NSQ_del_dec.c. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* celt_lpc: avoid overflows when computing lpcs in fixed pointFelicia Lim2021-03-022-2/+4
| | | | | | | The LPCs are computed in 32-bit, so increase the allowed range from +/-8 to +/-64 to avoid overflows caught during fuzzing. Before downshifting back down to the +/-8 range in the final 16-bit output, perform bandwidth extension to avoid any additional overflow issues.
* Add support for Meson build systemTim-Philipp Müller2020-10-282-0/+61
| | | | | | | | | | | | | | Tested on: - Linux/x86* with gcc - Android armv7 arm64 x86 x86_64 with clang - Windows x86 x86_64 with Visual Studio 2017 - Windows x86 x86_64 with MinGW - macOS x86_64 with clang - iOS arm64 x86_64 with clang Co-authored by: Nirbheek Chauhan <nirbheek@centricular.com> https://gitlab.xiph.org/xiph/opus/-/merge_requests/13
* Replace WIN32 with _WIN32 everywhereNirbheek Chauhan2020-08-211-2/+2
| | | | | | | | _WIN32 is defined on all Windows platforms by every compiler that targets Windows. We do not need WIN32 at all. Signed-off-by: Mark Harris <mark.hsj@gmail.com> Resolves https://github.com/xiph/opus/pull/104
* silk: Fix incorrect ifdef in debug.cNirbheek Chauhan2020-08-211-2/+1
| | | | Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Build time improvement, for MSVC use intrin0.h instead of intrin.h and ↵Marcus Asteborg2020-06-113-13/+17
| | | | | | remove usage of stdio.h in production code Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Disable message box when calling abort(). The message box is causing hangs ↵Marcus Asteborg2020-06-111-0/+3
| | | | | | in tests. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Fix another signed integer overflow in silk_noise_shape_quantizer_del_decFelicia Lim2020-03-231-1/+1
|
* Fix signed integer overflows in silk_noise_shape_quantizer_del_decFelicia Lim2020-03-091-5/+5
|
* Revert "Attenuate SILK PLC gain only for unvoiced speech"Jesús de Vicente Peña2020-02-032-5/+2
| | | | | | This reverts commit 4f5557c3095a1d212161609ff638cdae67a9b303. Signed-off-by: Felicia Lim <flim@google.com>
* Fix NEON optimizations buffer read overrunFelicia Lim2019-09-031-2/+7
| | | | Thanks to Ray Essick
* Avoid processing LPC coeffs beyond the given order in NEON optimizationsFelicia Lim2019-07-081-7/+15
|
* Silk CNG adapts faster to received packets with lower gainsFelicia Lim2019-05-312-0/+5
|
* Fix build errors using Makefile.mipsMark Harris2019-04-082-4/+5
| | | | Broken by earlier ARM optimizations.
* Fixes misleading initialization with not enough zerosJean-Marc Valin2018-10-301-2/+2
|
* Prevent the SILK counter from overflowing after 2 years and 9 monthsJean-Marc Valin2018-09-261-3/+2
| | | | | | | 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.
* Silence compiler warningsMark Harris2018-07-211-5/+5
| | | | | | | 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
* Fixes a SILK bandwidth switching regressionJean-Marc Valin2018-05-243-5/+22
| | | | | | | 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.
* Improving rate control for low bitrateJean-Marc Valin2018-05-174-53/+70
| | | | | | 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.
* Silk makes use of Opus VADGustaf Ullberg2018-05-147-10/+33
| | | | Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* two more asserts I forgotJean-Marc Valin2018-03-271-1/+1
|
* Harden SILK x86 codeJean-Marc Valin2018-03-275-9/+9
|
* Hardening silk/fixedJean-Marc Valin2018-03-2712-38/+38
|
* Hardening asserts for SILK floatJean-Marc Valin2018-03-2711-32/+32
|
* Converting some silk_assert()s into hardening celt_assert()sJean-Marc Valin2018-03-2729-96/+96
| | | | | Only converted the ones that are really sure (not signal-dependent) and that shouldn't add much run-time complexity
* Fixed off-by-one issue in Silk DTXGustaf Ullberg2018-02-222-2/+2
| | | | Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Fixes integer overflow in SILK VAD for 10-ms framesJean-Marc Valin2018-02-181-6/+5
| | | | Reported by Chandrakala Madhira on the mailing list
* Better rate allocation for stereo SILK in hybrid modeJean-Marc Valin2017-09-281-1/+1
| | | | | | | SILK was being allocated too few bits for stereo hybrid, often resulting in forced narrowing of the width. We now allocate more bits to SILK and reduce the threshold for narrowing. This improves quality enough that the bitrate threshold for switching to SILK can be increased to 44 kb/s.
* Rename SSE 4.1 files to match their targets.Ralph Giles2017-09-116-0/+0
| | | | | | | | | Distinguish source files for the SSE 4.1 instruction set extension consistently by their filename. This makes it easier to check the correct flags are being set at build time. Signed-off-by: Jonathan Lennox <jonathan@vidyo.com>
* Fix a duplicate symbol name.Ralph Giles2017-06-131-2/+2
| | | | | | | | | | Both versions of silk/tables_NLSF_CB had symbols named silk_NLSF_CB1_Wght_Q9 which causes problems if both files are build as part of the same compilation unit. Rename the wideband version to include a 'WB' string to avoid the conflict. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Don't use MAY_HAVE_NEON in arm_silk_map.c.Jonathan Lennox2017-06-021-16/+16
| | | | | | | | | It's unnecessary, and isn't defined correctly on floating-point. This makes us correctly use Neon functions (in floating-point mode) on platforms where Neon is detected by RTCD. Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
* silk_LIMIT_32() should return an opus_int32 (not opus_int)Jean-Marc Valin2017-05-301-1/+1
| | | | | Thanks to petrufm for pointing that out: https://github.com/xiph/opus/issues/35
* cosmetics,silk: correct input/output arg commentsLinfeng Zhang2017-05-238-17/+17
| | | | | | Change-Id: I607a8b75b0711a485384d6f854cf6e2ec18b38b7 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Optimize silk_biquad_alt_stride2() for ARM NEONLinfeng Zhang2017-05-175-2/+245
| | | | | | | | The optimization is bit exact with C function. Change-Id: Ifb8f04b19f2d576e79ce5dcfa7e0fc374d71d6c8 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Update silk_biquad_alt()Linfeng Zhang2017-05-173-9/+60
| | | | | | | | | | | Split to silk_biquad_alt_stride1() and silk_biquad_alt_stride2(), so that it can be optimized more efficiently when stride is 2. This change in C code is bit exact with the origin. Change-Id: Idaefe670397016ace2a489e3435ac61b7dbe79d5 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Optimize silk_warped_autocorrelation_FIX() for ARM NEONLinfeng Zhang2017-04-138-10/+366
| | | | | | | | | | | The optimization is bit exact with C function. This optimization speeds up fixed-point SILK encoder on NEON about 5% to 8%. (Tested on Acer Chromebook, ARMv7 Processor rev 3 (v7l).) Change-Id: I582f6f3585b7946149e16a2ad3084ebc0ae79a4f Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Fix compiler warningsMark Harris2017-02-266-17/+19
| | | | | | | | | | | | | | | | | | | - celt/modes.c:430:14: warning: cast from 'const unsigned char *' to 'opus_int16 *' increases required alignment from 1 to 2 [-Wcast-align] - 'C[0][1]' may be used uninitialized [-Wmaybe-uninitialized] - Unused variable/parameter - Value stored is never read - MSVC warnings about "possible loss of data" due to type conversions - MSVC warning C4146: unary minus operator applied to unsigned type - silk/NLSF_del_dec_quant.c:137:20: warning: array subscript is above array bounds [-Warray-bounds] (gcc -O3 false positive) - src/mlp_train.h:39:20: warning: function declaration isn't a prototype [-Wstrict-prototypes] - Remove SMALL_FOOTPRINT code from SSE 4.1 FIR implementation, matching the C implementation. The clang -Wcast-align warnings with SSE intrinsics are a known clang issue: https://llvm.org/bugs/show_bug.cgi?id=20670
* Fix stability testJean-Marc Valin2017-02-181-1/+1
|
* Speed up test_unit_LPC_inv_pred_gain by returning early on stable filtersJean-Marc Valin2017-02-181-0/+10
|
* Optimize silk_LPC_inverse_pred_gain() for ARM NEONLinfeng Zhang2017-02-1418-21/+384
| | | | | | | | The optimization is bit exact with C function. Change-Id: Ib3bdc26a5a4ebe02e7f24be85104e8e9a2a9a738 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Adding a unit test for LPC_inv_pred_gain()Jean-Marc Valin2017-02-141-0/+118
| | | | | | | It checks that no clearly unstable filter passes the LPC_inv_pred_gain() test. Also, this will make it possible to check assembly for correctness. Modified from an original patch from Linfeng Zhang <linfengz@google.com>.
* Remove silk_LPC_inverse_pred_gain_Q24() which is no longer used anywhereJean-Marc Valin2017-02-092-26/+0
|