Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
This avoids allocating any buffers on the stack that depend on the
total channel count.
Such buffers could easily exceed the size of the
NONTHREADSAFE_PSEUDOSTACK.
It also checks the frame_size argument in both the encoder and
decoder to avoid allocating large stack buffers for opus_encode()
calls that would fail anyway or opus_decode() calls that would
never use all that space anyway.
|
|
This makes simple syntax highlighters (e.g., vim) stop complaining
because they don't parse the #ifdef's.
|
|
|
|
|
|
|
|
|
|
This CTL was requested by Nicolas George for FFmpeg.
|
|
|
|
Also added 3rd clause to "master" COPYING file
|
|
|
|
Fixes the encoder bitrate CTLs to correctly apply to all streams,
prevents the MS encoder from starving the latter streams by not
reserving a reasonable minimum amount of space for them.
|
|
Also change the packet length in the API from int to opus_int32
because repacketized frames are able to go beyond 32767 bytes
in size.
|
|
This has no impact on opus_demo, test vectors, or "normal" codec operation
|
|
|
|
multistream, and add many tests.
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.
|
|
decoder tests.
|
|
This avoids potential alignment issues with allocating a char
array on the stack.
|
|
Also reformat some, but by no means all, of the opus
code for line length and three-character indents.
|
|
The parameters for public API calls are already documented
in opus_multistream.h. It's better not to have separate
copies of those comments in the implementation.
|
|
Untested
|
|
|
|
Not tested
|
|
|
|
|
|
|
|
|
|
Removes a bunch of system #include <...> in the process
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only tested for the single-stream case!
|