7 years agoRemove trailing whitespace.
Ralph Giles [Tue, 20 Mar 2012 00:10:13 +0000 (17:10 -0700)]
Remove trailing whitespace.

Also fixes a minor typo.

7 years agoFixes a bunch of 16-bit issues that the C5X compiler warns about
Jean-Marc Valin [Thu, 8 Mar 2012 19:09:09 +0000 (14:09 -0500)]
Fixes a bunch of 16-bit issues that the C5X compiler warns about

7 years agoFixes int vs opus_int32 compile errors on C5x
Jean-Marc Valin [Thu, 8 Mar 2012 17:19:07 +0000 (12:19 -0500)]
Fixes int vs opus_int32 compile errors on C5x

7 years agoCLANG IOC no longer likes the 'deterministic random' bitstreams, so move the test_opu...
Gregory Maxwell [Tue, 6 Mar 2012 16:42:40 +0000 (11:42 -0500)]
CLANG IOC no longer likes the 'deterministic random' bitstreams, so move the test_opus_decode bailout up.

7 years agoFix documenation typos.
Ralph Giles [Fri, 2 Dec 2011 21:26:02 +0000 (13:26 -0800)]
Fix documenation typos.

Doxygen is smart enough to insert a period if the paragraph
before the @see directive, which starts a new section, doesn't
have one. Unfortunately it's not smart enough to convert a
comma to a period. So while the "description, @see foo" idiom
used for the CTL documentation scans well in the header file,
the Doxygen output end up with "description,.\n".

Minimal change to remove the offending commas.

7 years agoFix typos in the API documentation.
Ralph Giles [Fri, 2 Dec 2011 21:22:22 +0000 (13:22 -0800)]
Fix typos in the API documentation.

opus_decode() takes a sixth 'enable_fec' option. Naive invocations
shoudl set this to zero.

7 years agoRestore the windows-side #ifdef check in silk/MacroDebug.h.
Ralph Giles [Wed, 30 Nov 2011 22:11:23 +0000 (14:11 -0800)]
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.

7 years agoCheck for underflow in the debug USUB32.
Ralph Giles [Wed, 30 Nov 2011 19:54:20 +0000 (11:54 -0800)]
Check for underflow in the debug USUB32.

7 years agoEnable the silk debug macros with FIXED_DEBUG.
Ralph Giles [Wed, 30 Nov 2011 19:41:47 +0000 (11:41 -0800)]
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.

7 years agoFix a signed-compare warning.
Ralph Giles [Wed, 30 Nov 2011 18:48:32 +0000 (10:48 -0800)]
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.

7 years agoPrint the actual arguments to the debug UADD/SUB32 routines.
Ralph Giles [Wed, 30 Nov 2011 18:38:40 +0000 (10:38 -0800)]
Print the actual arguments to the debug UADD/SUB32 routines.

The versions of UADD32 and USUB32 in fixed_debug.h take
unsigned long long (ideally 64 bit) inputs, and range
check the arguments. However, the printed warnings cast
them to (unsigned), which is confusing. Instead, print
the full value passed in.

NB this will make negative values print has huge,
rather than negative, values.

7 years agoUncomment the reporting for UADD32 and USUB32 in fixed_debug.h.
Ralph Giles [Wed, 30 Nov 2011 18:28:35 +0000 (10:28 -0800)]
Uncomment the reporting for UADD32 and USUB32 in fixed_debug.h.

7 years agoUsed unsigned intermediates with unsigned arguments in fixed_debug.h.
Ralph Giles [Wed, 30 Nov 2011 17:55:08 +0000 (09:55 -0800)]
Used unsigned intermediates with unsigned arguments in fixed_debug.h.

Corrects a signed-compare warning.

7 years agoUse automake's support for parallel test execution.
Ralph Giles [Tue, 29 Nov 2011 21:24:56 +0000 (13:24 -0800)]
Use automake's support for parallel test execution.

