opus.git
7 years agoMaking sure that everything in opus.h has a opus prefix
Jean-Marc Valin [Sun, 28 Aug 2011 19:49:32 +0000 (15:49 -0400)]
Making sure that everything in opus.h has a opus prefix

7 years agoAdd pkg-config support files.
Ralph Giles [Sun, 28 Aug 2011 10:32:13 +0000 (22:32 +1200)]
Add pkg-config support files.

These files allow compiling and linking against the reference
implementation with an invocation like `pkg-config --cflags
--libs opus`. They're optional within the opus build system,
but can simplify compilation for clients and are generally
considered part of a normal autotools build these days.

The -uninstalled version refers to local build products
within the tree, which is helpful for testing and unprivileged
builds. opus.pc is used once 'make install' has put the
libraries and headers somewhere more permanent.

7 years agoAdd new public headers to the install targets.
Ralph Giles [Sun, 28 Aug 2011 10:02:16 +0000 (22:02 +1200)]
Add new public headers to the install targets.

The new opus_types.h header is required to build against libopus,
so must be installed alongside opus.h. Furthermore, opus-tools
expects access to the multichannel support in opus_multichannel.h.

7 years agoFixes a trivial multistream fixed-point bug
Jean-Marc Valin [Sun, 28 Aug 2011 06:12:31 +0000 (02:12 -0400)]
Fixes a trivial multistream fixed-point bug

7 years agoMore // comments changed to /*
Jean-Marc Valin [Sun, 28 Aug 2011 06:09:55 +0000 (02:09 -0400)]
More // comments changed to /*

7 years agoChanging some // comments into /*
Jean-Marc Valin [Sun, 28 Aug 2011 02:53:38 +0000 (22:53 -0400)]
Changing some // comments into /*

7 years agomore multistream ctl()s
Jean-Marc Valin [Sat, 27 Aug 2011 05:32:53 +0000 (01:32 -0400)]
more multistream ctl()s

7 years agoAdds support for multi-stream encoding/decoding
Jean-Marc Valin [Sat, 27 Aug 2011 04:52:26 +0000 (00:52 -0400)]
Adds support for multi-stream encoding/decoding

Only tested for the single-stream case!

7 years agoDisable the LPC mode highpass filter when set to APPLICATION_AUDIO.
Gregory Maxwell [Fri, 26 Aug 2011 19:01:10 +0000 (15:01 -0400)]
Disable the LPC mode highpass filter when set to APPLICATION_AUDIO.

7 years agoMore precise CELT/SILK delay compensation to reduce mode switching glitches
Jean-Marc Valin [Fri, 26 Aug 2011 17:01:42 +0000 (13:01 -0400)]
More precise CELT/SILK delay compensation to reduce mode switching glitches

7 years agoMore spec updates.
Timothy B. Terriberry [Fri, 26 Aug 2011 14:02:45 +0000 (07:02 -0700)]
More spec updates.

Clarifications/fixes for stereo and handling the mid-only flag.
Also updates the Acknowledgements section.

7 years agoFixes mathops-test for pseudo-stack
Jean-Marc Valin [Fri, 26 Aug 2011 13:44:16 +0000 (09:44 -0400)]
Fixes mathops-test for pseudo-stack

7 years agoAddresses a bitstream bug for stereo FEC and minor fixes that make Opus compile again...
Koen Vos [Thu, 25 Aug 2011 17:50:21 +0000 (13:50 -0400)]
Addresses a bitstream bug for stereo FEC and minor fixes that make Opus compile again with Visual Studio.

7 years agoRemove directories added by 86476906ec9711cdd1d74ae35bfb9bd0ba60f0d9.
Gregory Maxwell [Wed, 24 Aug 2011 21:39:02 +0000 (17:39 -0400)]
Remove directories added by 86476906ec9711cdd1d74ae35bfb9bd0ba60f0d9.

7 years agofixes a build issue introduced in the s/signal/frame/ patch
Jean-Marc Valin [Wed, 24 Aug 2011 04:53:38 +0000 (00:53 -0400)]
fixes a build issue introduced in the s/signal/frame/ patch

