2 years agoOptimize silk_biquad_alt_stride2() for ARM NEON
Linfeng Zhang [Thu, 1 Sep 2016 21:20:57 +0000 (14:20 -0700)]
Optimize silk_biquad_alt_stride2() for ARM NEON

The optimization is bit exact with C function.

Change-Id: Ifb8f04b19f2d576e79ce5dcfa7e0fc374d71d6c8

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoUpdate silk_biquad_alt()
Linfeng Zhang [Thu, 1 Sep 2016 20:44:11 +0000 (13:44 -0700)]
Update silk_biquad_alt()

Split to silk_biquad_alt_stride1() and silk_biquad_alt_stride2(),
so that it can be optimized more efficiently when stride is 2.

This change in C code is bit exact with the origin.

Change-Id: Idaefe670397016ace2a489e3435ac61b7dbe79d5

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoIndent commands in the README.
Ralph Giles [Wed, 10 May 2017 17:46:22 +0000 (10:46 -0700)]
Indent commands in the README.

Makes things a little easier to read.

Signed-off-by: Gian-Carlo Pascutto <gcp@sjeng.org>
2 years agoSuggest basic build dependencies in the README.
Ralph Giles [Wed, 10 May 2017 17:37:46 +0000 (10:37 -0700)]
Suggest basic build dependencies in the README.

Make it easier for users unfamiliar with C applications
to installed the necessary build dependencies.

Signed-off-by: Gian-Carlo Pascutto <gcp@sjeng.org>
2 years agoAvoid warning when __STDC_VERSION__ is not defined
Carlos Alberto Lopez Perez [Mon, 10 Apr 2017 23:07:35 +0000 (01:07 +0200)]
Avoid warning when __STDC_VERSION__ is not defined

This fixes an issue with gcc 4.9 on Debian 8, at least,
which defines __STDC__ but not __STDC_VERSION__, unlike
more recent gcc.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agooops, fix build broken by previous patch
Jean-Marc Valin [Fri, 28 Apr 2017 21:41:54 +0000 (17:41 -0400)]
oops, fix build broken by previous patch

2 years agoNon-diegetic support for Ambisonics Mapping 254.
Drew Allen [Fri, 28 Apr 2017 16:58:04 +0000 (09:58 -0700)]
Non-diegetic support for Ambisonics Mapping 254.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoOptimize silk_warped_autocorrelation_FIX() for ARM NEON
Linfeng Zhang [Wed, 13 Jul 2016 23:40:48 +0000 (16:40 -0700)]
Optimize silk_warped_autocorrelation_FIX() for ARM NEON

The optimization is bit exact with C function.

This optimization speeds up fixed-point SILK encoder on NEON about
5% to 8%. (Tested on Acer Chromebook, ARMv7 Processor rev 3 (v7l).)

Change-Id: I582f6f3585b7946149e16a2ad3084ebc0ae79a4f

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoFix OPUS_ARG_NONNULL indices in opus_multistream.h
Felicia Lim [Mon, 27 Mar 2017 17:36:46 +0000 (10:36 -0700)]
Fix OPUS_ARG_NONNULL indices in opus_multistream.h

2 years agoVS2015: remove previously ignored C4146 in kiss_fft.c
Ricardo Constantino [Thu, 2 Mar 2017 14:48:11 +0000 (14:48 +0000)]
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>
2 years agoVS2015: Ignore LNK4221 and properly force SSE off for Win32
Ricardo Constantino [Mon, 27 Feb 2017 19:04:06 +0000 (19:04 +0000)]
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

2 years agoVS2015: ignore C4244 warning in opus_compare.c
Ricardo Constantino [Mon, 27 Feb 2017 14:56:06 +0000 (14:56 +0000)]
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

2 years agoFix compiler warnings
Mark Harris [Tue, 21 Feb 2017 03:51:40 +0000 (19:51 -0800)]
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
- 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

2 years agoAdd common.props to Makefile.am
Ricardo Constantino [Tue, 21 Feb 2017 02:24:27 +0000 (02:24 +0000)]
Add common.props to Makefile.am

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2 years agoVS2015: only compile fixed silk for appropriate configs
Ricardo Constantino [Mon, 20 Feb 2017 22:53:31 +0000 (22:53 +0000)]
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