On my system this speeds up 'make -j8 check' by about
50%. The drawback is that we don't get to see Greg's
nice output from the test programmes. It's hidden in
a log file, even on failure or 'make V=1'. Probably
this is better for most people; developers can run
the tests manually.

7 years agoFix --enable-fixed-point-debug.
Ralph Giles [Tue, 29 Nov 2011 19:29:39 +0000 (11:29 -0800)]
Fix --enable-fixed-point-debug.

Use the celt_mips defined in fixed_debug.h from the unit tests
by defining CELT_C earlier. We must export celt_mips so it can
be used by clients calling the library, like opus_custom_demo.

7 years agoGuard against pathologically small buffer
Vincent Penquerc'h [Tue, 22 Nov 2011 15:12:44 +0000 (15:12 +0000)]
Guard against pathologically small buffer

7 years agoMake input mapping parameter const in multistream API
Vincent Penquerc'h [Wed, 23 Nov 2011 15:17:30 +0000 (15:17 +0000)]
Make input mapping parameter const in multistream API

7 years agoAdds missing RESTORE_STACK statements on error paths
Jean-Marc Valin [Tue, 6 Mar 2012 00:56:13 +0000 (19:56 -0500)]
Adds missing RESTORE_STACK statements on error paths

Thanks to Vincent Penquerc'h

7 years agoMore consistent types for 16-bit architectures
Jean-Marc Valin [Tue, 6 Mar 2012 00:19:59 +0000 (19:19 -0500)]
More consistent types for 16-bit architectures

7 years agoRemoves a number of macro definitions which are used nowhere in the codebase.
Gregory Maxwell [Wed, 14 Dec 2011 20:54:07 +0000 (15:54 -0500)]
Removes a number of macro definitions which are used nowhere in the codebase.

7 years agoVarious multistream fixes.
Gregory Maxwell [Wed, 14 Dec 2011 05:52:24 +0000 (00:52 -0500)]
Various multistream fixes.

Fixes the encoder bitrate CTLs to correctly apply to all streams,
prevents the MS encoder from starving the latter streams by not
reserving a reasonable minimum amount of space for them.

7 years ago40/60ms MDCT/Hybrid were not able to reach maximum bitrate. Now they can.
Gregory Maxwell [Sun, 20 Nov 2011 04:58:09 +0000 (23:58 -0500)]
40/60ms MDCT/Hybrid were not able to reach maximum bitrate. Now they can.

Also change the packet length in the API from int to opus_int32
because repacketized frames are able to go beyond 32767 bytes
in size.

7 years agoAdd config.h (and copyright notice) to repacketizer_demo.c.
Gregory Maxwell [Wed, 14 Dec 2011 22:55:12 +0000 (17:55 -0500)]
Add config.h (and copyright notice) to repacketizer_demo.c.

This fixes some problems with cross-compiles.

7 years agoEliminates an unused parameter warning in anti_collapse()
Jean-Marc Valin [Mon, 5 Mar 2012 22:13:59 +0000 (17:13 -0500)]
Eliminates an unused parameter warning in anti_collapse()

7 years agoLast updates for draft -11 v0.9.9
Jean-Marc Valin [Fri, 17 Feb 2012 21:09:21 +0000 (16:09 -0500)]
Last updates for draft -11

- Draft updates
- Updated code to produce and check test vectors
- Making sure that the test vectors pass at all rates as well as for mono and stereo

7 years agoModifies the comparison tool to make it much more permissive.
Jean-Marc Valin [Wed, 8 Feb 2012 14:41:50 +0000 (09:41 -0500)]
Modifies the comparison tool to make it much more permissive.

7 years agoFixes MSVC warnings
Koen Vos [Tue, 31 Jan 2012 19:49:40 +0000 (14:49 -0500)]
Fixes MSVC warnings

7 years agoTweaks the CELT fractional resampling delay to get perfect alignment
Jean-Marc Valin [Tue, 31 Jan 2012 07:03:39 +0000 (02:03 -0500)]
Tweaks the CELT fractional resampling delay to get perfect alignment

