- 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
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.
PLC and FEC now return exactly the number of samples specified for the
buffer rather than (usually) returning the size of the last packet.
Doc and tests are updated accordingly.
As reported by Mark Warner opus_multistream_*_create were depending on
the behavior of malloc(0) in order to correctly report some kinds of
argument errors. Bad arguments could be incorrectly reported as
allocation failures. This changes multistream to explicitly check the
arguments like the single stream _create functions. The unit tests were
enough to catch this on systems where malloc(0) returns NULL but didn't
catch it on other systems because the later _init call would catch the
bad arguments and trigger the correct error if and only if the malloc
didn't return a null pointer.
In multistream_encoder_init failures of the internal non-multistream
init calls were not being caught and propagated. Decode didn't have
this problem. This propagates the errors and adds additional tests
(the multistream encoder api is sill under tested) that would have
detected this error.
Plus add some stronger tests for things like error==NULL for the _create
functions that take a pointer for error output.
Previously the test programmes happened to link because _getpid
returns an int, which is the default prototype. Instead, include
the appropriate header to supply a real declaration, fixing the
associated warning.
I moved the getpid->_getpid define to the site of the header
inclusion to make clear what's going on, rather than have it
floating in win32/config.h.
Multistream encode was failing to add the length of the extra length for
self-delimited packets causing corrupted output. Multistream decode was
not properly handling lost frames (and potentially reading out of bounds
as a result).
GET_FINAL_RANGE has been implemented as the xor of the final range of all
the streams in the packet.
test_opus_encode now does the mono narrowband tests using dual-mono
multistream.