2 years agoVS2015: Move back PreprocessorDefinitions to opus
Ricardo Constantino [Mon, 20 Feb 2017 22:52:06 +0000 (22:52 +0000)]
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>
2 years agoVS2015: join common options in a properties file
Ricardo Constantino [Tue, 10 Jan 2017 00:48:49 +0000 (00:48 +0000)]
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

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>
2 years agoVS2015: remove dead options for linker in static configurations
Ricardo Constantino [Tue, 10 Jan 2017 00:45:10 +0000 (00:45 +0000)]
VS2015: remove dead options for linker in static configurations

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2 years agotest_opus_decode: Fix build on GCC 3.4 to 4.5.x
Mark Harris [Sun, 19 Feb 2017 04:54:19 +0000 (20:54 -0800)]
test_opus_decode: Fix build on GCC 3.4 to 4.5.x

Broken by b0949f11, reported by ko-zu on GitHub.

2 years agoFix sum initializer in celt_fir()
Jean-Marc Valin [Sat, 18 Feb 2017 22:04:24 +0000 (17:04 -0500)]
Fix sum initializer in celt_fir()

2 years agoFix stability test
Jean-Marc Valin [Sat, 18 Feb 2017 22:04:14 +0000 (17:04 -0500)]
Fix stability test

2 years agoSpeed up test_unit_LPC_inv_pred_gain by returning early on stable filters
Jean-Marc Valin [Sat, 18 Feb 2017 21:43:48 +0000 (16:43 -0500)]
Speed up test_unit_LPC_inv_pred_gain by returning early on stable filters

2 years agoRemove SMALL_FOOTPRINT code for celt_fir()
Jean-Marc Valin [Sat, 18 Feb 2017 00:28:28 +0000 (19:28 -0500)]
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).

2 years agoIncreasing GLOBAL_STACK_SIZE to 120000 to avoid failure
Jean-Marc Valin [Wed, 15 Feb 2017 22:34:24 +0000 (17:34 -0500)]
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.

2 years agoReduce the scope of Ne10 includes
Michael Bradshaw [Sat, 28 Jan 2017 00:07:26 +0000 (16:07 -0800)]
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>
2 years agoRemove #include "config.h" from ARM Ne10 headers
Michael Bradshaw [Sat, 28 Jan 2017 01:07:57 +0000 (17:07 -0800)]
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>
2 years agoOptimize silk_LPC_inverse_pred_gain() for ARM NEON
Linfeng Zhang [Thu, 14 Jul 2016 00:25:49 +0000 (17:25 -0700)]
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>
2 years agoAdding a unit test for LPC_inv_pred_gain()
Jean-Marc Valin [Wed, 15 Feb 2017 00:06:10 +0000 (19:06 -0500)]
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>.

2 years agoAdd more coverage to travis tests.
Stephen [Sat, 21 Jan 2017 16:20:56 +0000 (08:20 -0800)]
Add more coverage to travis tests.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2 years agoRename y0/y1 to out0/out1 to avoid name clash with the Bessel functions
Jean-Marc Valin [Tue, 14 Feb 2017 06:32:19 +0000 (01:32 -0500)]
Rename y0/y1 to out0/out1 to avoid name clash with the Bessel functions

2 years agoAdd decoder fuzz target.
Felicia Lim [Fri, 10 Feb 2017 19:42:08 +0000 (11:42 -0800)]
Add decoder fuzz target.

2 years agoRemove silk_LPC_inverse_pred_gain_Q24() which is no longer used anywhere
Jean-Marc Valin [Fri, 10 Feb 2017 04:01:26 +0000 (23:01 -0500)]
Remove silk_LPC_inverse_pred_gain_Q24() which is no longer used anywhere

2 years agoarm2gnu.pl: Fix GNU ARM .type directive
Mark Harris [Sun, 5 Feb 2017 00:57:41 +0000 (16:57 -0800)]
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.

