Commit graph

3798 commits

Author SHA1 Message Date
Ricardo Constantino
c293dede4a
VS2015: remove previously ignored C4146 in kiss_fft.c
C4146: unary minus operator applied to unsigned type, result still unsigned

Fixed in a previous commit.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-03-02 18:39:34 -08:00
Ricardo Constantino
b95c5e784f
VS2015: Ignore LNK4221 and properly force SSE off for Win32
This warning complains of files that don't define any new symbols
not being included in linking.
GCC doesn't seem to complain about those, so neither should VS.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Closes https://github.com/xiph/opus/pull/34
2017-03-02 18:39:15 -08:00
Ricardo Constantino
4d883288de
VS2015: ignore C4244 warning in opus_compare.c
opus_compare.c defines the bitstream so we avoid changing it by
ignoring the non-breaking warning instead of changing the file.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Resolves https://github.com/xiph/opus/issues/21
2017-03-02 18:38:27 -08:00
Mark Harris
d6d70371e8
Fix compiler warnings
- 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-26 19:10:45 -08:00
Ricardo Constantino
8056706f48
Add common.props to Makefile.am
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 18:26:50 -08:00
Ricardo Constantino
61168921d9
VS2015: only compile fixed silk for appropriate configs
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
Closes https://github.com/xiph/opus/pull/26
2017-02-20 17:18:58 -08:00
Ricardo Constantino
9c2736dc0d
VS2015: Move back PreprocessorDefinitions to opus
They're only needed in that project, no need to be in common.props.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 17:18:45 -08:00
Ricardo Constantino
daf1d12c86
VS2015: join common options in a properties file
Should make the projects a bit easier to digest and the differences
between the different configurations and platforms be more obvious.

A (happy?) side effect of this is the static libraries are now about
the same size as the ones produced by GCC and seem to build fine with
opus-tools.

Needs testing with other third party applications to make sure nothing
is missing that shouldn't.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 17:18:28 -08:00
Ricardo Constantino
0335534fe6
VS2015: remove dead options for linker in static configurations
Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2017-02-20 17:18:03 -08:00
Mark Harris
c340d83689
test_opus_decode: Fix build on GCC 3.4 to 4.5.x
Broken by b0949f11, reported by ko-zu on GitHub.
2017-02-18 20:54:19 -08:00
Jean-Marc Valin
ad15578102
Fix sum initializer in celt_fir() 2017-02-18 17:04:24 -05:00
Jean-Marc Valin
abc1a771fc
Fix stability test 2017-02-18 17:04:14 -05:00
Jean-Marc Valin
0834ad61b1
Speed up test_unit_LPC_inv_pred_gain by returning early on stable filters 2017-02-18 16:43:48 -05:00
Jean-Marc Valin
414eef55bd
Remove SMALL_FOOTPRINT code for celt_fir()
Wasn't worth it given the small code size of the alternative, which also
got refactored a little (still bit exact).
2017-02-17 19:28:28 -05:00
Jean-Marc Valin
3c9b4d615c
Increasing GLOBAL_STACK_SIZE to 120000 to avoid failure
Cannot prove it's the correct value, but it's better than the previous
values, which sometimes segfaults. The increase was made necessary due
to 120 ms frame size support.
2017-02-15 17:34:24 -05:00
Michael Bradshaw
c930cc57d2
Reduce the scope of Ne10 includes
libopus only uses the DSP module of Ne10, and never uses the init functions.

Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-02-15 16:54:06 -05:00
Michael Bradshaw
4911460353
Remove #include "config.h" from ARM Ne10 headers
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-02-15 14:53:27 -05:00
Linfeng Zhang
95d4c9f960
Optimize silk_LPC_inverse_pred_gain() for ARM NEON
The optimization is bit exact with C function.

Change-Id: Ib3bdc26a5a4ebe02e7f24be85104e8e9a2a9a738

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-02-14 23:57:15 -05:00
Jean-Marc Valin
68688651a4
Adding a unit test for LPC_inv_pred_gain()
It checks that no clearly unstable filter passes the LPC_inv_pred_gain()
test. Also, this will make it possible to check assembly for correctness.

Modified from an original patch from Linfeng Zhang <linfengz@google.com>.
2017-02-14 19:24:37 -05:00
Stephen
4176a0c86e
Add more coverage to travis tests.
Signed-off-by: Ralph Giles <giles@mozilla.com>
2017-02-14 13:34:51 -08:00
Jean-Marc Valin
cfc8e30038
Rename y0/y1 to out0/out1 to avoid name clash with the Bessel functions 2017-02-14 01:32:19 -05:00
Felicia Lim
468327d726
Add decoder fuzz target. 2017-02-10 15:08:53 -08:00
Jean-Marc Valin
572d65df7e
Remove silk_LPC_inverse_pred_gain_Q24() which is no longer used anywhere 2017-02-09 23:01:26 -05:00
Mark Harris
c5a84df8fd
arm2gnu.pl: Fix GNU ARM .type directive
Broken by 76e831d.  Without the .type directive, SIGILL may be produced
if the C code is compiled in Thumb mode, because the compiler may assume
that the asm symbol is also Thumb and call it using a BL instruction.
2017-02-04 17:23:46 -08:00
James Zern
feabcdc6a4
fix ARM build w/--disable-intrinsics --enable-asm
and rtcd disabled (CFLAGS=-mfpu=neon)

broken since:
cfdaf365 Optimize silk_NSQ_del_dec() for ARM NEON

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-02-04 09:32:54 -05:00
Linfeng Zhang
cfdaf365b9
Optimize silk_NSQ_del_dec() for ARM NEON
The optimization is bit exact with C function.