Also using the same int->float conversion functions for SILK as for CELT
and changed encoder implementation default to constrained VBR just to
be safe when VBR gets more aggressive.

7 years agoLast part of the LPC work stabilization work discussed at the last meeting
Koen Vos [Tue, 31 Jan 2012 06:51:22 +0000 (01:51 -0500)]
Last part of the LPC work stabilization work discussed at the last meeting

Also adds the encoder part of commit ee8adbe701 as well as a few
minor cleanups.

7 years agoImprovements to the tests, add a TEST_OPUS_NOFUZZ to disable testing corrupted input.
Gregory Maxwell [Wed, 14 Dec 2011 07:03:50 +0000 (02:03 -0500)]
Improvements to the tests, add a TEST_OPUS_NOFUZZ to disable testing corrupted input.

No changes to the codec itself.

7 years agoMaking the PLC robust to overflows caused by extreme bit-streams
Jean-Marc Valin [Tue, 24 Jan 2012 22:32:09 +0000 (11:32 +1300)]
Making the PLC robust to overflows caused by extreme bit-streams

This is not strictly necessary because the only streams that cause these
already sound horrible, but it helps the testing process.

7 years agoFixes a non-bitstream-related PLC integer overflow.
Jean-Marc Valin [Tue, 24 Jan 2012 08:08:15 +0000 (21:08 +1300)]
Fixes a non-bitstream-related PLC integer overflow.

7 years agoFixes a few minor issues (no bit-stream change)
Jean-Marc Valin [Tue, 24 Jan 2012 01:45:08 +0000 (14:45 +1300)]
Fixes a few minor issues (no bit-stream change)

- Safer gain clamping for PLC
- Makes opus_decoder_get_nb_samples() report an error on invalid ToC
- Giving a free license to the text ofthe draft (not just the code)

8 years agoAccuracy improvements to help float implementations
Koen Vos [Wed, 14 Dec 2011 16:39:29 +0000 (11:39 -0500)]
Accuracy improvements to help float implementations

Also clamps the gain to avoid forcing a float decoder to emulate the
state rescaling.

8 years agoFixes two minor issues found in random testing at ridiculously low rate.
Jean-Marc Valin [Tue, 13 Dec 2011 19:52:43 +0000 (14:52 -0500)]
Fixes two minor issues found in random testing at ridiculously low rate.

- When it cannot produce the rate it's being asked, the encoder now
  returns a "PLC packet"
- Makes it possible to use the CELT PLC for more than 20 ms

8 years agoImproves the accuracy such that it matches a float decoder much better
Koen Vos [Tue, 13 Dec 2011 19:50:12 +0000 (14:50 -0500)]
Improves the accuracy such that it matches a float decoder much better

8 years agoSILK fixes following last codec WG meeting
Koen Vos [Tue, 13 Dec 2011 19:47:31 +0000 (14:47 -0500)]
SILK fixes following last codec WG meeting

- fixed incorrect scaling of filter states for the smallest quantization
  step sizes
- NLSF2A now limits the prediction gain of LPC filters

- 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

- 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

8 years agoMove nbits_total initialize before renormalization.
Timothy B. Terriberry [Tue, 29 Nov 2011 16:03:03 +0000 (08:03 -0800)]
Move nbits_total initialize before renormalization.

The range decoder used to initialize nbits_total after the
 renormalization loop, even though the renormalization loop
 modifies it.
This was presumably safe, because nothing actually used the value
 before it was initialized, but I'm tired of it triggering the
 integer overflow checking.

8 years agoFixes the code for optional self-delimited packing to make it fit the draft
Gregory Maxwell [Tue, 29 Nov 2011 04:19:08 +0000 (23:19 -0500)]
Fixes the code for optional self-delimited packing to make it fit the draft

This has no impact on opus_demo, test vectors, or "normal" codec operation

