summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Ensuring we can see where crashes occurexp_ubsan1Jean-Marc Valin2022-07-221-0/+4
|
* More ubsan fixes for the debug macros themselvesJean-Marc Valin2022-07-221-9/+9
|
* Using saturating round to fix some wrap-aroundsJean-Marc Valin2022-07-222-9/+9
|
* Relaxing checks for MULT16_32_QX()Jean-Marc Valin2022-07-221-2/+2
| | | | | | MULT16_32_QX() is now implemented using a signed-unsigned multiply, so the second argument can now have one extra bit compared to the old signed-signed implementation.
* Fix NORM_ALIASING_HACKJean-Marc Valin2022-07-151-5/+4
| | | | | | | We need to move the history out of the way before we write to the shape array X, or else we get corruption of the audio. Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
* Silence MSVC C4244 warningMarcus Asteborg2022-07-121-1/+1
| | | | | | When building with FLOAT_APPROX. Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Silence Clang 13+ null-pointer-subtraction warningMark Harris2022-07-101-1/+1
|
* Only build platform RTCD sources when enabled.Timothy B. Terriberry2022-07-098-14/+52
| | | | To avoid issues with empty compilation units.
* Don't compile x86 cpu detection without RTCD.Timothy B. Terriberry2022-07-096-24/+36
| | | | | | | Also #error if RTCD is enabled without a detection method, like Arm. A number of SILK functions also still used the lookup tables, even when RTCD was disabled. Fix those, too.
* Make silk/x86 header indentation consistent.Timothy B. Terriberry2022-07-092-51/+51
| | | | The indentation for nested #ifs was all over the place.
* Fix C90-related warningsexp_warnings1Jean-Marc Valin2022-07-096-7/+10
|
* update doc on custom modeMarcus Asteborg2022-07-091-1/+2
| | | | Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* cmake - move warning C4244 to level 4Marcus Asteborg2022-07-071-0/+4
| | | | | | | Opus compare is used to generate test vectors so no cosmetic changes is taken. Hence we move this warning to level 4 for opus compare. Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* cmake - fix rtcd detection on x86 non windowsMarcus Asteborg2022-07-075-10/+76
| | | | Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* cmake - fix lrintf, lrint detectionMarcus Asteborg2022-07-071-9/+20
| | | | | | | | | | | | | This commit addresses the issues of not finding lrintf and lrint. We switch to check_symbol_exists instead per cmake documentation. Also make sure to link math lib for detection for nix. For MSVC the issue for non x86 builds was that the standard was set to default which is 199409L. This resulted in not using lrintf even that it was found. To address this we set the C standard to C11 and it will only apply to newer versions of MSVC where the /std flag is supported. Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Fix uninitialized field on custom mode malloc failMark Harris2022-07-071-0/+3
|
* meson: Fix reporting of cpu family if intrinsics not supportedDoug Nazar2022-07-061-2/+2
| | | | Signed-off-by: Doug Nazar <nazard@nazar.ca>
* Update x86 CPU detection configure check.Timothy B. Terriberry2022-07-061-1/+1
| | | | | | | | | | Commit 6577534a80c8 switched from using __get_cpuid() to __get_cpuid_count(), but the corresponding configure check was not updated. Since __get_cpuid_count() was introduced much later, make sure we check for the function we actually use. Thanks to Mark Harris for the report.
* Fix warnings when compiling with FUZZING enabledJean-Marc Valin2022-07-062-0/+6
|
* cmake - Add OPUS_BUILD to test targetsMarcus Asteborg2022-07-051-0/+5
| | | | Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* doc: Use consistent alternative notationMark Harris2022-07-051-2/+2
| | | | Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* Fix opus.h for doxygen when referencing alternative valuesAlexander Traud2022-07-051-1/+1
| | | | | | | Doxygen was not able to resolve the references because it looked for OPUS_APPLICATION_VOIP/@ref. Signed-off-by: Mark Harris <mark.hsj@gmail.com>
* 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 warning with --disable-rfc8251Jean-Marc Valin2022-07-051-0/+2
|
* Fix quoting and whitespace errors in build testMark Harris2022-07-052-35/+34
| | | | Reviewed by Jean-Marc Valin.
* Silence GCC 11+ -Wmaybe-uninitialized warningsMark Harris2022-07-051-4/+6
| | | | Reviewed by Timothy B. Terriberry.
* Avoids incrementing uninitialized valuesJean-Marc Valin2022-07-051-4/+10
| | | | | | The values were never used, but ubsan + valgrind would complain. Reviewed by Mark Harris
* Avoid undefined behaviour within the debug macrosJean-Marc Valin2022-07-051-2/+2
| | | | | | Even when the macro itself would overflow. Reviewed by Mark Harris
* Fix fixed-point overflow in pitch downsamplingJean-Marc Valin2022-07-051-6/+15
| | | | Reviewed by Mark Harris
* Fix some 16-bit overflows (using 32-bit macros)Jean-Marc Valin2022-07-052-6/+6
| | | | Reviewed by Mark Harris
* Avoid left shifts of negative values in debug macrosJean-Marc Valin2022-07-052-22/+16
| | | | Reviewed by Mark Harris
* Work around UBSan unaligned access errors.Timothy B. Terriberry2022-07-051-1/+9
| | | | | | | The underlying objects are all 8-bit integers. Verified that the generated assembly still just uses MOVD. Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
* Add asan/ubsan support in random testsJean-Marc Valin2022-07-051-3/+6
|
* Adds OPUS_SET_INBAND_FEC(2) optionJean-Marc Valin2022-06-303-8/+13
| | | | | Unlike OPUS_SET_INBAND_FEC(1), the encoder does not necessarily switch to SILK if we have music.
* Estimate the inner product accuracy to fix check-asmJean-Marc Valin2022-06-301-30/+21
| | | | | | Estimate the rounding error so that we can have a useful margin of error when checking the asm against the C code even when the float operations get reordered due to -ffast-math.
* Adds fuzzing to CPU detectionJean-Marc Valin2022-06-302-2/+18
| | | | | Makes ti possible to randomize (with --enable-fuzzing) the CPU flags so we can better test all the intrinsics implementations.
* Work around a valgrind false-positive in CPUID.Timothy B. Terriberry2022-06-281-4/+8
| | | | | | | Valgrind versions prior to 3.17.0 assume that an uninitialized value in ECX causes the whole output of CPUID to be uninitialized, even though ECX is only "read" by CPUID for certain values of EAX. Work around that by guaranteeing that ECX is initialized.
* Check the return value of __get_cpuid().Timothy B. Terriberry2022-06-281-2/+7
| | | | | | | | | | | This function can fail if CPUID is not supported or the maximum supported value of EAX is less than the requested one. Check the return value and explicitly disable all SIMD if it does fail. This was happening before implicitly because of the initialization of info[] to zero, but being explicit about it makes it less likely someone will break this behavior because they did not realize what was going on.
* Fixes valgrind failure caused by silk_find_pred_coefs_*()Jean-Marc Valin2022-06-282-2/+4
| | | | | | | | The function copies NLSFs from the stack to the state which for order 10 means we were copying uninitialized values. That in turn breaks check-asm when comparing the state under valgrind. Reviewed by Timothy B. Terriberry.
* Fixes --disable-rtcdJean-Marc Valin2022-06-283-7/+8
| | | | | Make sure we don't try to use the rtcd table when rtcd is disabled. That code still needs a lot more cleaning up.
* Silence some warnings for fixed-point debug buildsJean-Marc Valin2022-06-281-12/+12
| | | | Reviewed by Timothy B. Terriberry.
* Fixes wrap-around in silk_inner_prod16_sse4_1()Jean-Marc Valin2022-06-271-1/+2
| | | | Thanks Tim
* Fix 8101b33 to decode ignored redundancyMark Harris2022-06-261-5/+9
| | | | | | | Even if the redundancy is ignored, the final range from the decoder is needed for testing. Reviewed by Timothy B. Terriberry.
* Improve background noise estimation for CELT DTXJean-Marc Valin2022-06-261-21/+19
| | | | | | | | | | | We now update the background noise estimate even in frames classified as transient. It shouldn't be a problem because we're using min statistics. Also, it avoids problems when update frames get missclassified as transient. In addition, we now use the duration of losses rather than the number of lost packets to make decisions. That should make PLC/DTX behaviour more consistent across frame sizes.
* Correct redundancy handling with lost/DTX framesMark Harris2022-06-251-2/+7
| | | | | | | | | | | | | | | | | In https://github.com/xiph/opus/issues/253, the encoder generates a Hybrid frame with redundancy, to switch to CELT-only mode, and then activates DTX immediately afterwards. The decoder ran Hybrid PLC, which isn't right. Use CELT PLC instead if there was already a transition to CELT via redundancy at the end of the previous frame. Also do not use a stale CELT decoder to decode a second redundancy frame when the first redundancy frame for a transition from SILK-only mode was lost. Instead of mixing in old audio from the last time that CELT was used, ignore the second redundancy frame in this case. Alternatively the CELT decoder could be reset before decoding, but it would not be ready until after the 2.5 ms of audio that is needed. Reviewed by Jean-Marc Valin.
* print rate used for testvectorsJean-Marc Valin2022-04-021-1/+2
|
* Fix lrint/lrintf detectionJean-Marc Valin2022-04-021-2/+2
| | | | | | Prevents using lrint/lrintf when compiling with -std=c90 even though the functions are in libm. This was causing tests to fail, likely due to incorrect prototypes.
* Cleanup testing directories to save spaceJean-Marc Valin2022-04-012-6/+11
|
* build test scriptsJean-Marc Valin2022-03-312-0/+147
|