7 years agoExpand tabs and regularize some conditionals.
Ralph Giles [Wed, 24 Aug 2011 04:29:29 +0000 (00:29 -0400)]
Expand tabs and regularize some conditionals.

7 years agoMore spec additions.
Timothy B. Terriberry [Wed, 24 Aug 2011 01:25:49 +0000 (18:25 -0700)]
More spec additions.

This should now document the complete SILK bitstream, though not
 the full reconstruction process.

7 years agoUse 'frame' instead of 'signal' in the silk code.
Ralph Giles [Wed, 24 Aug 2011 00:49:04 +0000 (12:49 +1200)]
Use 'frame' instead of 'signal' in the silk code.

On MacOS, stdlib.h ends up including sys/signal.h, generating
warnings about the local variables called 'signal' shadowing
the global symbol signal(3). Tested with XCode 4.1 on
MacOS X 10.7.0.

The signal buffers passed in are generally frames being processed,
and the code already uses the term frame and frame_length elsewhere,
so I've resolved the warning by renaming signal and signal_* locals
and parameters to frame and frame_*.

7 years agoInclude opus_private.h when building the repacketizer.
Ralph Giles [Wed, 24 Aug 2011 00:01:16 +0000 (12:01 +1200)]
Include opus_private.h when building the repacketizer.

The repacketizer uses encode_size() which is only declared
in the private header.

7 years agoUse standard search path for systems headers in the repacketizer.
Ralph Giles [Tue, 23 Aug 2011 23:58:47 +0000 (11:58 +1200)]
Use standard search path for systems headers in the repacketizer.

7 years agoCopyedited draft (up to line 4015).
Kat Walsh [Tue, 23 Aug 2011 07:48:43 +0000 (03:48 -0400)]
Copyedited draft (up to line 4015).

Edited for correctness, clarity, and consistent usage.
No meaning should have been changed by this edit.

7 years agoIn VBR the MDCT modes rate control could dramatically over/undershoot after a frame...
Gregory Maxwell [Tue, 23 Aug 2011 06:00:55 +0000 (02:00 -0400)]
In VBR the MDCT modes rate control could dramatically over/undershoot after a frame size change
because the adaptive rate control offset was not being scaled.

7 years agoencode_size() moved out of opus_encoder.c
Jean-Marc Valin [Tue, 23 Aug 2011 06:56:12 +0000 (02:56 -0400)]
encode_size() moved out of opus_encoder.c

7 years agoMoves align() to a single header
Jean-Marc Valin [Mon, 22 Aug 2011 14:40:38 +0000 (10:40 -0400)]
Moves align() to a single header

8 years agoBetter handling of DTX for range coder state checks
Jean-Marc Valin [Sat, 20 Aug 2011 04:21:46 +0000 (00:21 -0400)]
Better handling of DTX for range coder state checks

8 years agoFinal range coder state now exposed through the ctl() interface
Jean-Marc Valin [Fri, 19 Aug 2011 21:07:16 +0000 (17:07 -0400)]
Final range coder state now exposed through the ctl() interface

8 years agoIncluding redundant frames in the final range coder state
Jean-Marc Valin [Fri, 19 Aug 2011 20:11:41 +0000 (16:11 -0400)]
Including redundant frames in the final range coder state

8 years agoAdd prototypes for the _float functions to opus.h.
Gregory Maxwell [Fri, 19 Aug 2011 16:17:22 +0000 (12:17 -0400)]
Add prototypes for the _float functions to opus.h.

8 years agoRemoves opus_encoder.h and opus_decoder.h
Jean-Marc Valin [Fri, 19 Aug 2011 17:00:49 +0000 (13:00 -0400)]
Removes opus_encoder.h and opus_decoder.h

Moves opaque structs directly to .c files

8 years agoAdds code for parsing self-delimited packets
Timothy B. Terriberry [Fri, 19 Aug 2011 03:29:52 +0000 (23:29 -0400)]
Adds code for parsing self-delimited packets

