Doing the overlap coying in the same OPUS_MOVE() as the rest of the synthesis
memory. Also, there was a missing OPUS_MOVE() in the PLC for the hybrid/CNG
case.
Use the output buffer directly for imdct output, avoiding use of an
intermediary buffer and copying from it. This works because the output
buffer is offset to always be continous with the overlap buffer in the
decoder. Adjust encoder resynth code to have the same buffer layout.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
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.
Specify the correct debug runtime libraries for the test
and demo executables to prevent mismatch warnings with
the default runtime.
Signed-off-by: Ralph Giles <giles@mozilla.com>
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.
Updates the project files to include the new encoder source files.
Use OPUS_RESTRICT and include config.h to set the proper defines
for build under MSVC.
The Microsoft compiler warns about precision reduction from
default double literals to the floats we generally use outside
the fixed-point build. Avoid these by qualifying the literals
as floats.
Thanks to derf for review.
This fixes a SWB hybrid issue where band 18 isn't folded and cannot even
be folded because it's wider than band 17. This was causing noise to
be injected instead.
Fixes a regression in the recursive builds introduced in 5467ce7b3f
that causes `make check-opus` to fail horribly.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>