aboutsummaryrefslogtreecommitdiff
path: root/silk
AgeCommit message (Collapse)Author
2020-11-30Upgrade libopus to d2f6805c3f36718a742c33c56eb945c2e10646efHaibo Huang
Test: make Change-Id: I995f04a04951ca22916a7b418afdd8ba59bcd130
2020-10-28Add support for Meson build systemTim-Philipp Müller
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
2020-10-01Merge branch 'upstream-master'Harish Mahendrakar
Bug: 167721530 Test: atest android.mediav2.cts Test: run vts -m VtsHalMediaC2V1_0TargetAudioDecTest Test: run vts -m VtsHalMediaC2V1_0TargetAudioEncTest Change-Id: Id6900a9d5084fb6ae840f44a2b9133f95e1b96bc
2020-08-21Replace WIN32 with _WIN32 everywhereNirbheek Chauhan
_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
2020-08-21silk: Fix incorrect ifdef in debug.cNirbheek Chauhan
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2020-06-11Build time improvement, for MSVC use intrin0.h instead of intrin.h and ↵Marcus Asteborg
remove usage of stdio.h in production code Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2020-06-11Disable message box when calling abort(). The message box is causing hangs ↵Marcus Asteborg
in tests. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2020-03-23Fix another signed integer overflow in silk_noise_shape_quantizer_del_decFelicia Lim
2020-03-09Fix signed integer overflows in silk_noise_shape_quantizer_del_decFelicia Lim
2020-02-03Revert "Attenuate SILK PLC gain only for unvoiced speech"Jesús de Vicente Peña
This reverts commit 4f5557c3095a1d212161609ff638cdae67a9b303. Signed-off-by: Felicia Lim <flim@google.com>
2019-09-04improve handling at end of bufferRay Essick
am: 5d2e0a05b7 Change-Id: I0f4b6c628e1b0119b3dcd6394394622142dbb55f
2019-09-04improve handling at end of bufferandroid-mainline-10.0.0_r9android-mainline-10.0.0_r7android-mainline-10.0.0_r5android-mainline-10.0.0_r4android-mainline-10.0.0_r10android-10.0.0_r45android-10.0.0_r44android-10.0.0_r43android-10.0.0_r42android-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android-10.0.0_r36android-10.0.0_r35android-10.0.0_r34android-10.0.0_r33android-10.0.0_r32android-10.0.0_r31android-10.0.0_r30android10-qpr3-s1-releaseandroid10-qpr3-releaseandroid10-qpr2-s4-releaseandroid10-qpr2-s3-releaseandroid10-qpr2-s2-releaseandroid10-qpr2-s1-releaseandroid10-qpr2-releaseandroid10-qpr1-mainline-releaseandroid10-mainline-media-releaseandroid10-d4-s1-releaseandroid10-d4-releaseRay Essick
a prior change reduced iterations through the input buffer to avoid the NEON operations from overrunning the end of the locally allocated buffer. While avoiding the overrun, it generated bad results. Here we instead extend the locally allocated buffers enough that the original iteration count won't overrun. Some pre-existing bit-exact issues remain. Bug: 136616344 Test: CTS + bit-exact cross-checks. (cherry picked from commit aae866aed579da4e1c3299a1e9b94a1713a0decb) Merged-In: Ifb790a7d1d09a4ce7da900b43e3fa1f7ab01ac53 Change-Id: Ia4a94c89979d6b3b0ddead135036aec40259f53a
2019-09-03Fix NEON optimizations buffer read overrunFelicia Lim
Thanks to Ray Essick
2019-08-08Avoid processing LPC coeffs beyond the given order in NEON optimizations am: ↵Felicia Lim
7daa5b5802 am: 3e8d8b2700 Change-Id: Id10de3b4f32d0ba2157453e731b56bb583a70405
2019-08-08Avoid processing LPC coeffs beyond the given order in NEON optimizationsFelicia Lim
am: 7daa5b5802 Change-Id: I634598d9b0d5d49cba03397dfa340502066593ca
2019-08-07Avoid processing LPC coeffs beyond the given order in NEON optimizationsFelicia Lim
Apply patch from https://git.xiph.org/?p=opus.git;a=commit;h=812ae3f Bug: 138863511 Test: Verified builds for arm* Change-Id: Ia5cc3e9be3372dcfddb4379a7afd135dbe6e21e0
2019-07-10Opus encode fails on 32-bit ARMRay Essick
NEON optimizations overrun buffer due to improper termination condition Also mark several arm-optimized routines which deliberately cause integer overflow so they won't trap. Bug: 136616344 Test: run cts -m CtsMediaTestCases -t android.media.cts.EncoderTest#testOpusEncoders' on 32 bits project Change-Id: Ib48b17fd1e4b13fe37c0e71d5f33f6f59f1f97d1
2019-07-08Avoid processing LPC coeffs beyond the given order in NEON optimizationsFelicia Lim
2019-05-31Silk CNG adapts faster to received packets with lower gainsFelicia Lim
2019-04-08Fix build errors using Makefile.mipsMark Harris
Broken by earlier ARM optimizations.
2019-01-29Fix integer overflow diagnostics within opusRay Essick
Recast several points in the Opus code where integer overflow happens. The code expects overflow in these macros, but doesn't expect the system to abort when it happens. This also includes saturating math. Bug: 123428774 Test: Cts android.media.cts.EncoderTest#testOpusEncoders
2018-11-14Upgrade Opus to v1.3android-wear-8.0.0_r2android-o-mr1-iot-release-smart-display-r9android-o-mr1-iot-release-smart-display-r8android-o-mr1-iot-release-smart-display-r5android-o-mr1-iot-release-smart-display-r40.1Jandroid-o-mr1-iot-release-smart-display-r4android-o-mr1-iot-release-smart-display-r39android-o-mr1-iot-release-smart-display-r30android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14android-o-mr1-iot-release-smart-clock-r6android-o-mr1-iot-release-smart-clock-r2android-o-mr1-iot-release-smart-clock-fsiandroid-o-mr1-iot-release-smart-clock-fcsandroid-o-mr1-iot-release-cube_r2android-o-mr1-iot-release-cube-fsiandroid-o-mr1-iot-release-cube-fcsandroid-n-iot-release-ihome-igv1nougat-iot-releaseFelicia Lim
Bug: 63932386 Test: - verified builds for arm*/x86* - checked functionality using an emulator and stagefright Change-Id: I10c4b267be1c846d8992e3c5f6d2576c2cb258a9 Signed-off-by: Felicia Lim <flim@google.com>
2018-10-30Fixes misleading initialization with not enough zerosJean-Marc Valin
2018-09-26Prevent the SILK counter from overflowing after 2 years and 9 monthsJean-Marc Valin
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.
2018-07-21Silence compiler warningsMark Harris
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
2018-05-24Fixes a SILK bandwidth switching regressionJean-Marc Valin
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.
2018-05-17Improving rate control for low bitrateJean-Marc Valin
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.
2018-05-14Silk makes use of Opus VADGustaf Ullberg
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2018-03-27two more asserts I forgotJean-Marc Valin
2018-03-27Harden SILK x86 codeJean-Marc Valin
2018-03-27Hardening silk/fixedJean-Marc Valin
2018-03-27Hardening asserts for SILK floatJean-Marc Valin
2018-03-27Converting some silk_assert()s into hardening celt_assert()sJean-Marc Valin
Only converted the ones that are really sure (not signal-dependent) and that shouldn't add much run-time complexity
2018-02-22Fixed off-by-one issue in Silk DTXGustaf Ullberg
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2018-02-18Fixes integer overflow in SILK VAD for 10-ms framesJean-Marc Valin
Reported by Chandrakala Madhira on the mailing list
2017-09-28Better rate allocation for stereo SILK in hybrid modeJean-Marc Valin
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.
2017-09-11Rename SSE 4.1 files to match their targets.Ralph Giles
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>
2017-07-07Opus 1.2.1android-o-iot-preview-5o-iot-preview-5Felicia Lim
Change-Id: I551f1de5c5e121ac1275334e67c7e0f96ab18114 Test: - verified builds for arm*/mips*/x86* - checked functionality using an emulator and stagefright
2017-06-13Fix a duplicate symbol name.Ralph Giles
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>
2017-06-02Don't use MAY_HAVE_NEON in arm_silk_map.c.Jonathan Lennox
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>
2017-05-30silk_LIMIT_32() should return an opus_int32 (not opus_int)Jean-Marc Valin
Thanks to petrufm for pointing that out: https://github.com/xiph/opus/issues/35
2017-05-23cosmetics,silk: correct input/output arg commentsLinfeng Zhang
Change-Id: I607a8b75b0711a485384d6f854cf6e2ec18b38b7 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-05-17Optimize silk_biquad_alt_stride2() for ARM NEONLinfeng Zhang
The optimization is bit exact with C function. Change-Id: Ifb8f04b19f2d576e79ce5dcfa7e0fc374d71d6c8 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-05-17Update silk_biquad_alt()Linfeng Zhang
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>
2017-04-13Optimize silk_warped_autocorrelation_FIX() for ARM NEONLinfeng Zhang
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>
2017-02-26Fix compiler warningsMark Harris
- 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
2017-02-18Fix stability testJean-Marc Valin
2017-02-18Speed up test_unit_LPC_inv_pred_gain by returning early on stable filtersJean-Marc Valin
2017-02-14Optimize silk_LPC_inverse_pred_gain() for ARM NEONLinfeng Zhang
The optimization is bit exact with C function. Change-Id: Ib3bdc26a5a4ebe02e7f24be85104e8e9a2a9a738 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-02-14Adding a unit test for LPC_inv_pred_gain()Jean-Marc Valin
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>.