8 years agoRenaming "mode" option to "application"
Jean-Marc Valin [Thu, 18 Aug 2011 21:28:28 +0000 (17:28 -0400)]
Renaming "mode" option to "application"

8 years agoUsing dllimport on Win32 when not building Opus
Jean-Marc Valin [Thu, 18 Aug 2011 21:02:25 +0000 (17:02 -0400)]
Using dllimport on Win32 when not building Opus

8 years agos/OPUS_SET_VBR_FLAG/OPUS_SET_VBR/
Jean-Marc Valin [Thu, 18 Aug 2011 20:55:24 +0000 (16:55 -0400)]
s/OPUS_SET_VBR_FLAG/OPUS_SET_VBR/

8 years agoopus_packet_parse() now returns the payload offset rather than the pointer
Jean-Marc Valin [Thu, 18 Aug 2011 19:54:00 +0000 (15:54 -0400)]
opus_packet_parse() now returns the payload offset rather than the pointer

8 years agoMaking sure the decoder always outputs at least 2.5 ms
Jean-Marc Valin [Thu, 18 Aug 2011 19:00:59 +0000 (15:00 -0400)]
Making sure the decoder always outputs at least 2.5 ms

8 years agoChanging the encoder to output the ToC in DTX mode
Jean-Marc Valin [Thu, 18 Aug 2011 18:32:16 +0000 (14:32 -0400)]
Changing the encoder to output the ToC in DTX mode

Also fixes the "output all zeros" case for DTX/PLC at the beginning of
a stream

8 years agoPrevent spurious "Invalid payload length" on test_opus decode,
Gregory Maxwell [Wed, 17 Aug 2011 21:06:17 +0000 (17:06 -0400)]
Prevent spurious "Invalid payload length" on test_opus decode,
and avoid calling rand() during decode in order to make fuzzing
more deterministic.

8 years agoReduce the number of branches around ncwrs* and ucwrs* calls with k==0.
Benjamin M. Schwartz [Wed, 17 Aug 2011 01:18:32 +0000 (21:18 -0400)]
Reduce the number of branches around ncwrs* and ucwrs* calls with k==0.

This slightly reduces the executable size and might improve
performance on platforms without good branch prediction.

8 years agoAdds a floating-point API to Opus
Jean-Marc Valin [Wed, 17 Aug 2011 19:53:37 +0000 (15:53 -0400)]
Adds a floating-point API to Opus

The high-level Opus encoder and decoder can now be compiled as
either fixed or float. Also, we now use the stack_alloc.h macros
in the top-level Opus code.

8 years agoDate change on the draft draft-08 v0.9.6
Jean-Marc Valin [Wed, 17 Aug 2011 03:22:55 +0000 (23:22 -0400)]
Date change on the draft

8 years agoMore spec additions and clean-up.
Timothy B. Terriberry [Tue, 16 Aug 2011 21:36:58 +0000 (14:36 -0700)]
More spec additions and clean-up.

This also adds an appendix for the self-delimiting framing.

8 years agoRemoves useless test in test_opus
Jean-Marc Valin [Tue, 16 Aug 2011 13:27:25 +0000 (09:27 -0400)]
Removes useless test in test_opus

8 years agoMaking the CELT bitrate default to "unlimited"
Jean-Marc Valin [Tue, 16 Aug 2011 13:12:14 +0000 (09:12 -0400)]
Making the CELT bitrate default to "unlimited"

8 years agoUpdate licensing file with current IPR disclosures; remove outdated Skype text.
Kat Walsh [Tue, 16 Aug 2011 02:57:54 +0000 (22:57 -0400)]
Update licensing file with current IPR disclosures; remove outdated Skype text.

8 years agoUpdated README files to reflect current output of tool and tweaked punctuation and...
Kat Walsh [Tue, 16 Aug 2011 02:43:51 +0000 (22:43 -0400)]
Updated README files to reflect current output of tool and tweaked punctuation and wording. Corrected typo in test_opus ("constraint"->"constrained").