2 years agofix ARM build w/--disable-intrinsics --enable-asm
James Zern [Sat, 4 Feb 2017 02:55:44 +0000 (18:55 -0800)]
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>
2 years agoOptimize silk_NSQ_del_dec() for ARM NEON
Linfeng Zhang [Fri, 26 Aug 2016 01:12:54 +0000 (18:12 -0700)]
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.

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>
2 years agoAvoids undefined behaviour in ARM-optimized code
Jean-Marc Valin [Thu, 26 Jan 2017 02:56:48 +0000 (21:56 -0500)]
Avoids undefined behaviour in ARM-optimized code

Casting to unsigned to avoid shifting negative values left.

2 years agoAdd --enable-check-asm
Felicia Lim [Wed, 18 Jan 2017 22:47:26 +0000 (14:47 -0800)]
Add --enable-check-asm

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoUpdate NSQ_LPC_BUF_LENGTH macro
Linfeng Zhang [Thu, 11 Aug 2016 20:21:58 +0000 (13:21 -0700)]


Signed-off-by: Felicia Lim <flim@google.com>
2 years agoconfigure: Improve error message v1.2-alpha2
Mark Harris [Wed, 18 Jan 2017 08:13:37 +0000 (00:13 -0800)]
configure: Improve error message

2 years agoAdd FIXED_POINT check if using celt_fir in SILK's LPC analysis filter
Felicia Lim [Wed, 18 Jan 2017 00:23:27 +0000 (16:23 -0800)]
Add FIXED_POINT check if using celt_fir in SILK's LPC analysis filter

Use of celt_fir remains off by default

2 years agoRevise celt_fir_c() to not pass in argument "mem"
Linfeng Zhang [Thu, 16 Jun 2016 23:21:02 +0000 (16:21 -0700)]
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.

2 years agofixed_debug.h: delete some dead code
James Zern [Fri, 13 Jan 2017 04:29:54 +0000 (20:29 -0800)]
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>
2 years agoFix error message
Chris Rudmin [Tue, 3 Jan 2017 22:03:32 +0000 (17:03 -0500)]
Fix error message

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2 years agoAvoids pre-echo in hybrid mode caused by noise being injected in the first band
Jean-Marc Valin [Fri, 6 Jan 2017 04:39:44 +0000 (23:39 -0500)]
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.

2 years agoFix some compiler warnings
Mark Harris [Thu, 22 Dec 2016 19:11:32 +0000 (11:11 -0800)]
Fix some compiler warnings

2 years agoMakes analysis run at 24 kHz, with 20-ms frames
Jean-Marc Valin [Fri, 16 Dec 2016 22:52:15 +0000 (17:52 -0500)]
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.

2 years agoupdate draft: oops, fixes use of "above"
Jean-Marc Valin [Mon, 19 Dec 2016 21:15:23 +0000 (16:15 -0500)]
update draft: oops, fixes use of "above"

2 years agoUpdate draft: addressing WGLC comments
Jean-Marc Valin [Mon, 19 Dec 2016 19:33:27 +0000 (14:33 -0500)]
Update draft: addressing WGLC comments

2 years agoopus_demo: remove obsolete option from usage
Mark Harris [Sun, 18 Dec 2016 02:32:27 +0000 (18:32 -0800)]
opus_demo: remove obsolete option from usage

2 years agoAdding a missing "else"
Jean-Marc Valin [Fri, 16 Dec 2016 19:11:48 +0000 (14:11 -0500)]
Adding a missing "else"

Thanks to Zhendong Wu for spotting the issue

2 years agogenversion.bat: generate same version as update_version
Ricardo Constantino [Sat, 5 Nov 2016 02:03:07 +0000 (02:03 +0000)]
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>
2 years agoCorrect SILK encoder gain limit
Mark Harris [Thu, 17 Nov 2016 04:03:25 +0000 (20:03 -0800)]
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, and prevents an assertion failure in the rare
case that the gain is later independently coded.

2 years agovs2015: reenable DebugDLL versions of opus_demo
Ricardo Constantino [Thu, 3 Nov 2016 22:26:56 +0000 (22:26 +0000)]
vs2015: reenable DebugDLL versions of opus_demo

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoRemove SILK_DEBUG define when _WIN32 and _DEBUG are defined.
Ralph Giles [Thu, 3 Nov 2016 22:40:43 +0000 (15:40 -0700)]
Remove SILK_DEBUG define when _WIN32 and _DEBUG are defined.

