aboutsummaryrefslogtreecommitdiff
path: root/celt
AgeCommit message (Collapse)Author
2021-09-28libOpus: fix OOB read in ssse4 correlation kernelNeelkamal Semwal
Few SIMD functions read 16 bytes at a time and this potentially leads to OOB read for some buffers allocated on stack using ALLOC() calls. In order to avoid these OOB reads, ALLOC() now allocates 16 additional bytes. Bug: 191352053 Test: poc in bug description Test: atest VtsHalMediaC2V1_0TargetAudioDecTest Test: atest VtsHalMediaC2V1_0TargetAudioEncTest Change-Id: I4da2840844d60f251dd7a222f51d508e4eb8749f (cherry picked from commit 878bdeb38043407869c684fb73708b04e8fe0ce4)
2021-02-05Upgrade libopus to d633f523e36e3b6d01cc6d57386458d770d618beHaibo Huang
Test: make Change-Id: I719a5daa80f9e79d42e66cc66306fdbad4dbe3c1
2021-01-23Fix float-approx negative left shift UBMark Harris
Reported by toto.
2021-01-05Upgrade libopus to 794392ecd77e6fc6aafa62c3f6002780abcc2c7cHaibo Huang
Test: make Change-Id: I3e5232d6c6d250c69abfa71482ac91e30c1933b6
2020-12-08docs: fix simple typo, neareast -> nearestTim Gates
There is a small typo in celt/fixed_generic.h. Should read `nearest` rather than `neareast`. Signed-off-by: Ralph Giles <giles@thaumas.net>
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-09-11Merge tag 'v1.3' into masterHarish Mahendrakar
This merges tag v1.3 from upstream-master and establishes history between upstream-master and master This better positions the code for automating future pulls from the upstream repository. Bug: 167721530 Test: builds Change-Id: Ieb361bade32dd21ab7dadbb74b79d3ee3c13ec1a
2020-08-21Fix MSVC warning about trunction from double to floatNirbheek Chauhan
Specify the precision as float to avoid truncating from double. Signed-off-by: Mark Harris <mark.hsj@gmail.com>
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-21celt: Fix broken SSE pre-processor check due to typoNirbheek Chauhan
This broke 5 years ago in 43120f00758219a784f952754f33b9788a8d731b Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2020-06-14Fix arm build with rtcd enabled.Ralph Giles
The autotools build doesn't set OPUS_HAVE_RTCD for arm targets, assuming all the supported intrinsics will work on the runtime cpu. The cmake build however defines this by default when the neon extension is available on the target. On Linux, the runtime cpu detection reads /proc/cpuinfo, so removing stdio.h from celt/os_support.h meant that the cmake build for arm targets failed. We don't currently have ci runs for that configuration, so this only became apparent through manual testing. Signed-off-by: Marcus Asteborg <maastebo@microsoft.com> Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2020-06-13Fix trailing whitspace in previous commitMarcus Asteborg
Signed-off-by: Ralph Giles <giles@thaumas.net>
2020-06-14Prefer SSE and ASM implementation of float2int before lrintf for MSVCMarcus Asteborg
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2020-06-11Fix intrin0.h include guard.Ralph Giles
This lighter-weight intrinsics header is available starting with Microsoft Visual Studio 2017, so the previous change to allow this header failed when building with Visual Studio 2015. Restores the appveyor continuous integration build.
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-05-25fix equivalent bitrate calculation for <20ms frame sizesHector Martin
Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2020-04-13Fix celt decoder assertion when using OPUS_CUSTOMNiclas Olmenius
When using OPUS_CUSTOM, `CELTDecoder->end` can be larger than 21. Assert against 25 instead in OPUS_CUSTOM builds. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2019-04-08Fix build errors using Makefile.mipsMark Harris
Broken by earlier ARM optimizations.
2019-04-01Fix #elif OPUS_ARM_INLINE_EDSPJean-Marc Valin
Reported in https://github.com/xiph/opus/issues/108
2019-03-01Fix mismatching arg names in function declaration and definitionFelicia Lim
2019-01-20Fix FIXED_POINT conditional checkevpobr
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
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-31Make float2int() static with VSJean-Marc Valin
Addresses the rest of https://github.com/xiph/opus/pull/79
2018-10-16Proper detection of _mm_cvtss_si32 for MS compilerPavel P
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2018-10-16Renaming compute_allocation to clt_compute_allocation() to avoid symbol clashesJean-Marc Valin
As suggested in https://github.com/xiph/opus/pull/83
2018-07-28Work around VS2015 internal compiler errorMark Harris
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.
2018-07-26Fix comma that should have been a semicolonJean-Marc Valin
Didn't cause any problem, but still good to fix. Reported by keithchugg on github.
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-28Fix DISABLE_FLOAT_API unused parameter warningMark Harris
2018-05-28Only call isqrt32() with a positive argumentMark Harris
Fixes test_opus_projection failure under ubsan, due to clz(0).
2018-05-17Oops, fix NaN testJean-Marc Valin
2018-05-15Aborting on NaN in CELTJean-Marc Valin
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.
2018-03-27two more asserts I forgotJean-Marc Valin
2018-03-27Asserting on some ctl() calls that should never failJean-Marc Valin
2018-03-27Adding decoder state validationJean-Marc Valin
2018-03-27Adding ENABLE_HARDENINGJean-Marc Valin
Enables "safes" assertions even with ENABLE_ASSERTIONS isn't set
2018-02-18Forgot one RFC8251 behaviour to disable with --disable-rfc8251Jean-Marc Valin
Reported by daddesio in #opus
2018-02-15Disabling weak transients and 5ms resolution on voiced framesJean-Marc Valin
2018-02-13Add a simple masking model to the spreading decisionJean-Marc Valin
This improves cases where a whole region is dominated by a handful of tones
2018-02-13Making sure importance[] is initialized even when we don't use dynallocJean-Marc Valin
2018-02-13oopsJean-Marc Valin
2018-02-13Improve TF analysis RDO to take into account how important each band isJean-Marc Valin
Also adds the error terms for band 0 that were previously omitted
2018-01-26Scaling back the pitch filter when most of the energy is above 3.2 kHzJean-Marc Valin
That corresponds to the fundamental for the shortest pitch period allowed
2017-10-30Fix unnecessary assignment.Roman Kalashnikov
Fixes a warning from PVS-Studio. This was a cut-and-paste error from the stanza above and had no effect. Signed-off-by: Ralph Giles <giles@thaumas.net>
2017-10-29Enable RFC 8251 changes by defaultJean-Marc Valin
2017-10-08Fix entropy coder docJean-Marc Valin
Addresses issue https://github.com/xiph/opus/issues/54
2017-10-08Simplifying celt_fir5() since x==y and mem[]={0}Jean-Marc Valin
Addresses issue https://github.com/xiph/opus/issues/58