| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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`.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Reported by toto.
|
|
|
|
|
|
|
|
| |
There is a small typo in celt/fixed_generic.h.
Should read `nearest` rather than `neareast`.
Signed-off-by: Ralph Giles <giles@thaumas.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
remove usage of stdio.h in production code
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
|
|
|
|
| |
in tests.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
|
|
|
| |
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Broken by earlier ARM optimizations.
|
|
|
|
| |
Reported in https://github.com/xiph/opus/issues/108
|
| |
|
|
|
|
| |
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
|
|
| |
Addresses the rest of https://github.com/xiph/opus/pull/79
|