Age | Commit message (Collapse) | Author |
|
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update libopus
For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
Test: TreeHugger
Change-Id: Ifb9d10d5a1ccb2e7c117b58494c05eb46835f0ad
|
|
This makes kiss_twiddle_cpx 4-byte aligned (instead of 2-byte) for
fixed-point builds. Tested with an armv6j+nofp development board, CELT
encoding becomes 1.4x as fast, and decoding over 2x.
Performance gain is mostly attributed to the proper alignment of the
static const array mdct_twiddles960.
Co-authored-by: David Gao <davidgao@google.com>
Signed-off-by: Felicia Lim <flim@google.com>
|
|
Test: Treehugger
Change-Id: Id73447aa0fc7c873f1a476c95b02606ec6f7a2f6
|
|
Bug: 240201310
Test: atest CtsMediaV2TestCases -- --module-arg \
CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.android.opus.
Change-Id: I8c30b927e81e707efbb13cf9265cbbef0e344152
|
|
Reviewed by Mark Harris
|
|
MULT16_32_QX() is now implemented using a signed-unsigned multiply,
so the second argument can now have one extra bit compared to the
old signed-signed implementation.
Reviewed by Mark Harris
|
|
We need to move the history out of the way before we write to the
shape array X, or else we get corruption of the audio.
Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
|
|
When building with FLOAT_APPROX.
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
|
|
|
|
To avoid issues with empty compilation units.
|
|
Also #error if RTCD is enabled without a detection method, like Arm.
A number of SILK functions also still used the lookup tables, even
when RTCD was disabled.
Fix those, too.
|
|
|
|
|
|
|
|
|
|
The values were never used, but ubsan + valgrind would complain.
Reviewed by Mark Harris
|
|
Reviewed by Mark Harris
|
|
Reviewed by Mark Harris
|
|
The underlying objects are all 8-bit integers.
Verified that the generated assembly still just uses MOVD.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
Estimate the rounding error so that we can have a useful margin of
error when checking the asm against the C code even when the float
operations get reordered due to -ffast-math.
|
|
Makes ti possible to randomize (with --enable-fuzzing) the CPU flags
so we can better test all the intrinsics implementations.
|
|
Valgrind versions prior to 3.17.0 assume that an uninitialized value
in ECX causes the whole output of CPUID to be uninitialized, even
though ECX is only "read" by CPUID for certain values of EAX.
Work around that by guaranteeing that ECX is initialized.
|
|
This function can fail if CPUID is not supported or the maximum
supported value of EAX is less than the requested one.
Check the return value and explicitly disable all SIMD if it does
fail.
This was happening before implicitly because of the initialization
of info[] to zero, but being explicit about it makes it less likely
someone will break this behavior because they did not realize what
was going on.
|
|
Make sure we don't try to use the rtcd table when rtcd is disabled.
That code still needs a lot more cleaning up.
|
|
Reviewed by Timothy B. Terriberry.
|
|
We now update the background noise estimate even in frames classified
as transient. It shouldn't be a problem because we're using min
statistics. Also, it avoids problems when update frames get
missclassified as transient.
In addition, we now use the duration of losses rather than the
number of lost packets to make decisions. That should make
PLC/DTX behaviour more consistent across frame sizes.
|
|
Prevents using lrint/lrintf when compiling with -std=c90 even though the
functions are in libm. This was causing tests to fail, likely due to
incorrect prototypes.
|
|
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
These could result in 16-byte-aligned loads on unaligned data, causing
a segfault.
|
|
Before, an overflow can occur in the last loop if `len` is not a
multiple of 4 as OP_CVTEPI16_EPI32_M64 tries to load 64 bits, but there
are insufficient bits allocated in `x`.
|
|
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)
|
|
|
|
|
|
|
|
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.
|
|
Test: make
Change-Id: I719a5daa80f9e79d42e66cc66306fdbad4dbe3c1
|
|
Reported by toto.
|
|
Test: make
Change-Id: I3e5232d6c6d250c69abfa71482ac91e30c1933b6
|
|
There is a small typo in celt/fixed_generic.h.
Should read `nearest` rather than `neareast`.
Signed-off-by: Ralph Giles <giles@thaumas.net>
|
|
Test: make
Change-Id: I995f04a04951ca22916a7b418afdd8ba59bcd130
|
|
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
|
|
Bug: 167721530
Test: atest android.mediav2.cts
Test: run vts -m VtsHalMediaC2V1_0TargetAudioDecTest
Test: run vts -m VtsHalMediaC2V1_0TargetAudioEncTest
Change-Id: Id6900a9d5084fb6ae840f44a2b9133f95e1b96bc
|
|
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
|
|
Specify the precision as float to avoid truncating from double.
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
|
|
_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
|
|
This broke 5 years ago in 43120f00758219a784f952754f33b9788a8d731b
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
|
|
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>
|
|
Signed-off-by: Ralph Giles <giles@thaumas.net>
|
|
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
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.
|