This optimization speeds up SILK encoder on NEON as following.

Fixed-point:
Complexity 0-5:  0%
Complexity 6-7:  6%
Complexity 8-9: 10%
Complexity  10:  8%

Got similar results on floating-point.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-01-30 16:00:03 -05:00
Jean-Marc Valin
68afa490cc
Avoids undefined behaviour in ARM-optimized code
Casting to unsigned to avoid shifting negative values left.
2017-01-25 22:20:25 -05:00
Felicia Lim
32b302c495
Add --enable-check-asm
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-01-23 13:22:27 -05:00
Linfeng Zhang
864bc8c606
Update NSQ_LPC_BUF_LENGTH macro
NSQ_LPC_BUF_LENGTH is independent of DECISION_DELAY.

Signed-off-by: Felicia Lim <flim@google.com>
2017-01-23 09:13:31 -08:00
Mark Harris
aef475641a
configure: Improve error message 2017-01-18 00:13:37 -08:00
Felicia Lim
d6643192f7
Add FIXED_POINT check if using celt_fir in SILK's LPC analysis filter
Use of celt_fir remains off by default
2017-01-17 16:23:27 -08:00
Linfeng Zhang
783ad76766 Revise celt_fir_c() to not pass in argument "mem"
The "mem" in celt_fir_c() either is contained in the head of input "x"
in reverse order already, or can be easily attached to the head of "x"
before calling the function. Removing argument "mem" can eliminate the
redundant buffer copies inside.
Update celt_fir_sse4_1() accordingly.
2017-01-17 14:04:37 -08:00
James Zern
c9ba55208c
fixed_debug.h: delete some dead code
this has the side-effect of removing some C++ style comments

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-01-12 23:35:55 -05:00
Chris Rudmin
19b13443b3 Fix error message
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2017-01-09 11:23:58 -08:00
Jean-Marc Valin
ec11c82250
Avoids pre-echo in hybrid mode caused by noise being injected in the first band
This could happen when we had more than 32 bits on the first hybrid band with
a transient just in the middle of the frame. The band would be split and the
first half of the frame could end up with non-zero energy, but not enough
bits for a pulse. Because it's the first band, no folding would be possible.
This would cause noise to be injected for the entire duration of the first
half and that noise should then get folded to higher bands.
2017-01-05 23:39:44 -05:00
Mark Harris
efcdeb9bb2
Fix some compiler warnings 2016-12-22 11:11:32 -08:00
Jean-Marc Valin
cf9409fe51
Makes analysis run at 24 kHz, with 20-ms frames
The change also makes the analysis run for sampling rates of 16 kHz and 24 kHz
since the features are only computed on the 0-8 kHz band. The longer time
window (20 ms instead of 10 ms) makes the tonality estimator more reliable
for low-pitch harmonics.
2016-12-20 15:33:27 -05:00
Jean-Marc Valin
159bb6df00
update draft: oops, fixes use of "above" 2016-12-19 16:15:23 -05:00
Jean-Marc Valin
4a48ce899c
Update draft: addressing WGLC comments 2016-12-19 14:48:35 -05:00
Mark Harris
c84f486656
opus_demo: remove obsolete option from usage 2016-12-17 18:32:27 -08:00
Jean-Marc Valin
837583067a
Adding a missing "else"
Thanks to Zhendong Wu for spotting the issue
2016-12-16 14:11:48 -05:00
Ricardo Constantino
8fe210f14b
genversion.bat: generate same version as update_version
Remove version.mk and references to it in the repo.

genversion.bat will now generate the same version strings as
update_version script, i.e. without 'v' prefix and without a
fallback if git archive is used.

If run from a release tarball it'll use package_version,
like configure. If run from a git repo, it will use the same
'git describe' with '-dirty' as update_version.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-17 13:28:58 -08:00
Mark Harris
bd54e279d5
Correct SILK encoder gain limit
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-16 20:16:23 -08:00
Ricardo Constantino
ab148485da
vs2015: reenable DebugDLL versions of opus_demo
Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-10 19:53:20 -08:00
Ralph Giles
4dde082d2c
Remove SILK_DEBUG define when _WIN32 and _DEBUG are defined.
This was just enabling commented-out code, setting a fixed
default removes dead code.
2016-11-10 19:53:16 -08:00
Ralph Giles
3fdfcd4045
Remove commented-out DEBUG_STORE_DATA calls. r=keon
Also remove the SILK_DEBUG_STORE_CLOSE_FILES flush call from
opus_demo.

This is debugging code which is no longer used, but defining
the symbols for SILK_DEBUG_STORE_CLOSE_FILES and calling it
from opus_demo causes linking problems on Microsoft Visual Studio
where we have strict controls on public symbols and want to
test the compiled DLL.

Since the code isn't in active use, it's better to remove it
to avoid clutter and address the linking issue.
2016-11-10 19:52:58 -08:00
Ricardo Constantino
f4389ef7a9
appveyor: don't leave artifacts under a subdir
Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-10 13:59:40 -08:00
Ricardo Constantino
71ae28ab8e
appveyor: pack interesting files too, not just lib
Signed-off-by: Ralph Giles <giles@thaumas.net>
2016-11-10 13:44:11 -08:00
Mark Harris
d73c5a9618
Remove redundant code
frame_size_select() ensures that frame_size is a valid size or -1,
!st->variable_duration is always false, and delay_compensation is
no longer needed to choose the frame size.
2016-11-05 22:18:33 -07:00
Mark Harris
d74fa2785a
Fix crash on bad encoder frame_size argument 2016-11-05 21:32:28 -07:00