This was just enabling commented-out code, setting a fixed
default removes dead code.

2 years agoRemove commented-out DEBUG_STORE_DATA calls. r=keon
Ralph Giles [Thu, 3 Nov 2016 22:25:33 +0000 (15:25 -0700)]
Remove commented-out DEBUG_STORE_DATA calls. r=keon

Also remove the SILK_DEBUG_STORE_CLOSE_FILES flush call from

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.

2 years agoappveyor: don't leave artifacts under a subdir
Ricardo Constantino [Thu, 10 Nov 2016 21:27:05 +0000 (21:27 +0000)]
appveyor: don't leave artifacts under a subdir

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoappveyor: pack interesting files too, not just lib
Ricardo Constantino [Thu, 10 Nov 2016 21:27:05 +0000 (21:27 +0000)]
appveyor: pack interesting files too, not just lib

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoRemove redundant code
Mark Harris [Sun, 6 Nov 2016 05:01:52 +0000 (22:01 -0700)]
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.

2 years agoFix crash on bad encoder frame_size argument
Mark Harris [Sun, 6 Nov 2016 04:32:28 +0000 (21:32 -0700)]
Fix crash on bad encoder frame_size argument

Jean-Marc Valin [Fri, 4 Nov 2016 15:41:13 +0000 (11:41 -0400)]

That experiment never actually worked

2 years agovs2015: Add missing file to test_opus_encode.
Ricardo Constantino [Thu, 3 Nov 2016 21:12:04 +0000 (21:12 +0000)]
vs2015: Add missing file to test_opus_encode.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoAdds checksum for 1.2-alpha
Jean-Marc Valin [Thu, 3 Nov 2016 18:39:04 +0000 (14:39 -0400)]
Adds checksum for 1.2-alpha

2 years agoImproves CELT bit allocation at very low bitrates v1.2-alpha
Jean-Marc Valin [Wed, 2 Nov 2016 21:59:32 +0000 (17:59 -0400)]
Improves CELT bit allocation at very low bitrates

We now try not to fold below band 17 since that produces a lot of harshness.
This mostly helps around 32-40 kb/s.

2 years agoEliminate trailing spaces
Mark Harris [Wed, 2 Nov 2016 13:56:57 +0000 (06:56 -0700)]
Eliminate trailing spaces

2 years agoReduce redundancy when SILK uses too many bits
Mark Harris [Wed, 2 Nov 2016 13:18:25 +0000 (06:18 -0700)]
Reduce redundancy when SILK uses too many bits

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.

2 years agoFix redundancy on SILK 80+ms bandwidth switch
Mark Harris [Wed, 2 Nov 2016 13:16:50 +0000 (06:16 -0700)]
Fix redundancy on SILK 80+ms bandwidth switch

With packets of 80 ms or more, a SILK bandwidth switch was missing
the second half of the redundancy, because st->silk_bw_switch was
cleared too early before any recursive calls.

2 years agoAdd copyright notice to autogen.sh to make the Chromium people happy
Jean-Marc Valin [Tue, 1 Nov 2016 23:00:34 +0000 (19:00 -0400)]
Add copyright notice to autogen.sh to make the Chromium people happy

2 years agoFixes NE10 configure problem
Jean-Marc Valin [Tue, 1 Nov 2016 22:41:23 +0000 (18:41 -0400)]
Fixes NE10 configure problem

As reported by agatx in https://trac.xiph.org/ticket/2291

2 years agoTemporarily disable -Wnonnull around an opus_decode() call in test_opus_decode.c
Jean-Marc Valin [Tue, 1 Nov 2016 20:10:36 +0000 (16:10 -0400)]
Temporarily disable -Wnonnull around an opus_decode() call in test_opus_decode.c

Reported by wtchang in trac: https://trac.xiph.org/ticket/2160

2 years agoBump static PACKAGE_VERSION string in version.mk
Jean-Marc Valin [Tue, 1 Nov 2016 01:49:49 +0000 (21:49 -0400)]
Bump static PACKAGE_VERSION string in version.mk

