Commit graph

21 commits

Author SHA1 Message Date
Gregory Maxwell
9881484dbd test_opus_api: Fix valgrind expectations broken by last commit.
The last commit changed some of the multistream tests to use a
dual-mono setup instead of a single-stereo setup. Some of the
accompanying explicit valgrind checks were still setup to
look for stereo streams.
2012-07-11 02:18:44 -04:00
Gregory Maxwell
28b41ae5ae Add OPUS_{GET|SET}_GAIN CTLs for adjusting output gain.
This CTL was requested by Nicolas George for FFmpeg.
2012-07-11 00:04:24 -04:00
Gregory Maxwell
c64f4a4265 Update headers to cause warnings on unused returns and null args.
In places where an ignored return or a null-arg is a sure indication
of a bug add the GCC warning attributes. The null arg annotation
is not enable for Opus itself because it will cause the compiler
to optimize out some null checks. I don't trust our callers
quite that much.
2012-06-01 15:58:17 -04:00
Jean-Marc Valin
24ed465e71 int vs opus_int32 consistency 2012-05-18 15:14:17 -04:00
Jean-Marc Valin
cb05e7cd96 s/FOUNDATION/COPYRIGHT OWNER/ in CELT code and "glue code"
Also added 3rd clause to "master" COPYING file
2012-04-20 16:41:42 -04:00
Gregory Maxwell
e699c1989c Testing tools improvements (no impact on draft) 2011-11-25 23:53:15 -05:00
Gregory Maxwell
afd05aca0c Fix multistream packet corruption, implement GET_FINAL_RANGE for 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.
2011-10-30 19:57:22 -04:00
Gregory Maxwell
c81b510239 Fix a number of multistream decoder bugs; add some very basic multistream decoder tests. 2011-10-30 02:20:41 -04:00
Ralph Giles
7931a60135 Remove relative paths to opus.h.
Files are already compiled with -I./include, the relative
path in the #include line isn't necessary.
2011-10-28 11:30:57 -07:00
Ralph Giles
839de4d082 Remove the define check for __GNUC_PREREQ.
Our arch.h makes sure it's always defined. Thanks to derf
for the suggestion.
2011-10-28 11:03:29 -07:00
Ralph Giles
b4dd4eb780 Fix the test for gcc version >= 4.6 to work for gcc 5 and up.
We use the __GNUC_PREREQ macro from celt/arch.h to check
the required minimum gcc version. The previous check would
have failed for gcc 5.n with n from 0 to 5.

Thanks to pcgod for pointing out the problem and derf for
pointing out we had a macro for this.
2011-10-28 10:51:17 -07:00
Ralph Giles
732ac84452 Move opus_apps inside the MALLOC_FAIL block.
This array is only used by the malloc failure test, and
defining it unconditionally creates an unused variable
warning on platforms where MALLOC_FAIL isn't set.
2011-10-28 10:26:20 -07:00
Ralph Giles
455993f1e1 Make the MALLOC_FAIL test solely dependent on HAVE___MALLOC_HOOK.
This test only works on glibc, but the important thing is support
for the __malloc_hook api, so that's what we should depend on,
especially since not all glibc versions have it.
2011-10-28 10:20:16 -07:00
Ralph Giles
b88a7baf34 Use #pragma GCC diagnostic push/pop only on gcc 4.6 and later.
These pragmas were adding in 4.6, and earlier versions warn
about them being undefined.
2011-10-28 10:20:16 -07:00
Ralph Giles
c19bc34638 Check for __malloc_hook and define MALLOC_FAIL appropriately.
The glibc 2.14 NEWS file says __malloc_hook will be removed
in the next release, so future-proof our use by checking
for this symbol at configure time and only compiling the
malloc failure tests if it is present.
2011-10-28 10:20:16 -07:00
Ralph Giles
ed90cdc369 Disable the deprecated function warning on __malloc_hook.
This just works around the deprecation in glibc 2.14. I
do worry what will happen if they follow through and
remove it in 2.15.
2011-10-28 10:20:16 -07:00
Gregory Maxwell
657dea717e Moving the dash header inline to appease the apple gcc. 2011-10-28 12:10:14 -04:00
Jean-Marc Valin
e6a0be8ee6 Makes OPUS_SET_VOICE_RATIO private
Let's put it back in if/when we have a clearer view of voice/music detection
2011-10-27 13:43:43 -04:00
Gregory Maxwell
6b9c29aee4 Add a test for MAX_BANDWIDTH to test_opus_api. 2011-10-27 09:36:50 -04:00
Jean-Marc Valin
4923f3f80e Moves the main headers from src/ to include/ 2011-10-26 21:36:57 -04:00
Gregory Maxwell
a5ff49ecdc Renames test_opus to opus_demo and adds the test_opus_api, test_opus_encode, test_opus_decode test programs. 2011-10-26 19:59:49 -04:00