Commit graph

16 commits

Author SHA1 Message Date
Gregory Maxwell
7830cf1bd2 Replace "inline" with OPUS_INLINE.
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.
2013-10-28 10:18:54 -07:00
Ralph Giles
f2446c25c6 Remove trailing whitespace from the license headers. 2013-09-16 14:40:04 -07:00
Timothy B. Terriberry
80ad38370c Convert quotes in license headers to ASCII.
Since the last patch originally had them mangled (presumably by
 mailer, http server, or something else), let's just get rid of
 them.
2013-05-19 19:16:11 -07:00
Gregory Maxwell
e052947f18 Use 'frame' instead of 'signal', take out stdlib.h in silk/.
On MacOS, stdlib.h ends up including sys/signal.h, generating
warnings about the local variables called 'signal' shadowing
the global symbol signal(3).

This was originally done in 86476906 but it missed some use
of 'signal' in prototypes in headers where it didn't cause
warnings. Later the prototypes were moved around and the
warnings came back.

This also cleans up some cases in where stdlib.h was used
but shouldn't be required.
2012-05-23 10:28:36 -04:00
Gregory Maxwell
efbb5ea401 SILK to print error line with FIXED_DEBUG, assert with FIXED_DEBUG_ASSERT. 2012-05-15 09:18:31 -04:00
Jean-Marc Valin
ab5a049705 Merge commit '390c89225d' 2012-04-24 13:39:22 -04:00
Jean-Marc Valin
ae00e60d35 License update using the IETF Trust flavour of the BSD on the Silk code 2012-04-20 16:31:04 -04:00
Jean-Marc Valin
94a4989cdb Makes silk_ADD_SAT32() conform to the C standard
This changes the saturation test to ensure that it relies on the
unsigned overflow behaviour (which is allowed) rather than the signed
overflow behaviour (which is undefined).
2012-04-12 16:35:19 -04:00
Ralph Giles
b46991c34f Restore the windows-side #ifdef check in silk/MacroDebug.h.
We still override the '#if 0' with FIXED_DEBUG, but this
leaves whatever Koen intended here more intact. Suggestion
from Greg Maxwell.
2012-03-05 17:09:54 -08:00
Ralph Giles
9357ae976e Enable the silk debug macros with FIXED_DEBUG.
This isn't entirely accurate, since it's also used on integer
math. However, the idea is similar: to add bounds checking.

This code asserts rather than warning, so one must pass
--enable-assertions to configure as well to get any output,
and in that case the first instance is fatal.

Quick testing shows both test_opus_decode and test_opus_encode
trigger the assertions, but running the draft-10 test vectors
does not.
2012-03-05 17:09:54 -08:00
Ralph Giles
2fa9e6e538 Fix a signed-compare warning.
The silk math debug macros include a bounds check on silk_abs.
Because INT_MIN = (-INT_MAX - 1), abs(INT_MIN) can't be
represented as an int. The macro was checking for this value
as 0x8000... without a cast to signed, warning on gcc.

silk/typedef.h already defines minimum values for the int
types, so we correct the warning by using those.
2012-03-05 17:09:54 -08:00
Koen Vos
bf75c8ec4d SILK fixes following last codec WG meeting
decoder:
- fixed incorrect scaling of filter states for the smallest quantization
  step sizes
- NLSF2A now limits the prediction gain of LPC filters

encoder:
- increased damping of LTP coefficients in LTP analysis
- increased white noise fraction in noise shaping LPC analysis
- introduced maximum total prediction gain.  Used by Burg's method to
  exit early if prediction gain is exceeded.  This improves packet
  loss robustness and numerical robustness in Burg's method
- Prefiltered signal is now in int32 Q10 domain, from int16 Q0
- Increased max number of iterations in CBR gain control loop from 5 to 6
- Removed useless code from LTP scaling control
- Optimization: smarter LPC loop unrolling
- Switched default win32 compile mode to be floating-point

resampler:
- made resampler have constant delay of 0.75 ms; removed delay
  compensation from silk code.
- removed obsolete table entries (~850 Bytes)
- increased downsampling filter order from 16 to 18/24/36 (depending on
  frequency ratio)
- reoptimized filter coefficients
2011-12-13 14:47:31 -05:00
Ralph Giles
120800f8fa Rename '_FOO' to avoid potentional collisions with reserved identifiers.
C reserves identifiers of the from _[A-Z]+ and we have a number of
those in the code. This patch renames the various function arguments,
MACROS and preprocessor symbols to avoid the reserved form.

It also removes the CHANNELS() macro altogether. This was a
minor optimization for TI DSP to force a mono-only build,
as were the associated local 'const' versions. Since stereo
support is manditory, it wasn't worth keeping.

Thanks to John Ridges for raising the issue, and Jean-Marc Valin
and Greg Maxwell for reviewing the changes.
2011-12-02 12:31:36 -05:00
Koen Vos
acc7a6c78b Reformatting changes with an update to the MSVC project files 2011-10-28 19:44:26 -04:00
Koen Vos
cc34050455 Fixes an integer overflow caused by uninitialized values in LTP scaling 2011-09-21 14:50:17 -04:00
Jean-Marc Valin
1c2f5633d1 Removed all the silk_ prefixes in source file names (not symbols) 2011-09-16 01:16:53 -07:00
Renamed from silk/silk_MacroDebug.h (Browse further)