2 years agoFix amount of extra bytes reserved for 100 ms
Felicia Lim [Mon, 31 Oct 2016 18:58:26 +0000 (11:58 -0700)]
Fix amount of extra bytes reserved for 100 ms

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoDon't use hybrid "weak transients" on vowels
Jean-Marc Valin [Sat, 29 Oct 2016 21:02:36 +0000 (17:02 -0400)]
Don't use hybrid "weak transients" on vowels

2 years agoAdds opus_encode_regressions.c to the MIPS Makefile
Jean-Marc Valin [Sat, 29 Oct 2016 20:46:55 +0000 (16:46 -0400)]
Adds opus_encode_regressions.c to the MIPS Makefile

2 years agoAdds opus_encode_regressions.c to the UNIX Makefile
Jean-Marc Valin [Sat, 29 Oct 2016 20:10:57 +0000 (16:10 -0400)]
Adds opus_encode_regressions.c to the UNIX Makefile

2 years agoNew regression test from Mark's fuzzing test cases
Jean-Marc Valin [Sat, 29 Oct 2016 18:45:30 +0000 (14:45 -0400)]
New regression test from Mark's fuzzing test cases

2 years agoDefine "weak transients" for low bitrate hybrid
Jean-Marc Valin [Fri, 28 Oct 2016 20:44:38 +0000 (16:44 -0400)]
Define "weak transients" for low bitrate hybrid

These rely on TF rather than short windows to avoid partial collapse.

2 years agoMultistream encoder: allocate an extra byte per stream for 100 ms
Felicia Lim [Fri, 28 Oct 2016 18:11:18 +0000 (11:11 -0700)]
Multistream encoder: allocate an extra byte per stream for 100 ms

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoFix CBR packet sizes for 80 ms
Felicia Lim [Fri, 28 Oct 2016 16:34:51 +0000 (09:34 -0700)]
Fix CBR packet sizes for 80 ms

Also clean up comments from the last patches

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoUpdate bandwidth and opusCanSwitch before generating SILK DTX ToC
Felicia Lim [Wed, 26 Oct 2016 23:48:38 +0000 (16:48 -0700)]
Update bandwidth and opusCanSwitch before generating SILK DTX ToC

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoEncode correct headers when asking for very small output bytes and using long frames
Felicia Lim [Fri, 28 Oct 2016 00:00:05 +0000 (17:00 -0700)]
Encode correct headers when asking for very small output bytes and using long frames

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoSupport encoding 80/100/120 ms frame lengths
Felicia Lim [Fri, 28 Oct 2016 00:03:36 +0000 (17:03 -0700)]
Support encoding 80/100/120 ms frame lengths

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoMove multiframe encoding into a separate function
Felicia Lim [Thu, 22 Sep 2016 09:06:11 +0000 (11:06 +0200)]
Move multiframe encoding into a separate function

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoFixes an unstable energy issue for low-bitrate hybrid
Jean-Marc Valin [Thu, 27 Oct 2016 18:14:28 +0000 (14:14 -0400)]
Fixes an unstable energy issue for low-bitrate hybrid

The transient detector would trigger on low-pitch vowels, but we didn't have
enough bits to properly code the high bands as a transient, resulting in
partial collapse and unstable energy.

2 years agoMake use of dot optional in generating documentation.
Ralph Giles [Thu, 27 Oct 2016 17:23:29 +0000 (10:23 -0700)]
Make use of dot optional in generating documentation.

Different distributions of doxygen have different default
values of HAVE_DOT setting, so we need to pick a specific
setting to avoid 'missing dot' warnings on some platforms.

Doxygen uses it to generate inclusion graphs for our various
header files, which is somewhat useful, but not essential.
We therefore enable dot if it's present (usually through
the parent graphviz package) but disable it if it's not
available, silencing the warning, but not giving uniform

2 years agoAccount for redundancy signalling when computing st->silk_mode.maxBits
Jean-Marc Valin [Thu, 27 Oct 2016 04:11:26 +0000 (00:11 -0400)]
Account for redundancy signalling when computing st->silk_mode.maxBits