8 years agoAll variables named "bank" renamed to "bandE" to avoid problems on SHARC
Jean-Marc Valin [Fri, 2 Dec 2011 17:38:32 +0000 (12:38 -0500)]
All variables named "bank" renamed to "bandE" to avoid problems on SHARC

SHARK compiler treaks "bank" as a reserved keyword -- go figure.

8 years agoRename '_FOO' to avoid potentional collisions with reserved identifiers.
Ralph Giles [Fri, 25 Nov 2011 21:02:00 +0000 (13:02 -0800)]
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.

8 years agoSome minor (non-bitstream-affecting) changes to help us have better test vectors
Jean-Marc Valin [Tue, 29 Nov 2011 03:48:01 +0000 (22:48 -0500)]
Some minor (non-bitstream-affecting) changes to help us have better test vectors

These fix corner cases discovered during the latest fuzzing tests.

8 years agoTesting tools improvements (no impact on draft)
Gregory Maxwell [Sat, 26 Nov 2011 04:53:15 +0000 (23:53 -0500)]
Testing tools improvements (no impact on draft)

8 years agoMisc documentation fixes (no code change)
Ralph Giles [Sat, 26 Nov 2011 04:25:38 +0000 (23:25 -0500)]
Misc documentation fixes (no code change)

We use macros to encapsulate the appropriate type and size
information for the different CTL requests, but the macros
still need to be used with the _ctl() function call and an
encoder or decoder instance structure. As such, just listing
the macro defines is confusing. Adding some examples outside
the OpusEncoder overview page should help with this.

Also document that OPUS_SET_APPLICATION can take

8 years agoFix various typing and spelling errors in the draft.
Ralph Giles [Fri, 18 Nov 2011 21:48:01 +0000 (13:48 -0800)]
Fix various typing and spelling errors in the draft.

Also regularises some Canadian spelling to US like the rest of
the document.

8 years agoMinor anti-collapse state fix
Jean-Marc Valin [Mon, 7 Nov 2011 04:27:16 +0000 (23:27 -0500)]
Minor anti-collapse state fix

This fixes the tracking of the CELT anti-collapse energy. In some cases,
the energy for bands that weren't coded wasn't updated and could
come from old frames.

8 years agodraft version update draft-10 v0.9.8
Jean-Marc Valin [Mon, 31 Oct 2011 23:54:33 +0000 (19:54 -0400)]
draft version update

8 years agoversion bump
Jean-Marc Valin [Mon, 31 Oct 2011 23:53:06 +0000 (19:53 -0400)]
version bump

8 years agoFixes a minor issue on CELT->SILK switching
Jean-Marc Valin [Mon, 31 Oct 2011 23:51:47 +0000 (19:51 -0400)]
Fixes a minor issue on CELT->SILK switching

8 years agoversion number bump draft-09 v0.9.7
Jean-Marc Valin [Mon, 31 Oct 2011 21:21:55 +0000 (17:21 -0400)]
version number bump

8 years agoMore last-minute typos
Jean-Marc Valin [Mon, 31 Oct 2011 20:30:58 +0000 (16:30 -0400)]
More last-minute typos

8 years agoTypos
Jean-Marc Valin [Mon, 31 Oct 2011 20:26:30 +0000 (16:26 -0400)]

8 years agoFixes sha1 of test1_mono
Jean-Marc Valin [Mon, 31 Oct 2011 20:08:51 +0000 (16:08 -0400)]
Fixes sha1 of test1_mono

8 years agodraft version/date change
Jean-Marc Valin [Mon, 31 Oct 2011 20:02:12 +0000 (16:02 -0400)]
draft version/date change

8 years agoTest vectors update
Jean-Marc Valin [Mon, 31 Oct 2011 20:00:34 +0000 (16:00 -0400)]
Test vectors update

8 years agoAdds -random_fec option to randomly add FEC to some frames.
Jean-Marc Valin [Mon, 31 Oct 2011 18:35:44 +0000 (14:35 -0400)]
Adds -random_fec option to randomly add FEC to some frames.

Undocumented for now