8 years agoDefine CELT bitrate=-1 as "unlimited" (i.e. all bytes given)
Jean-Marc Valin [Tue, 16 Aug 2011 02:37:11 +0000 (22:37 -0400)]
Define CELT bitrate=-1 as "unlimited" (i.e. all bytes given)

8 years agoFixes a high bit-rate redundant frame bug
Jean-Marc Valin [Tue, 16 Aug 2011 02:06:02 +0000 (22:06 -0400)]
Fixes a high bit-rate redundant frame bug

We now ensure that the total payload *including* the redundant frame
is no more than 1275 bytes. Also, the redundant frame itself must
be no more than 257 (the max that can be signalled).

8 years agoIn silk_dec_API.c a memcpy was blindly copying data of differing types (opus_int16...
Gregory Maxwell [Mon, 15 Aug 2011 17:18:52 +0000 (13:18 -0400)]
In silk_dec_API.c a memcpy was blindly copying data of differing types (opus_int16[2] to opus_int[2]).

8 years agoStrip off trailing zero bytes when in LPC mode.
Gregory Maxwell [Mon, 15 Aug 2011 21:25:59 +0000 (17:25 -0400)]
Strip off trailing zero bytes when in LPC mode.
Saves about 60 bits/sec for 20ms frames.

8 years agoAvoid passing 'resynth' argument since resynth is either !encode
Gregory Maxwell [Mon, 15 Aug 2011 20:05:40 +0000 (16:05 -0400)]
Avoid passing 'resynth' argument since resynth is either !encode
or it's always 1 if -DRESYNTH.

8 years agoFixes an encoder bugg when requesting a CBR rate over the allowable limit
Jean-Marc Valin [Mon, 15 Aug 2011 18:08:57 +0000 (14:08 -0400)]
Fixes an encoder bugg when requesting a CBR rate over the allowable limit

8 years agoMake dump_modes.c include the arguments in the output.
Gregory Maxwell [Mon, 15 Aug 2011 17:03:25 +0000 (13:03 -0400)]
Make dump_modes.c include the arguments in the output.

8 years agoRespect the ANSI C89 maximum line length.
Gregory Maxwell [Mon, 15 Aug 2011 16:35:10 +0000 (12:35 -0400)]
Respect the ANSI C89 maximum line length.

8 years agoRemove two branches from bitexact_cos(). These cases were actually
Gregory Maxwell [Mon, 15 Aug 2011 15:35:39 +0000 (11:35 -0400)]
Remove two branches from bitexact_cos(). These cases were actually
unreachable due the maximum and minimum values being special cases
in the caller plus the limits of the maximum itheta precision.

The testcases are also updated to only test the reachable range.

8 years agoReplacing SPK_INLINE by static inline
Jean-Marc Valin [Mon, 15 Aug 2011 15:24:37 +0000 (11:24 -0400)]
Replacing SPK_INLINE by static inline

The config.h will take care of compat issues with "inline"

8 years agoAdd cwrs32-test coverage for some N which are only used
Gregory Maxwell [Mon, 15 Aug 2011 14:35:06 +0000 (10:35 -0400)]
Add cwrs32-test coverage for some N which are only used
with oddball opus-custom framesizes, disables testing
sizes only used by custom modes when not compiling with
custom mode support.

8 years agoIncluding config.h from all the SILK files
Jean-Marc Valin [Mon, 15 Aug 2011 14:49:53 +0000 (10:49 -0400)]
Including config.h from all the SILK files

8 years agoMaking the MDCT produce interleaved data
Jean-Marc Valin [Mon, 15 Aug 2011 14:20:06 +0000 (10:20 -0400)]
Making the MDCT produce interleaved data

8 years agoMaking the IMDCT work on interleaved data
Jean-Marc Valin [Mon, 15 Aug 2011 14:01:00 +0000 (10:01 -0400)]
Making the IMDCT work on interleaved data

Saves a copy in the decoder

8 years agoRemoves unused functions from cwrs.c
Jean-Marc Valin [Mon, 15 Aug 2011 13:43:52 +0000 (09:43 -0400)]
Removes unused functions from cwrs.c

8 years agokiss fft cleanup
Jean-Marc Valin [Mon, 15 Aug 2011 13:39:16 +0000 (09:39 -0400)]
kiss fft cleanup

8 years agoRenames the kiss FFT implementation to reduce the risk of symbol clashes
Jean-Marc Valin [Mon, 15 Aug 2011 13:01:29 +0000 (09:01 -0400)]
Renames the kiss FFT implementation to reduce the risk of symbol clashes

8 years agoMaking forward and inverse FFT non-recursive
Jean-Marc Valin [Mon, 15 Aug 2011 06:36:42 +0000 (02:36 -0400)]
Making forward and inverse FFT non-recursive

Should be less confusing for profiling

8 years agoRemoving (already broken) support for strides in kiss-fft
Jean-Marc Valin [Sun, 14 Aug 2011 22:01:13 +0000 (18:01 -0400)]
Removing (already broken) support for strides in kiss-fft

8 years agoProperly take into account the frame size to decide the mode
Jean-Marc Valin [Sat, 13 Aug 2011 05:44:39 +0000 (01:44 -0400)]
Properly take into account the frame size to decide the mode

8 years agoFixes a pretty bad stereo bug in test_opus
Jean-Marc Valin [Sat, 13 Aug 2011 05:44:09 +0000 (01:44 -0400)]
Fixes a pretty bad stereo bug in test_opus

8 years agoRearrange mode structure to avoid wasting memory from padding.
Gregory Maxwell [Fri, 12 Aug 2011 23:03:29 +0000 (19:03 -0400)]
Rearrange mode structure to avoid wasting memory from padding.

8 years agoIdentifying the fuzzing builds in the version string
Jean-Marc Valin [Fri, 12 Aug 2011 20:23:16 +0000 (16:23 -0400)]
Identifying the fuzzing builds in the version string

8 years agoFixes a stereo rate mismatch bug
Jean-Marc Valin [Fri, 12 Aug 2011 20:17:27 +0000 (16:17 -0400)]
Fixes a stereo rate mismatch bug

This is a tentative fix for a bug found in fuzzing where the encoder
switched from mono to stereo while in the process of changing bandwidth.
The result was that the newly added side would use the new sampling
rate, while the mid hadn't switched yet, causing an encoder/decoder
mismatch. The fix is that the side rate selection gets overridden
to use the mid rate.
The bug would occur when compiling with fuzzing enabled and using:
./test_opus 0 48000 2 24000 input.sw output.sw

8 years agoCorrect anti_collapse in the decoder to handle the stereo
Gregory Maxwell [Fri, 12 Aug 2011 18:22:16 +0000 (14:22 -0400)]
Correct anti_collapse in the decoder to handle the stereo
to mono state transition in the same manner as the encoder.

8 years agoShrink INV_TABLE to save a little memory.
Gregory Maxwell [Fri, 12 Aug 2011 17:08:38 +0000 (13:08 -0400)]
Shrink INV_TABLE to save a little memory.

8 years agoEliminate some unreachable cases from the cwrs code and fixup the
Gregory Maxwell [Fri, 12 Aug 2011 16:05:16 +0000 (12:05 -0400)]
Eliminate some unreachable cases from the cwrs code and fixup the
asserts to reflect the actual limits. Update the cwrs test to cover
the complete n,k range used by opus/opus_custom.

8 years agoFixes a mode transition bug found by fuzzing
Jean-Marc Valin [Fri, 12 Aug 2011 04:30:47 +0000 (00:30 -0400)]
Fixes a mode transition bug found by fuzzing

During SILK->CELT transitions, we were delaying the mode change by
one frame, but only after having ensured that bandwidth and mode were
consistent. We now do the delaying earlier.

8 years agoAdds a fuzzing mode that causes the encoder to make random decisions
Jean-Marc Valin [Thu, 11 Aug 2011 20:21:58 +0000 (16:21 -0400)]
Adds a fuzzing mode that causes the encoder to make random decisions

8 years agoFixed multiple bugs in the repacketizer
Jean-Marc Valin [Wed, 10 Aug 2011 18:17:55 +0000 (14:17 -0400)]
Fixed multiple bugs in the repacketizer

Repacketizer now seems to work, though it doesn't yet handle
unmergeable packets. Also, test_opis no longer attempt to do proper
gapless at the end of the file, which was causing problems for
repacketization, but also with 32 bit overflows

8 years agoAdds a test_repacketizer tool and fixes a few of the bugs in the repacketizer
Jean-Marc Valin [Wed, 10 Aug 2011 13:47:30 +0000 (09:47 -0400)]
Adds a test_repacketizer tool and fixes a few of the bugs in the repacketizer

Still more bugs to find

8 years agoRepacketization code (untested)
Jean-Marc Valin [Wed, 10 Aug 2011 12:54:49 +0000 (08:54 -0400)]
Repacketization code (untested)

8 years agoRefactoring the decoder to create opus_packet_parse()
Jean-Marc Valin [Mon, 8 Aug 2011 15:57:13 +0000 (11:57 -0400)]
Refactoring the decoder to create opus_packet_parse()

8 years agoUnit tests for bitexact_cos() and bitexact_log2tan().
Gregory Maxwell [Mon, 8 Aug 2011 02:42:56 +0000 (22:42 -0400)]
Unit tests for bitexact_cos() and bitexact_log2tan().

8 years agoUsing a more conservative trim (just in case) following Greg's last patch
Jean-Marc Valin [Mon, 8 Aug 2011 15:33:17 +0000 (11:33 -0400)]
Using a more conservative trim (just in case) following Greg's last patch

8 years agoCorrect allocation tilt estimation in the CELT encoder for stereo.
Gregory Maxwell [Sun, 7 Aug 2011 04:57:31 +0000 (00:57 -0400)]
Correct allocation tilt estimation in the CELT encoder for stereo.
Remove a redundant negative length check in celt_decode.

8 years agoremoves tandem test
Jean-Marc Valin [Fri, 5 Aug 2011 15:05:47 +0000 (11:05 -0400)]
removes tandem test

8 years agoFixes the celt_exp2() test (not the function, the test itself)
Jean-Marc Valin [Fri, 5 Aug 2011 14:53:04 +0000 (10:53 -0400)]
Fixes the celt_exp2() test (not the function, the test itself)

Was previously testing only far on the negative side and using
the wrong scaling factor

8 years agoRe-enables test cases, including the rotation test
Jean-Marc Valin [Fri, 5 Aug 2011 14:47:41 +0000 (10:47 -0400)]
Re-enables test cases, including the rotation test

8 years agoFixes two test cases
Jean-Marc Valin [Fri, 5 Aug 2011 13:41:22 +0000 (09:41 -0400)]
Fixes two test cases

8 years agoUsing the real version name instead of the last tag name
Jean-Marc Valin [Fri, 5 Aug 2011 12:47:24 +0000 (08:47 -0400)]
Using the real version name instead of the last tag name

8 years agoAdds OPUS_GET_LOOKAHEAD
Jean-Marc Valin [Wed, 3 Aug 2011 16:44:37 +0000 (12:44 -0400)]
Adds OPUS_GET_LOOKAHEAD

8 years agoRename libcelt/static_modes_(fixed|float).c to .h to better reflect
Gregory Maxwell [Tue, 2 Aug 2011 21:13:06 +0000 (17:13 -0400)]
Rename libcelt/static_modes_(fixed|float).c to .h to better reflect
their usage and to make any toolchain that doesn't like to #include
.c file happy.

8 years agoTell automake to put object files in subdirectories.
Ralph Giles [Tue, 2 Aug 2011 18:43:43 +0000 (11:43 -0700)]
Tell automake to put object files in subdirectories.

Previously the autotools build litered whatever directory
'make' was invoked from with intermediate files. Adding
'subdir-objects' to AUTOMAKE_OPTIONS tells it to put them
in subdirectories according to the relative paths to the
source files, .i.e. silk/schur.o for $(srcdir)/silk/schur.c

The change to autogen.sh is necessary to handle the
(apparently new) case where an AUTOMAKE_OPTIONS line is
given without a minimum version number.

8 years agoRemove duplicate 'libopus' from the fallback version string.
Ralph Giles [Tue, 2 Aug 2011 17:33:04 +0000 (10:33 -0700)]
Remove duplicate 'libopus' from the fallback version string.

Thanks to Tim Terriberry for pointing out the issue.

8 years agoUse 'libopus' rather than 'Opus' in the version string.
Ralph Giles [Tue, 2 Aug 2011 17:17:44 +0000 (10:17 -0700)]
Use 'libopus' rather than 'Opus' in the version string.

This better distinguishes the reference implementation,
which is what this string is meant to do. Thanks to
Greg Maxwell for the suggestion.

8 years agoPrint the library version from test_opus.
Ralph Giles [Tue, 2 Aug 2011 17:14:36 +0000 (10:14 -0700)]
Print the library version from test_opus.

This lets us verify this part of the API is working.

8 years agoRegularize whitespace in the src directory.
Ralph Giles [Tue, 2 Aug 2011 17:06:59 +0000 (10:06 -0700)]
Regularize whitespace in the src directory.

Remove trailing whitespace, convert tabs to 4 spaces, re-align
test_opus to use 4-space indents instead of 3, and re-wrap some
long lines.

8 years agoPrepend "Opus" to the version string.
Ralph Giles [Tue, 2 Aug 2011 16:39:54 +0000 (09:39 -0700)]
Prepend "Opus" to the version string.

This lets users print it out without context, which is a little
easier for clients.

8 years agoQuery git for the repository revision and use that for the version string.
Ralph Giles [Tue, 2 Aug 2011 16:34:55 +0000 (09:34 -0700)]
Query git for the repository revision and use that for the version string.

Rather than compiling in the fixed version number from the configure
file, it's more helpful for testing and debugging to directly embed
the repository's revision. We use 'git describe --tags' for this, since
for tagged revisions it just returns the tag name, and in other cases
is more readable than a raw commit id.

If git isn't present or can't find a repository to query, we fall back
to the static version number in the configure script.

8 years agoDefine a fallback version string.
Ralph Giles [Tue, 2 Aug 2011 00:10:00 +0000 (17:10 -0700)]
Define a fallback version string.

The new opus_get_version_string() call just returns a static string
defined by OPUS_VERSION, which is passed in from the build system
through config.h (or a custom compile line). Provide a fallback to
"unknown" if the build system fails to actually provide that definition.

This restores compilation with Makefile.draft.

In general, this means there will be builds out there with non-specific
version strings, since ports won't be forced to update the string. While
that's unfortunate, I think it's more valuable that the library be simple
to build.

8 years agoforgot to include opus.h from opus.c
Jean-Marc Valin [Tue, 2 Aug 2011 16:39:13 +0000 (12:39 -0400)]
forgot to include opus.h from opus.c

8 years agoMakefile fixes
Jean-Marc Valin [Tue, 2 Aug 2011 12:13:42 +0000 (08:13 -0400)]
Makefile fixes

silk_sources.mk no longer needs to be patched (s/if/ifdef/) for
the draft Makefile to work.

8 years agoFix varrious splint warnings, C89 compatibility, and compilation with the
Gregory Maxwell [Tue, 2 Aug 2011 02:02:25 +0000 (22:02 -0400)]
Fix varrious splint warnings, C89 compatibility, and compilation with the
draft makefile. Increase precision of the static modes table.

8 years agoRemove many unused defines and convert some double constants to float.
Gregory Maxwell [Tue, 2 Aug 2011 00:41:54 +0000 (20:41 -0400)]
Remove many unused defines and convert some double constants to float.