Age | Commit message (Collapse) | Author |
|
Bug: 190882774
Test: poc in bug description
Change-Id: Ib780a7d3e114ed29047c50459c01462c6b244f31
|
|
remove usage of stdio.h in production code
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
Copy the previous analysis data instead of flagging as invalid
|
|
|
|
The previous code would go out of sync in those cases.
|
|
logE[b] can end up slightly larger than tonal->highE[b] due to rounding
|
|
|
|
|
|
That corresponds to the fundamental for the shortest pitch period allowed
|
|
|
|
Larger network, using 8-bit weights
|
|
The masking term was previously completely broken (even in 1.1). The
bandwidth detection relies mostly on the noise floor and can only use
masking to cut one extra band. The 12-24 kHz energy is now normalized properly
but uses a higher noise floor due to the leakage in the resampler. Bandwidth
detection is still mostly useless at identifying SWB speech (it usually says
FB).
|
|
Based on two dense layers with a GRU layer in the middle
|
|
The new detector for SWB vs FB is unreliable due to the hack
that was required to get 24 kHz analysis working. We're now err
on the side of FB just to make sure.
|
|
|
|
|
|
|
|
This was sometimes causing the music probability to be stuck at
zero at the beginning of files
|
|
|
|
|
|
We boost bands that either cause leakage or are filled with leakage
|
|
Now scaling the energy to the same value is would be in floating-point
|
|
- 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
|
|
The change also makes the analysis run for sampling rates of 16 kHz and 24 kHz
since the features are only computed on the 0-8 kHz band. The longer time
window (20 ms instead of 10 ms) makes the tonality estimator more reliable
for low-pitch harmonics.
|
|
|
|
|
|
A frame is marked as valid for DTX if it contains noise or only digital
silence. As before, there is an overhang period of 200 ms and a maximum
consecutive DTX period of 400 ms.
If the new DTX cannot be used because of the complexity setting and
sampling frequency chosen, the SILK DTX will be used instead.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
|
|
|
|
New MLP doesn't attempt to classify silence as speech/music
|
|
|
|
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>
|
|
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).
|
|
|
|
|
|
|
|
Newer versions of MSVC are unhappy with the strategy of the build
environment redefining "inline" (even though they don't support the
actual keyword). Instead we define OPUS_INLINE to the right thing
in opus_defines.h.
This is the same approach we use for restrict.
|
|
|
|
|
|
Should fix delayed decision on surround, but not well tested.
|
|
This should make the scaling the same for fixed and float. It changes the float
scaling too by normalizing by the number of channels, which matters for
bandwidth detection.
|
|
|
|
Code is still float, but at least tonality esitmation seems to work.
Speech/music analysis is still disabled.
|
|
I checked that it's not *completely* busted, but it probably needs more testing.
|
|
This reverts commit 43279728cd39947f95dbf77557a0a698f164fdd1.
|
|
At a minimum MSVC warns on some of this stuff.
|
|
|
|
|
|
|