8 years agoMinor draft edits.
Timothy B. Terriberry [Mon, 31 Oct 2011 18:09:34 +0000 (11:09 -0700)]
Minor draft edits.

8 years agoClean up whitespace in the draft makefile.
Ralph Giles [Mon, 31 Oct 2011 17:36:39 +0000 (10:36 -0700)]
Clean up whitespace in the draft makefile.

Remove a trailing tab, and unexpand some tabs in the
source listing.

8 years agoMulti-stream now checks that each stream at least contains a ToC.
Jean-Marc Valin [Mon, 31 Oct 2011 17:18:43 +0000 (13:18 -0400)]
Multi-stream now checks that each stream at least contains a ToC.

8 years agoTest vector warning
Jean-Marc Valin [Mon, 31 Oct 2011 17:09:51 +0000 (13:09 -0400)]
Test vector warning

8 years agoAdds -random_framesize and -sweep_max options to opus_demo
Jean-Marc Valin [Mon, 31 Oct 2011 02:49:35 +0000 (22:49 -0400)]
Adds -random_framesize and -sweep_max options to opus_demo

Undocumented for now.

8 years agoFixes a redundancy bug in glitchless SILK-SILK switching
Jean-Marc Valin [Mon, 31 Oct 2011 02:41:32 +0000 (22:41 -0400)]
Fixes a redundancy bug in glitchless SILK-SILK  switching

The CELT encoder could end up using a non-max bit-rate and not use
all the bytes it's supposed to use.

8 years agoFix multistream packet corruption, implement GET_FINAL_RANGE for multistream, and...
Gregory Maxwell [Sun, 30 Oct 2011 23:57:22 +0000 (19:57 -0400)]
Fix multistream packet corruption, implement GET_FINAL_RANGE for multistream, and add many tests.

Multistream encode was failing to add the length of the extra length for
self-delimited packets causing corrupted output. Multistream decode was
not properly handling lost frames (and potentially reading out of bounds
as a result).

GET_FINAL_RANGE has been implemented as the xor of the final range of all
the streams in the packet.

test_opus_encode now does the mono narrowband tests using dual-mono

8 years agodraft: s/LSb/LSB/
Jean-Marc Valin [Sun, 30 Oct 2011 20:58:56 +0000 (16:58 -0400)]
draft: s/LSb/LSB/

8 years agoFix a number of multistream decoder bugs; add some very basic multistream decoder...
Gregory Maxwell [Sun, 30 Oct 2011 06:16:25 +0000 (02:16 -0400)]
Fix a number of multistream decoder bugs; add some very basic multistream decoder tests.

8 years agodraft: Better description of the CELT allocation and stereo decisions
Jean-Marc Valin [Sun, 30 Oct 2011 05:40:55 +0000 (01:40 -0400)]
draft: Better description of the CELT allocation and stereo decisions

8 years agoFix some inconsequential file descriptor leaks in the demo tools to silence cppcheck...
Gregory Maxwell [Sun, 30 Oct 2011 03:54:45 +0000 (23:54 -0400)]
Fix some inconsequential file descriptor leaks in the demo tools to silence cppcheck warnings.

8 years agoSILK encoder description
Koen Vos [Sun, 30 Oct 2011 01:50:17 +0000 (21:50 -0400)]
SILK encoder description

8 years agoMinor changes to test_opus_encode to improve coverage a little bit.
Gregory Maxwell [Sat, 29 Oct 2011 22:19:23 +0000 (18:19 -0400)]
Minor changes to test_opus_encode to improve coverage a little bit.

8 years agoRemoves "set but never used" variables
Jean-Marc Valin [Sat, 29 Oct 2011 21:46:18 +0000 (17:46 -0400)]
Removes "set but never used" variables

8 years agoSilences a gcc warning
Jean-Marc Valin [Sat, 29 Oct 2011 21:28:51 +0000 (17:28 -0400)]
Silences a gcc warning