Without that, we could bust the budget and end up with the
if (ec_tell(&enc) <= 8*nb_compr_bytes)
being false, followed by an assert failure later.

2 years agoupdating update draft
Jean-Marc Valin [Fri, 21 Oct 2016 01:56:24 +0000 (21:56 -0400)]
updating update draft

2 years agoFixing some opus_int vs opus_int32 mismatches
Jean-Marc Valin [Wed, 5 Oct 2016 02:07:52 +0000 (22:07 -0400)]
Fixing some opus_int vs opus_int32 mismatches

Reported by Mark Warner.

2 years agoUsing OPUS_MOVE() instead of OPUS_COPY() to move redundancy bytes
Jean-Marc Valin [Tue, 20 Sep 2016 05:44:22 +0000 (01:44 -0400)]
Using OPUS_MOVE() instead of OPUS_COPY() to move redundancy bytes

memcpy() aliasing bug caught by Felicia's encoder fuzzing test

2 years agoConsider per-channel energy bits in surround_rate_allocation()
Jean-Marc Valin [Mon, 19 Sep 2016 21:18:58 +0000 (17:18 -0400)]
Consider per-channel energy bits in surround_rate_allocation()

This should also avoid cases where stereo streams receive fewer
bits than mono streams.

3 years agoFixes surround_analysis() for frame size > 20 ms
Jean-Marc Valin [Fri, 9 Sep 2016 20:13:43 +0000 (16:13 -0400)]
Fixes surround_analysis() for frame size > 20 ms

3 years agoRemove float ops from encoder settings fuzzer test
Felicia Lim [Fri, 16 Sep 2016 09:12:00 +0000 (11:12 +0200)]
Remove float ops from encoder settings fuzzer test

3 years agoFix mixed declarations and code
Jean-Marc Valin [Thu, 15 Sep 2016 19:02:00 +0000 (15:02 -0400)]
Fix mixed declarations and code

3 years agoFuzzer test for changing encoder settings online
Felicia Lim [Thu, 15 Sep 2016 09:23:54 +0000 (11:23 +0200)]
Fuzzer test for changing encoder settings online

3 years agoPrevents ridiculously large gains from causing inf/NaNs in float decoder
Jean-Marc Valin [Wed, 14 Sep 2016 15:38:15 +0000 (11:38 -0400)]
Prevents ridiculously large gains from causing inf/NaNs in float decoder

3 years agoFixing failure due to CBR allocating zero byte to a stream
Jean-Marc Valin [Fri, 9 Sep 2016 20:51:01 +0000 (16:51 -0400)]
Fixing failure due to CBR allocating zero byte to a stream

3 years agoFix ambisonics bitrate when bitrate_bps is OPUS_AUTO
Michael Graczyk [Wed, 7 Sep 2016 22:26:51 +0000 (15:26 -0700)]
Fix ambisonics bitrate when bitrate_bps is OPUS_AUTO

Change-Id: I16bd4cd990d8ad5888c9e30016218ac25242ecb5

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
3 years agoFixes an internal error in the Opus encoder
Jean-Marc Valin [Thu, 8 Sep 2016 02:04:49 +0000 (22:04 -0400)]
Fixes an internal error in the Opus encoder

The encoder would reserve bytes for redundancy and then decide to use
CELT, but not use those bytes.

3 years agoPrevent tonality estimator from running too often with 2.5 and 5 ms frames
Jean-Marc Valin [Wed, 7 Sep 2016 15:20:06 +0000 (11:20 -0400)]
Prevent tonality estimator from running too often with 2.5 and 5 ms frames

3 years agoPrevents an overflow in multi-stream encoder rate computation
Jean-Marc Valin [Wed, 7 Sep 2016 02:32:22 +0000 (22:32 -0400)]
Prevents an overflow in multi-stream encoder rate computation

Also avoids stupidly high/low rates

3 years agoAllow disabling phase inversion for multistream
Mark Harris [Sat, 3 Sep 2016 17:42:19 +0000 (10:42 -0700)]
Allow disabling phase inversion for multistream

Also clarify in doc that conformance issue relates to decoder only.