summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Ensuring we can see where crashes occurJean-Marc Valin2022-07-221-0/+4
| | | | Reviewed by Mark Harris
* Remove unused variable in testsMarcus Asteborg2022-07-051-6/+3
| | | | Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Replace assert with test_failed function in testMarcus Asteborg2022-07-053-20/+18
| | | | | | | This will fix -Wunused-but-set-variable on gcc 9.3 release build. Also remove unused assert.h. Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Fix quoting and whitespace errors in build testMark Harris2022-07-052-35/+34
| | | | Reviewed by Jean-Marc Valin.
* Add asan/ubsan support in random testsJean-Marc Valin2022-07-051-3/+6
|
* Adds OPUS_SET_INBAND_FEC(2) optionJean-Marc Valin2022-06-301-1/+1
| | | | | Unlike OPUS_SET_INBAND_FEC(1), the encoder does not necessarily switch to SILK if we have music.
* Fixes --disable-rtcdJean-Marc Valin2022-06-281-2/+2
| | | | | Make sure we don't try to use the rtcd table when rtcd is disabled. That code still needs a lot more cleaning up.
* print rate used for testvectorsJean-Marc Valin2022-04-021-1/+2
|
* Cleanup testing directories to save spaceJean-Marc Valin2022-04-012-6/+11
|
* build test scriptsJean-Marc Valin2022-03-312-0/+147
|
* Add support for Meson build systemTim-Philipp Müller2020-10-281-0/+34
| | | | | | | | | | | | | | Tested on: - Linux/x86* with gcc - Android armv7 arm64 x86 x86_64 with clang - Windows x86 x86_64 with Visual Studio 2017 - Windows x86 x86_64 with MinGW - macOS x86_64 with clang - iOS arm64 x86_64 with clang Co-authored by: Nirbheek Chauhan <nirbheek@centricular.com> https://gitlab.xiph.org/xiph/opus/-/merge_requests/13
* Replace WIN32 with _WIN32 everywhereNirbheek Chauhan2020-08-211-1/+1
| | | | | | | | _WIN32 is defined on all Windows platforms by every compiler that targets Windows. We do not need WIN32 at all. Signed-off-by: Mark Harris <mark.hsj@gmail.com> Resolves https://github.com/xiph/opus/pull/104
* opus_decoder_fuzzer: limit the number of decodes to avoid timeoutFelicia Lim2020-08-101-1/+4
|
* Fix and clean up opus_decode_fuzzerFelicia Lim2020-06-181-19/+14
| | | | Use the fuzzed sub-length of the input data instead of the whole input.
* Disable message box when calling abort(). The message box is causing hangs ↵Marcus Asteborg2020-06-111-0/+3
| | | | | | in tests. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* test_opus_encode: Use fprintf instead of snprintfMark Harris2019-02-251-16/+18
| | | | | snprintf is not in C89. Fixes opus-pedantic test failure introduced in 59f8e5e4f.
* Clean up resources in projection testMark Harris2018-12-291-0/+2
|
* Trivial sprintf to snprintf conversion. Some linkers warn about unbounded ↵Janne Johansson2018-10-311-1/+1
| | | | | | sprintf calls. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Remove ambisonics experimental flagJean-Marc Valin2018-07-261-14/+0
|
* oopsJean-Marc Valin2018-07-261-2/+2
|
* Validate multistream/projection decoder frame_sizeMark Harris2018-07-211-0/+2
|
* Silence compiler warningsMark Harris2018-07-211-33/+29
| | | | | | | clang -Wcast-align warnings with ambisonics enabled clang -Wnull-pointer-arithmetic warnings in test_opus_api.c gcc -Wimplicit-fallthrough warnings on arm msvc warning C4244 in celt_encoder.c with fixed point
* Adding ENABLE_HARDENINGJean-Marc Valin2018-03-271-5/+5
| | | | Enables "safes" assertions even with ENABLE_ASSERTIONS isn't set
* Ensure mapping matrix size is always valid.Andrew Allen2017-12-071-3/+7
| | | | Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Fix memory issues in Projection API.Andrew Allen2017-12-071-132/+103
| | | | | | Modified by Jean-Marc Valin Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Support for Channel Mapping 253Andrew Allen2017-11-071-0/+431
| | | | | | | | | OpusProjection* classes MixingMatrix class Projection tests Change-Id: I98644466abf4ffd36e48bdecad1204d69e1539b9 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Add missing #include for gccFelicia Lim2017-07-131-0/+1
|
* Avoid -Wsometimes-uninitialized error for valid test codeFelicia Lim2017-07-121-0/+2
| | | | | | |frame_size_enum| in tests/test_opus_encode.cl:117 is flagged as potentially uninitialized but get_frame_size_enum() will fail anyway if a valid value is not found.
* tests/run_vectors.sh: Fix argument quotingMark Harris2017-06-131-30/+30
| | | | Allows spaces in path arguments
* Fix compiler warningsMark Harris2017-02-262-2/+5
| | | | | | | | | | | | | | | | | | | - 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
* test_opus_decode: Fix build on GCC 3.4 to 4.5.xMark Harris2017-02-181-2/+2
| | | | Broken by b0949f11, reported by ko-zu on GitHub.
* Add decoder fuzz target.Felicia Lim2017-02-102-0/+127
|
* Correct SILK encoder gain limitMark Harris2016-11-161-0/+37
| | | | | | | Ensure that the SILK encoder's log gain is 63, not 64, when encoding a maximum-value delta gain index of 40. This matches the decoder and RFC 6716 4.2.7.4, and prevents an assertion failure in the rare case that the gain is later independently coded.
* Fix crash on bad encoder frame_size argumentMark Harris2016-11-051-0/+1
|
* Eliminate trailing spacesMark Harris2016-11-021-11/+11
|
* Reduce redundancy when SILK uses too many bitsMark Harris2016-11-021-0/+33
| | | | | | | | Fix Hybrid redundancy assertion failure in ec_enc_shrink(), even if SILK produces more than maxBits, by reducing or eliminating redundancy when necessary. Don't reserve space for redundancy that is too small to be used for redundancy. When there is not enough space for redundancy, allow the regular frame to use all the bits.
* Temporarily disable -Wnonnull around an opus_decode() call in test_opus_decode.cJean-Marc Valin2016-11-011-0/+7
| | | | Reported by wtchang in trac: https://trac.xiph.org/ticket/2160
* New regression test from Mark's fuzzing test casesJean-Marc Valin2016-10-293-0/+966
|
* Update bandwidth and opusCanSwitch before generating SILK DTX ToCFelicia Lim2016-10-271-6/+0
| | | | Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Support encoding 80/100/120 ms frame lengthsFelicia Lim2016-10-272-2/+25
| | | | Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Fixing some opus_int vs opus_int32 mismatchesJean-Marc Valin2016-10-052-6/+7
| | | | Reported by Mark Warner.
* Remove float ops from encoder settings fuzzer testFelicia Lim2016-09-161-5/+5
|
* Fix mixed declarations and codeJean-Marc Valin2016-09-151-1/+1
|
* Fuzzer test for changing encoder settings onlineFelicia Lim2016-09-151-10/+190
|
* Make it possible to ignore inverted phase stereo for downmix purposesexp_bitstream7Jean-Marc Valin2016-09-011-8/+17
|
* test_opus_decode: Check all soft clip samplesMark Harris2016-07-211-6/+6
|
* tests: Avoid shift into sign undefined behaviorMark Harris2016-07-212-2/+2
|
* Making calls to opus_packet_pad() on a bad packet return OPUS_INVALID_PACKETJean-Marc Valin2016-07-041-2/+2
| | | | | | | We were previously returning OPUS_BAD_ARG because the failure was only detected in opus_repacketizer_out_range_impl() rather than in opus_repacketizer_cat(). Checking the return value from opus_repacketizer_cat() also addresses the last outstanding Coverity defect.
* Make it possible to pass in paths to opus_demo and opus_compare.jon_patchesJonathan Lennox2015-09-011-2/+2
| | | | | | | | | | This patch lets you pass paths for opus_demo and opus_compare to the run_vectors.sh script. The motivation for this was for my aarch64 patches (forthcoming), which I've been testing under qemu. I want to run an emulated opus_demo, but a native opus_compare, so the script completes in a reasonable amount of time.
* Fix malloc_hook warning on glibc 2.17 and later.Ralph Giles2014-01-141-1/+1
| | | | | | | | | | | | | | In glib 2.17 the __malloc_ptr define was removed in favour of using void* directly. Our declaration of mhook using this type for the second argument therefore rightly generates a warning on modern systems, since the type is assumed to be an int, which is too narrow to hold a pointer on 64 bit architectures. Since it was only ever a define we could use an #ifndef to define __malloc_ptr ourselves. However we only use it once, so using void* in the signature directly is cleaner. This should cause no problems on older systems where it will match either the void* or the char* (for non __STDC__ code) the define resolved to.