8 years agoNewly introduced check_encoder_option failed unconditionally instead of only when...
Gregory Maxwell [Sat, 29 Oct 2011 07:45:13 +0000 (03:45 -0400)]
Newly introduced check_encoder_option failed unconditionally instead of only when you used the wrong options.

8 years agoRemoves unused order 14 in silk_LPC_analysis_filter_FLP()
Jean-Marc Valin [Sat, 29 Oct 2011 06:15:38 +0000 (02:15 -0400)]
Removes unused order 14 in silk_LPC_analysis_filter_FLP()

8 years agoConsiders the case where SILK busts its budget in hybrid mode
Jean-Marc Valin [Sat, 29 Oct 2011 06:12:26 +0000 (02:12 -0400)]
Considers the case where SILK busts its budget in hybrid mode

8 years agofixes a mixup between decoder and PLC states
Koen Vos [Sat, 29 Oct 2011 04:24:46 +0000 (00:24 -0400)]
fixes a mixup between decoder and PLC states

8 years agoFixes PLC initialization bug
Koen Vos [Sat, 29 Oct 2011 04:03:29 +0000 (00:03 -0400)]
Fixes PLC initialization bug

8 years agooops, bad copy-paste
Jean-Marc Valin [Sat, 29 Oct 2011 03:52:21 +0000 (23:52 -0400)]
oops, bad copy-paste

8 years agoDisabling some unused SILK functions from the float build
Jean-Marc Valin [Sat, 29 Oct 2011 03:20:55 +0000 (23:20 -0400)]
Disabling some unused SILK functions from the float build

8 years agoUpdate test_opus_encode / test_opus_decode for better LBRR/PLC testing and to reduce...
Gregory Maxwell [Sat, 29 Oct 2011 02:47:20 +0000 (22:47 -0400)]
Update test_opus_encode / test_opus_decode for better LBRR/PLC testing and to reduce stack usage.

8 years agodraft wip
Jean-Marc Valin [Sat, 29 Oct 2011 03:13:28 +0000 (23:13 -0400)]
draft wip

8 years agoChecking that encoder options aren't used for decoding in opus_demo
Jean-Marc Valin [Sat, 29 Oct 2011 02:41:55 +0000 (22:41 -0400)]
Checking that encoder options aren't used for decoding in opus_demo

And vice versa

8 years agooops, forgot to update the source list
Jean-Marc Valin [Sat, 29 Oct 2011 01:20:13 +0000 (21:20 -0400)]
oops, forgot to update the source list

8 years agocomment
Koen Vos [Sat, 29 Oct 2011 01:07:17 +0000 (21:07 -0400)]

8 years agoFixes two SILK PLC issues
Koen Vos [Sat, 29 Oct 2011 01:05:22 +0000 (21:05 -0400)]
Fixes two SILK PLC issues

- Calling the decoder for FEC when there's no LBRR should no longer crash
- There should no longer be an issue with the PLC on frame size switching

8 years agoReformatting changes with an update to the MSVC project files
Koen Vos [Fri, 28 Oct 2011 23:44:26 +0000 (19:44 -0400)]
Reformatting changes with an update to the MSVC project files

8 years agotest vector wip, nothing to see here
Jean-Marc Valin [Fri, 28 Oct 2011 20:16:35 +0000 (16:16 -0400)]
test vector wip, nothing to see here

8 years agoUse the fallback __GNUC_PREREQ from arch.h in ecintrin.h.
Ralph Giles [Fri, 28 Oct 2011 18:32:44 +0000 (11:32 -0700)]
Use the fallback __GNUC_PREREQ from arch.h in ecintrin.h.

__GNUC_PREREQ is generally defined by glibc; ecintrin.h
was checking to see if it was defined before use for
portability to non-glibc systems. However, we now have
a fallback definition in arch.h.

8 years agoRemove relative paths to opus.h.
Ralph Giles [Fri, 28 Oct 2011 18:29:41 +0000 (11:29 -0700)]
Remove relative paths to opus.h.

Files are already compiled with -I./include, the relative
path in the #include line isn't necessary.

