Age | Commit message (Collapse) | Author |
|
The effect was to always set HB_gain to 1.
|
|
As reported by Giovanni Rovatti, this should fix some TI C55 issues.
|
|
|
|
ISO C90 forbids mixed declarations and code, r=bustage
|
|
Add a reset function for the TonalityAnalysisState struct
and call it on encoder reset.
Move the state struct above the clear line in OpusEncoder
so reset doesn't clobber reusable fields. Currently this
is only the arch field, which is moved to to top of the
struct so we can use the same memset-to-the-end pattern
as OpusEncoder.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
This interns the asm flags parameter in the state struct
so we don't need to pass it with every call. It can be
expensive, so we don't want to query every run_analysis()
call, but since this (private) api is used by webrtc code
we need to provide a supportable interface for filling in
the correct value.
Note the initialization code is partially duplicated between
opus_encoder_init and the OPUS_RESET_STATE switch case, so we
must re-initialize it there.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
|
|
|
|
|
|
Optimize opus encode (float only) usecase using ARM NE10
library. Mainly effects opus_fft and ctl_mdct_forward
and related functions.
This optimization can be used for ARM CPUs that have NEON
VFP unit. This patch only enables optimizations for ARMv7.
Official ARM NE10 library page available at
http://projectne10.github.io/Ne10/
To enable this optimization, use
--enable-intrinsics --with-NE10=<install_prefix>
or
--enable-intrinsics --with-NE10-libraries=<NE10_lib_dir> --with-NE10-includes=<NE10_includes_dir>
Compile time checks made during configure process to make sure
optimization option available only when compiler supports NEON
instrinsics.
Runtime checks made to make sure optimized functions only called
on appropriate hardware.
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
|
|
Fix out-of-bounds memory read in multichannel surround analysis
with float input that contains NaNs. Found by afl-fuzz.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
|
|
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
This allows the libopus source files to be compiled with a C++ compiler,
by ensuring that the "extern const MLP net" declaration is visible at
the point of the "const MLP net" in src/mlp_data.c. Otherwise it will
default to static linkage in C++, resulting in an undefined symbol.
Note that if compiled with a C++ compiler the symbols will be mangled,
so don't do that if you want to be able to call it from C code or run
the tests (which still require a C compiler).
|
|
|
|
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
|
|
on sensible platforms, and correct everywhere.
|
|
|
|
Based on max size of void*, opus_int32 and opus_val32, rounded up to the
nearest power of two
|
|
|
|
|
|
This should suppress our current issues with unused parameters,
unused variables, and set-but-not-used variables.
|
|
Avoid undefined behavior (signed arithmetic overflow) or
implementation-defined behavior (malloc(0)) on out-of-range arguments,
e.g. opus_multistream_encoder_create(48000, 2, 2147483647, 1, ...)
or opus_multistream_surround_encoder_create(48000, 3, 0, ...).
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
There is also no trailing whitespace.
|
|
1. Only for fixed point on x86 platform (32bit and 64bit, uses SIMD
intrinsics up to SSE4.2)
2. Use "configure --enable-fixed-point --enable-intrinsics" to enable
optimization, default is disabled.
3. Official test cases are verified and passed.
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
|
|
|
|
|
|
Considers the case where one stream would eat up all the remaining bytes,
including a 2-byte size that would then not leave enough for the even a PLC
packet in the next streams.
|
|
Limit now at 2*streams-1 and anything below that returns OPUS_BUFFER_TOO_SMALL
rather than OPUS_BAD_ARG
|
|
OPUS_AUTO should now work fine, while using OPUS_BITRATE_MAX would still
be a bad idea for controlling CBR rate for multistream. The encoder should
now throw an error early on if max_data_bytes is just too small to do anything.
|
|
Use abs(sweep_bps) instead of fabs(). "sweep_bps" is an integer,
and on some compilers this line generates a warning.
Patch from Tina le Grand.
Reviewed by Jean-Marc Valin
|
|
|
|
Broken by 306d7f5a308e30ce10ba1a1dcdbeeb81de3b2872
|
|
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
This was causing pseudostack builds to fail because opus_demo uses a 2-second
buffer.
|
|
We only keep when concealing less than 10ms with SILK.
|
|
|
|
Thanks to Kevin O'Connor for reporting this.
|
|
|
|
|
|
|
|
This is a bit faster at -O2 because memcpy()/memmove()/memset() are
vectorized. The code is also cleaner.
|
|
NaN detection should now be able to catch values that would create NaNs
further down.
|
|
This also splits the rate adjustment between SILK and CELT (previous
code only changed SILK)
|
|
Still needs more tuning
|
|
|
|
|
|
|
|
|
|
|