aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-10-28Add support for Meson build systemTim-Philipp Müller
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
2020-08-21Replace WIN32 with _WIN32 everywhereNirbheek Chauhan
_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
2020-08-10opus_decoder_fuzzer: limit the number of decodes to avoid timeoutFelicia Lim
2020-06-18Fix and clean up opus_decode_fuzzerFelicia Lim
Use the fuzzed sub-length of the input data instead of the whole input.
2020-06-11Disable message box when calling abort(). The message box is causing hangs ↵Marcus Asteborg
in tests. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2019-02-25test_opus_encode: Use fprintf instead of snprintfMark Harris
snprintf is not in C89. Fixes opus-pedantic test failure introduced in 59f8e5e4f.
2018-12-29Clean up resources in projection testMark Harris
2018-10-31Trivial sprintf to snprintf conversion. Some linkers warn about unbounded ↵Janne Johansson
sprintf calls. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2018-07-26Remove ambisonics experimental flagJean-Marc Valin
2018-07-26oopsJean-Marc Valin
2018-07-21Validate multistream/projection decoder frame_sizeMark Harris
2018-07-21Silence compiler warningsMark Harris
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
2018-03-27Adding ENABLE_HARDENINGJean-Marc Valin
Enables "safes" assertions even with ENABLE_ASSERTIONS isn't set
2017-12-07Ensure mapping matrix size is always valid.Andrew Allen
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-12-07Fix memory issues in Projection API.Andrew Allen
Modified by Jean-Marc Valin Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-11-07Support for Channel Mapping 253Andrew Allen
OpusProjection* classes MixingMatrix class Projection tests Change-Id: I98644466abf4ffd36e48bdecad1204d69e1539b9 Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-07-13Add missing #include for gccFelicia Lim
2017-07-12Avoid -Wsometimes-uninitialized error for valid test codeFelicia Lim
|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.
2017-06-13tests/run_vectors.sh: Fix argument quotingMark Harris
Allows spaces in path arguments
2017-02-26Fix compiler warningsMark Harris
- 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
2017-02-18test_opus_decode: Fix build on GCC 3.4 to 4.5.xMark Harris
Broken by b0949f11, reported by ko-zu on GitHub.
2017-02-10Add decoder fuzz target.Felicia Lim
2016-11-16Correct SILK encoder gain limitMark Harris
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.
2016-11-05Fix crash on bad encoder frame_size argumentMark Harris
2016-11-02Eliminate trailing spacesMark Harris
2016-11-02Reduce redundancy when SILK uses too many bitsMark Harris
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.
2016-11-01Temporarily disable -Wnonnull around an opus_decode() call in test_opus_decode.cJean-Marc Valin
Reported by wtchang in trac: https://trac.xiph.org/ticket/2160
2016-10-29New regression test from Mark's fuzzing test casesJean-Marc Valin
2016-10-27Update bandwidth and opusCanSwitch before generating SILK DTX ToCFelicia Lim
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2016-10-27Support encoding 80/100/120 ms frame lengthsFelicia Lim
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2016-10-05Fixing some opus_int vs opus_int32 mismatchesJean-Marc Valin
Reported by Mark Warner.
2016-09-16Remove float ops from encoder settings fuzzer testFelicia Lim
2016-09-15Fix mixed declarations and codeJean-Marc Valin
2016-09-15Fuzzer test for changing encoder settings onlineFelicia Lim
2016-09-01Make it possible to ignore inverted phase stereo for downmix purposesJean-Marc Valin
2016-07-21test_opus_decode: Check all soft clip samplesMark Harris
2016-07-21tests: Avoid shift into sign undefined behaviorMark Harris
2016-07-04Making calls to opus_packet_pad() on a bad packet return OPUS_INVALID_PACKETJean-Marc Valin
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.
2015-09-01Make it possible to pass in paths to opus_demo and opus_compare.Jonathan Lennox
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.
2014-01-14Fix malloc_hook warning on glibc 2.17 and later.Ralph Giles
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.
2013-11-24Put custom_encoder_init decl behind CUSTOM_MODES. More softclip tests.Gregory Maxwell
This removes an unused definition warning when compiling without custom modes.
2013-11-22Minor opus_pcm_soft_clip API hardening and tests.Gregory Maxwell
2013-11-22Add some multistream resets to the tests.Gregory Maxwell
2013-11-21Add copyright header to test_opus_padding.c.Ralph Giles
2013-11-19Additional opus_multistream_packet_(un)pad tests.Gregory Maxwell
2013-11-18Add opus_packet_(un)pad tests.Gregory Maxwell
2013-11-17Fixes SILK surround calibration while fixing other MSVC warningsJean-Marc Valin
2013-11-17Add some basic testing for OPUS_{GET|SET}_PREDICTION_DISABLED.Gregory Maxwell
2013-11-08Hides OPUS_FRAMESIZE_VARIABLE from the API until it actually worksJean-Marc Valin
2013-10-28Replace "inline" with OPUS_INLINE.Gregory Maxwell
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.