8 years agoRemove the define check for __GNUC_PREREQ.
Ralph Giles [Fri, 28 Oct 2011 18:03:29 +0000 (11:03 -0700)]
Remove the define check for __GNUC_PREREQ.

Our arch.h makes sure it's always defined. Thanks to derf
for the suggestion.

8 years agoFix the test for gcc version >= 4.6 to work for gcc 5 and up.
Ralph Giles [Fri, 28 Oct 2011 17:51:17 +0000 (10:51 -0700)]
Fix the test for gcc version >= 4.6 to work for gcc 5 and up.

We use the __GNUC_PREREQ macro from celt/arch.h to check
the required minimum gcc version. The previous check would
have failed for gcc 5.n with n from 0 to 5.

Thanks to pcgod for pointing out the problem and derf for
pointing out we had a macro for this.

8 years agoMove opus_apps inside the MALLOC_FAIL block.
Ralph Giles [Fri, 28 Oct 2011 16:27:25 +0000 (09:27 -0700)]
Move opus_apps inside the MALLOC_FAIL block.

This array is only used by the malloc failure test, and
defining it unconditionally creates an unused variable
warning on platforms where MALLOC_FAIL isn't set.

8 years agoMake the MALLOC_FAIL test solely dependent on HAVE___MALLOC_HOOK.
Ralph Giles [Fri, 28 Oct 2011 16:23:20 +0000 (09:23 -0700)]
Make the MALLOC_FAIL test solely dependent on HAVE___MALLOC_HOOK.

This test only works on glibc, but the important thing is support
for the __malloc_hook api, so that's what we should depend on,
especially since not all glibc versions have it.

8 years agoUse #pragma GCC diagnostic push/pop only on gcc 4.6 and later.
Ralph Giles [Fri, 28 Oct 2011 16:21:08 +0000 (09:21 -0700)]
Use #pragma GCC diagnostic push/pop only on gcc 4.6 and later.

These pragmas were adding in 4.6, and earlier versions warn
about them being undefined.

8 years agoCheck for __malloc_hook and define MALLOC_FAIL appropriately.
Ralph Giles [Fri, 28 Oct 2011 14:14:58 +0000 (07:14 -0700)]
Check for __malloc_hook and define MALLOC_FAIL appropriately.

The glibc 2.14 NEWS file says __malloc_hook will be removed
in the next release, so future-proof our use by checking
for this symbol at configure time and only compiling the
malloc failure tests if it is present.

8 years agoDisable the deprecated function warning on __malloc_hook.
Ralph Giles [Fri, 28 Oct 2011 13:55:30 +0000 (06:55 -0700)]
Disable the deprecated function warning on __malloc_hook.

This just works around the deprecation in glibc 2.14. I
do worry what will happen if they follow through and
remove it in 2.15.

8 years agoMoving the dash header inline to appease the apple gcc.
Gregory Maxwell [Fri, 28 Oct 2011 16:10:14 +0000 (12:10 -0400)]
Moving the dash header inline to appease the apple gcc.

8 years agoPreparing for test vectors
Jean-Marc Valin [Fri, 28 Oct 2011 16:09:00 +0000 (12:09 -0400)]
Preparing for test vectors

8 years agoFixes a bug in ec_enc_done when no range coded data was coded and adds test cases...
Gregory Maxwell [Fri, 28 Oct 2011 15:06:37 +0000 (11:06 -0400)]
Fixes a bug in ec_enc_done when no range coded data was coded and adds test cases to test_unit_entropy.

8 years agoopus_demo now returns 1 on mismatch
Jean-Marc Valin [Fri, 28 Oct 2011 15:02:40 +0000 (11:02 -0400)]
opus_demo now returns 1 on mismatch

8 years agoExtend test_unit_entropy to test some patch_initial_bits corner cases.
Gregory Maxwell [Fri, 28 Oct 2011 13:59:43 +0000 (09:59 -0400)]
Extend test_unit_entropy to test some patch_initial_bits corner cases.