22 months agoopusenc: Avoid resampler fractional sample offset
Jean-Marc Valin [Sun, 22 Jan 2017 05:31:12 +0000 (21:31 -0800)]
opusenc: Avoid resampler fractional sample offset

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
22 months agoRemove obsolete ChangeLog
Mark Harris [Sun, 22 Jan 2017 04:44:26 +0000 (20:44 -0800)]
Remove obsolete ChangeLog

22 months agoUpdate copyright year
Mark Harris [Sun, 22 Jan 2017 04:40:15 +0000 (20:40 -0800)]
Update copyright year

22 months agoopusenc: Clean up help
Mark Harris [Thu, 1 Oct 2015 08:58:42 +0000 (01:58 -0700)]
opusenc: Clean up help

Clearly indicate which options require a parameter and its usual
format.  Use imperative verb form consistently.  Minor rearrangement
to improve logical ordering.  Move diagnostic options to the end.
Move verbose --picture details to --help-picture so that basic usage
information has a chance of fitting on one screen.  Change use of
obsolete term "MIME type" to "media type".  Update man page to match.

22 months agoopusenc: Fix typos
Mark Harris [Thu, 1 Oct 2015 08:57:20 +0000 (01:57 -0700)]
opusenc: Fix typos

22 months agoopusenc: Don't read excess data after samples
Mark Harris [Thu, 1 Oct 2015 08:55:33 +0000 (01:55 -0700)]
opusenc: Don't read excess data after samples

When reading WAV/AIFF data with a known length, don't try to read
(and then discard) data beyond that length, to avoid blocking or
adding unnecessary latency when the data is not from a file.

22 months agoopusenc: Limit end trimming to one frame
Mark Harris [Thu, 1 Oct 2015 08:49:28 +0000 (01:49 -0700)]
opusenc: Limit end trimming to one frame

Avoid writing a final packet larger than 20ms that is larger than
necessary, with 20ms or more that is beyond the end of the stream.

22 months agoopusenc: Change fatal WAV/AIFF warnings to errors
Mark Harris [Thu, 1 Oct 2015 08:48:19 +0000 (01:48 -0700)]
opusenc: Change fatal WAV/AIFF warnings to errors

22 months agoopusenc: Don't warn about mono center channel WAV
Mark Harris [Thu, 1 Oct 2015 08:51:00 +0000 (01:51 -0700)]
opusenc: Don't warn about mono center channel WAV

Even if it has only one channel, an input WAV file can contain a
channel mask. A warning is issued if it is present but not a
supported value. Don't warn about the previously accepted mask
of 1 (FL), or 4 (FC).  Arguably a channel mask of 1 (FL) should
trigger the warning, just as 2 (FR) does, but some tools (including
old opusdec when decoding to floating point WAV) actually write an
incorrect channel mask of 1 for mono WAV files.

22 months agoopusdec: Fix channel mask in mono float WAV output
Mark Harris [Thu, 1 Oct 2015 08:50:35 +0000 (01:50 -0700)]
opusdec: Fix channel mask in mono float WAV output

Mono channel mask changed from 1 (front left) to 4 (front center)
in WAV output.

22 months agoopusrtp::sniff() - Call pcap_close for any error condition.
Ralph Giles [Mon, 16 Jan 2017 19:00:14 +0000 (11:00 -0800)]
opusrtp::sniff() - Call pcap_close for any error condition.

This avoids leaking the handle on error.

22 months agoopusrtp::extract() - call pcap_close for any error condition
Giacomo Vacca [Sun, 15 Jan 2017 19:37:31 +0000 (20:37 +0100)]
opusrtp::extract() - call pcap_close for any error condition

Signed-off-by: Ralph Giles <giles@thaumas.net>
22 months agoopusrtp::extract() - use only if HAVE_PCAP
Giacomo Vacca [Sun, 15 Jan 2017 19:32:07 +0000 (20:32 +0100)]
opusrtp::extract() - use only if HAVE_PCAP

Signed-off-by: Ralph Giles <giles@thaumas.net>
22 months agoopusrtp: add extract (from file) option
Giacomo Vacca [Thu, 12 Jan 2017 10:42:46 +0000 (11:42 +0100)]
opusrtp: add extract (from file) option

Signed-off-by: Ralph Giles <giles@thaumas.net>
22 months agoopusdec: fix crash with 64-bit VS builds
Ricardo Constantino [Sat, 14 Jan 2017 18:39:50 +0000 (18:39 +0000)]
opusdec: fix crash with 64-bit VS builds

Fix suggested by mark4o.
Tested with 32 and 64-bit VS2015 and MinGW GCC 6.3.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
23 months agoopusenc: Sanitize sample rate, fix rate from AIFF
Mark Harris [Thu, 1 Oct 2015 08:53:04 +0000 (01:53 -0700)]
opusenc: Sanitize sample rate, fix rate from AIFF

Fix errors (not affecting common values) in reading the sample rate
from AIFF: the low 32 bits of the mantissa were incorrectly interpreted
as signed, the first byte rather than first bit was being used as
a sign, and non-integer rates were not properly rounded.

Although the sample rate is validated prior to setting up the
resampler, sample rates outside the range of an "int" could cause
undefined behavior prior to that when cast from double to int for
AIFF. Such rates could also be incorrect for WAV on 32-bit builds.
Ensure that the rate is within the range of an int prior to casting.

2 years agoFix potential uninitialized access for set-ctl-int
Michael Graczyk [Tue, 26 Apr 2016 03:43:34 +0000 (20:43 -0700)]
Fix potential uninitialized access for set-ctl-int

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
2 years agoopusenc: Use correct types for WAV/AIFF fields
Mark Harris [Thu, 1 Oct 2015 08:44:34 +0000 (01:44 -0700)]
opusenc: Use correct types for WAV/AIFF fields

Don't treat unsigned fields as negative.
Fixes crash due to negative totalsamples.

2 years agoopusrtp: Fix clang -Wcast-align warning
Mark Harris [Fri, 18 Dec 2015 23:18:09 +0000 (15:18 -0800)]
opusrtp: Fix clang -Wcast-align warning

2 years agoopusenc: Write valid Opus file when 80+ channels
Mark Harris [Thu, 1 Oct 2015 08:47:24 +0000 (01:47 -0700)]
opusenc: Write valid Opus file when 80+ channels

2 years agoopusenc: Fix display of percent progress
Mark Harris [Thu, 1 Oct 2015 08:35:03 +0000 (01:35 -0700)]
opusenc: Fix display of percent progress

Fixes https://trac.xiph.org/ticket/2132, initial patch by rillke

2 years agoUse the appveyor badge for the xiph github repo.
Ralph Giles [Wed, 21 Sep 2016 19:35:18 +0000 (12:35 -0700)]
Use the appveyor badge for the xiph github repo.

2 years agoAdd badges
Chocobo1 [Sun, 31 Jul 2016 02:29:00 +0000 (10:29 +0800)]
Add badges

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoModernize README
Chocobo1 [Sun, 31 Jul 2016 02:27:45 +0000 (10:27 +0800)]
Modernize README

Adopt markdown format

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoopusenc: Sanitize WAV/AIFF fourccs
Mark Harris [Thu, 1 Oct 2015 08:32:06 +0000 (01:32 -0700)]
opusenc: Sanitize WAV/AIFF fourccs

Don't print control characters and other invalid bytes from invalid
WAV/AIFF fourccs to the terminal.

2 years agoopusenc: Ignore null comments from FLAC input
Mark Harris [Thu, 1 Oct 2015 08:56:43 +0000 (01:56 -0700)]
opusenc: Ignore null comments from FLAC input

Crash found by afl-fuzz.

2 years agoopusenc: Handle arbitrary AIFF/WAV chunk sizes
Mark Harris [Thu, 1 Oct 2015 08:29:03 +0000 (01:29 -0700)]
opusenc: Handle arbitrary AIFF/WAV chunk sizes

Properly handle chunks of any size from AIFF/WAV input files,
including padding them to an even size as required.  Also ensure
that a relevant message is displayed on any AIFF/WAV open failure.

See oggenc https://trac.xiph.org/ticket/1817,
https://trac.xiph.org/ticket/2212 (CVE-2015-6749).

2 years agoopusenc: Consistently use large file interfaces
Mark Harris [Thu, 1 Oct 2015 08:54:32 +0000 (01:54 -0700)]
opusenc: Consistently use large file interfaces

Fix potential infinite loop on a specially-crafted input file if
"long" is only 32 bits.  Also on some systems, including some
versions of Windows and 32-bit OS X, fseek() cannot handle large
files even if the offset fits within a "long".

These issues are addressed by consistently using the fseek/ftell
variants that can handle large files, when available, for all input
file processing rather than in only one place.  Don't try to seek
or use the result if ftell() returns an error (e.g. EOVERFLOW).
If large file interfaces are not available, handle seeking in chunks
rather than wrapping and potentially causing an infinite loop.  When
reading data until EOF, treat the ftell() value as only an estimate
for percent progress; if the file grows, do not discard data after
this point.

2 years agoopusenc: Validate AIFF/WAV channel count
Mark Harris [Thu, 1 Oct 2015 08:25:13 +0000 (01:25 -0700)]
opusenc: Validate AIFF/WAV channel count

Interpret channel count properly for input format (signed for AIFF,
unsigned for WAV) and reject invalid values.

Fixes https://trac.xiph.org/ticket/2136 (CVE-2014-9639),
https://trac.xiph.org/ticket/2137 (CVE-2014-9638).

2 years agoAdd appveyor.yml
Ricardo Constantino (:RiCON) [Wed, 27 Jul 2016 00:19:42 +0000 (01:19 +0100)]
Add appveyor.yml

This enables automated testing of windows builds.

Compile opus and libogg with same configuration and platform.
Wasn't able to get the artifacts from the respective autobuilds.

Package executables into artifact and change its name to contain version.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoVS2015: Use united opus lib.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:23:25 +0000 (22:23 +0100)]
VS2015: Use united opus lib.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoVS2015: Use simple project to run genversion.bat.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:21:51 +0000 (22:21 +0100)]
VS2015: Use simple project to run genversion.bat.

Avoids trying to create and replace version.h more than once which
led to file-locking errors with multicore builds.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoVS2015: Use same format for intermediate and output dirs as opus.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:19:51 +0000 (22:19 +0100)]
VS2015: Use same format for intermediate and output dirs as opus.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoVS2015: Add x64 target to solution.
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:18:08 +0000 (22:18 +0100)]
VS2015: Add x64 target to solution.

Fix x64 include paths which were using previous directory hierarchy.

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoMove VS2015 only ignores to dedicated win32/.gitignore
Ricardo Constantino (:RiCON) [Tue, 26 Jul 2016 21:09:05 +0000 (22:09 +0100)]
Move VS2015 only ignores to dedicated win32/.gitignore

Signed-off-by: Ralph Giles <giles@thaumas.net>
2 years agoAdd a travis-ci.org config file for integration testing.
Ralph Giles [Tue, 26 Jul 2016 17:15:54 +0000 (10:15 -0700)]
Add a travis-ci.org config file for integration testing.

2 years agoRemove obsolete windows builds files from dist.
Ralph Giles [Tue, 26 Jul 2016 17:07:18 +0000 (10:07 -0700)]
Remove obsolete windows builds files from dist.

2 years agoPut back win32 version.
Ralph Giles [Tue, 26 Jul 2016 16:32:22 +0000 (09:32 -0700)]
Put back win32 version.

This should be updated by genversion.bat as part of the build
and not checked in, really.

2 years agoAdd Visual Studio Git Ignores
Orestes [Wed, 11 May 2016 16:31:47 +0000 (17:31 +0100)]
Add Visual Studio Git Ignores

Signed-off-by: Ralph Giles <giles@mozilla.com>
2 years agoAdd VS2015 files!
Orestes [Wed, 11 May 2016 16:31:14 +0000 (17:31 +0100)]
Add VS2015 files!

Tested with opus and ogg dependencies built, opus-tools build
beautifully :-)

Signed-off-by: Ralph Giles <giles@mozilla.com>
2 years agoTidy VS2010 project files.
Orestes Zoupanos [Wed, 11 May 2016 01:02:43 +0000 (02:02 +0100)]
Tidy VS2010 project files.

Signed-off-by: Ralph Giles <giles@mozilla.com>
2 years agoopusrtp: don't leak file stream on error
Tristan Matthews [Mon, 13 Jun 2016 21:05:58 +0000 (22:05 +0100)]
opusrtp: don't leak file stream on error

2 years agoFix PIE configure test
Christian Weisgerber [Wed, 27 Jan 2016 15:53:57 +0000 (15:53 +0000)]
Fix PIE configure test

In opus-tools, the current PIE configure test assumes that the opus
headers have been installed under the default header search path
of the compiler.  This isn't necessarily the case (/usr/local,
/opt, ...).

Use the detected opus include location instead.

Signed-off-by: Ralph Giles <giles@thaumas.net>
3 years agoFix a comment typo.
Ralph Giles [Wed, 9 Sep 2015 23:54:41 +0000 (16:54 -0700)]
Fix a comment typo.

4 years agoAdd --quiet to opusenc and opusdec man pages.
David Fifield [Tue, 2 Dec 2014 18:48:53 +0000 (10:48 -0800)]
Add --quiet to opusenc and opusdec man pages.

For opusdec it was only missing from the summary.

4 years agoOpusdec doesn't handle chaining that changes the channel count. Exit in that case.
Gregory Maxwell [Mon, 1 Dec 2014 21:12:47 +0000 (13:12 -0800)]
Opusdec doesn't handle chaining that changes the channel count. Exit in that case.

Also handle malloc failure in a few more cases.

4 years agoopusenc: reject sampling rates over 768KHz or under 100Hz.
Gregory Maxwell [Fri, 28 Nov 2014 05:17:54 +0000 (21:17 -0800)]
opusenc: reject sampling rates over 768KHz or under 100Hz.

Crazy sampling rates cause unreasonable memory usage.

This also moves lpc.c temporary buffers onto the heap, we use them once
per file, so the additional malloc activity is not a concern.

Thanks to Dennis Felsing for the report and example inputs.

4 years agoresample: make some tables constant
Diego Elio Pettenò [Mon, 18 Aug 2014 00:07:45 +0000 (17:07 -0700)]
resample: make some tables constant

Patch adapted from https://trac.xiph.org/ticket/1298

cherry-picked from speexdsp ddffc5b466c3c9900e0f2f238ecf7af035faf15f

Signed-off-by: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
4 years agoos_support: fix misleading comments
Tristan Matthews [Sun, 10 Aug 2014 17:50:15 +0000 (13:50 -0400)]
os_support: fix misleading comments

cherry-picked from speexdsp 86779a06f6500d041573d6252d4971d3bfcb4b18

4 years agoresample: complete speex_resampler_reset_mem
Karl Tomlinson [Wed, 25 Jun 2014 20:56:30 +0000 (16:56 -0400)]
resample: complete speex_resampler_reset_mem

Cherry-picked from speexdsp 91cc0a39e5098d0400c78e1c8a9ad874bec8611b

Signed-off-by: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
4 years agoMerge tag 'v0.1.9'
Ralph Giles [Fri, 13 Jun 2014 18:58:41 +0000 (11:58 -0700)]
Merge tag 'v0.1.9'

Opus Audio Tools 0.1.9

This is opus-tools, a set of tools to encode, inspect, and decode
audio in the Opus format.

This release adds support for 32-bit floating point WAV output and
fixes a number of minor issues.

For more information on Opus see http://www.opus-codec.org/

4 years agoarch: _USE_SSE is never defined
Tristan Matthews [Tue, 10 Jun 2014 14:53:29 +0000 (10:53 -0400)]
arch: _USE_SSE is never defined

4 years agoBump version. v0.1.9
Ralph Giles [Thu, 12 Jun 2014 00:10:14 +0000 (17:10 -0700)]
Bump version.

4 years agoFix a typo in a warning message.
Mark Harris [Mon, 9 Jun 2014 20:45:13 +0000 (13:45 -0700)]
Fix a typo in a warning message.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
4 years agoTypo fix encoder->decoder
Ron [Sun, 8 Jun 2014 15:07:31 +0000 (00:37 +0930)]
Typo fix encoder->decoder

Thanks to maikmerten for spotting it.

4 years agoCorrect minor issues with audio input error messages.
Mark Harris [Sun, 9 Feb 2014 01:52:13 +0000 (17:52 -0800)]
Correct minor issues with audio input error messages.

Signed-off-by: Gregory Maxwell <greg@xiph.org>
4 years agoFix 8-bit AIFF input.
Mark Harris [Sun, 9 Feb 2014 00:41:33 +0000 (16:41 -0800)]
Fix 8-bit AIFF input.

AIFF uses signed pcm for all sizes, whereas WAV is unsigned for 8-bit
and signed for other sizes.  For backward compatibility, continue to
use the WAV convention for raw input.

Signed-off-by: Gregory Maxwell <greg@xiph.org>
4 years agoSet correct lsb depth for WAV and AIFF input.
Mark Harris [Sat, 8 Feb 2014 23:14:34 +0000 (15:14 -0800)]
Set correct lsb depth for WAV and AIFF input.

Signed-off-by: Gregory Maxwell <greg@xiph.org>
4 years agoMake discard-comments discard album art, also add a discard-pictures.
Gregory Maxwell [Sat, 25 Jan 2014 00:17:34 +0000 (16:17 -0800)]
Make discard-comments discard album art, also add a discard-pictures.

Discarding the art is a special case because its often huge relative to the
 opus files.

Thanks for bitingsock on IRC for the report.

4 years agoopusrtp: fix memory leaks
Tristan Matthews [Thu, 16 Jan 2014 20:23:57 +0000 (12:23 -0800)]
opusrtp: fix memory leaks

Signed-off-by: Ralph Giles <giles@mozilla.com>
4 years agoDestination and port switches require arguments.
Ralph Giles [Wed, 6 Nov 2013 23:11:24 +0000 (15:11 -0800)]
Destination and port switches require arguments.

Missed this in review.

4 years agoAdd support in opusdec to write out 32-bit floating-point.
Gregory Maxwell [Mon, 13 Jan 2014 19:55:10 +0000 (11:55 -0800)]
Add support in opusdec to write out 32-bit floating-point.

5 years agoBump version. v0.1.8
Gregory Maxwell [Wed, 4 Dec 2013 23:43:08 +0000 (15:43 -0800)]
Bump version.

5 years agoFix copying pictures from FLAC with a mimetype.
Timothy B. Terriberry [Thu, 28 Nov 2013 16:02:34 +0000 (08:02 -0800)]
Fix copying pictures from FLAC with a mimetype.

If the METADATA_BLOCK_PICTURE field contained a non-empty mimetype
 or description field, then we would overwrite important pieces of
 the struct when encoding, making the tag useless.

5 years agoopusrtp: add options to set destination address and port
Tristan Matthews [Wed, 30 Oct 2013 21:07:46 +0000 (14:07 -0700)]
opusrtp: add options to set destination address and port

Signed-off-by: Ralph Giles <giles@mozilla.com>
5 years agoPass --always to 'git describe'.
Ralph Giles [Tue, 1 Oct 2013 21:47:06 +0000 (14:47 -0700)]
Pass --always to 'git describe'.

This provides a fallback commit id if no tags are available,
for example when doing a shallow clone.

5 years agoDocument using --genre and --artist multiple times.
Ralph Giles [Thu, 19 Sep 2013 21:24:44 +0000 (14:24 -0700)]
Document using --genre and --artist multiple times.

5 years agoFix a manpage typo.
Ralph Giles [Thu, 19 Sep 2013 21:24:35 +0000 (14:24 -0700)]
Fix a manpage typo.

5 years agoAdd new metadata switches to the manpage.
Ralph Giles [Mon, 9 Sep 2013 02:21:26 +0000 (19:21 -0700)]
Add new metadata switches to the manpage.

5 years agoActually enable flac support in the unix build.
Ralph Giles [Sun, 8 Sep 2013 20:21:12 +0000 (13:21 -0700)]
Actually enable flac support in the unix build.

Previously we linked to flac, but didn't set the enabling CFLAG.

5 years agoAdd wave_out to VERSIONED_OBJS.
Ralph Giles [Sun, 8 Sep 2013 20:15:19 +0000 (13:15 -0700)]
Add wave_out to VERSIONED_OBJS.

wave_out.c also references PACKAGE_NAME and PACKAGE_VERSION.

5 years agoRemove unused file NEWS.
Ralph Giles [Sun, 8 Sep 2013 17:14:26 +0000 (10:14 -0700)]
Remove unused file NEWS.

GNU autotools used to enforce some coding standards, but I don't
see a warning about not having this or a changelog now.

5 years agoBe consistent with the order we include dependencies
Ron [Sat, 7 Sep 2013 09:23:54 +0000 (18:53 +0930)]
Be consistent with the order we include dependencies

This should have no real functional change at this point in time,
but it's clear that Ogg will never depend on Opus.  The reverse is
likely to remain true, but less axiomatic.

5 years agoDon't overlink everything with flac
Ron [Sat, 7 Sep 2013 09:18:59 +0000 (18:48 +0930)]
Don't overlink everything with flac

Only opusenc uses it at present.

5 years agoDon't include OPUS_CFLAGS and OPUS_LIBS twice
Ron [Sat, 7 Sep 2013 09:16:22 +0000 (18:46 +0930)]
Don't include OPUS_CFLAGS and OPUS_LIBS twice

5 years agoBump version. v0.1.7
Gregory Maxwell [Wed, 4 Sep 2013 22:54:00 +0000 (15:54 -0700)]
Bump version.

5 years agoSilence mvsc posix warnings.
Ralph Giles [Mon, 26 Aug 2013 19:10:28 +0000 (12:10 -0700)]
Silence mvsc posix warnings.

5 years agoAdd picture.c to the Visual Studio project files.
Ralph Giles [Mon, 26 Aug 2013 18:46:05 +0000 (11:46 -0700)]
Add picture.c to the Visual Studio project files.

5 years agoUpdate opus library paths for the new project files.
Ralph Giles [Mon, 26 Aug 2013 18:31:44 +0000 (11:31 -0700)]
Update opus library paths for the new project files.

Garf's new project files build things in win32/VSnnnn/ instead
of the top level. Also updates the ogg paths to use defines
instead of hard-coding release and platform tags.

5 years agoAsk genversion.bat to generate PACKAGE_VERSION.
Ralph Giles [Mon, 26 Aug 2013 18:13:47 +0000 (11:13 -0700)]
Ask genversion.bat to generate PACKAGE_VERSION.

It was still defining VERSION in the Visual Studio project files,
which hadn't been updated for this change.

5 years agoDoc improvements for --bitrate.
Ron [Sat, 13 Jul 2013 08:11:37 +0000 (17:41 +0930)]
Doc improvements for --bitrate.

Include the doc fixes from 3138cb7c9a8b108a9609d53ad56ae6391130af79,
even if people don't want the --quality alias after all.

5 years agoAlways try to update the version when autogen.sh is run
Ron [Sat, 13 Jul 2013 08:00:13 +0000 (17:30 +0930)]
Always try to update the version when autogen.sh is run

This avoids at least one case where ./autogen.sh && ./configure && make
will re-run configure because the makefile rules updated something that
it depends upon. Pulling a new version from git will change the version
so we should update that at the first step rather than iterating after
the last one.

5 years agoRevert "Doc improvements for --bitrate, and a --quality alias for it."
Gregory Maxwell [Thu, 11 Jul 2013 23:46:12 +0000 (16:46 -0700)]
Revert "Doc improvements for --bitrate, and a --quality alias for it."

This reverts commit 3138cb7c9a8b108a9609d53ad56ae6391130af79.

5 years agoDoc improvements for --bitrate, and a --quality alias for it.
Gregory Maxwell [Thu, 11 Jul 2013 23:36:57 +0000 (16:36 -0700)]
Doc improvements for --bitrate, and a --quality alias for it.

5 years agoOpus-tools now requires libopus 1.0.3 or later.
Gregory Maxwell [Sat, 29 Jun 2013 21:22:39 +0000 (14:22 -0700)]
Opus-tools now requires libopus 1.0.3 or later.

This updates the configure.ac requirements for the last patch from
 JM, and also fixes the unused variable warnings it created.

5 years agoConverts opusenc to the new multistream surround encoder API
Jean-Marc Valin [Sun, 5 May 2013 21:10:00 +0000 (17:10 -0400)]
Converts opusenc to the new multistream surround encoder API

Channel mapping is now determined automatically by libopus.
This breaks the --uncoupled option because opusenc no longer
has any control over the mapping.

5 years agoReplace INCLUDES with AM_CPPFLAGS
Ron [Sat, 29 Jun 2013 06:08:35 +0000 (15:38 +0930)]

Automake 1.13 complains that INCLUDES is obsoleted now.

5 years agoTweak the sound driver detection tests
Ron [Fri, 28 Jun 2013 16:07:46 +0000 (01:37 +0930)]
Tweak the sound driver detection tests

Test for the available possibilities in the code in the same order that
we use when including the headers.  This ensures that BSDs which test
positive for both sndio and oss compat won't include the headers for one
and the code for the other.  The sndio support was added in commit
064bb2176518117531e0032747128761a19e5439, but only preferred sndio when
including the headers.

Enable the OSS code for all the possible HAVE_*_SOUNDCARD_H options.
A more comprehensive test and additional macros were added in commit
a0c500527daa6a8638eabac382810b1c42f442a2, but only to include the
headers, not to also enable the relevant code.

5 years agoCheck for libm in a way that shouldn't explode on BeOS
Ron [Fri, 28 Jun 2013 15:43:27 +0000 (01:13 +0930)]
Check for libm in a way that shouldn't explode on BeOS

5 years agoDrop the test for lrint too
Ron [Mon, 10 Jun 2013 13:49:15 +0000 (23:19 +0930)]
Drop the test for lrint too

Nothing uses it either.

5 years agoReplace the last AC_TRY_COMPILE
Ron [Mon, 10 Jun 2013 13:33:31 +0000 (23:03 +0930)]
Replace the last AC_TRY_COMPILE

It is declared to be obsolete and we already use AC_COMPILE_IFELSE
everywhere else, so finish the job to avoid confusion and people
pasting more instances of it in later.

Double quote all the parameters to AC_LANG_SOURCE and AC_LANG_PROGRAM.
This is actually required, even if you can get away with not doing it
sometimes, so again set a good example for future changes to follow,
to hopefully avoid people getting bitten harder than they need to be.

5 years agoGet rid of LIBM altogether
Ron [Mon, 10 Jun 2013 13:25:47 +0000 (22:55 +0930)]
Get rid of LIBM altogether

And the exp() check too.  Nothing in the code actually tests for that
and it's irrelevant whether it needs libm or not, since plenty of other
things definitely do need it.

So add the hardcoded -lm back where it is definitely needed (at the
very least for the speex resampler), and make sure it is in LIBS when
we test for lrint and f{min,max}f, since those tests do fail on Linux
if libm isn't linked.

5 years agoIndentation
Ron [Mon, 10 Jun 2013 06:17:18 +0000 (15:47 +0930)]

It's not just for the weak.

5 years agoMore autoconf housekeeping
Ron [Mon, 10 Jun 2013 06:02:22 +0000 (15:32 +0930)]
More autoconf housekeeping

Fix the libm exp() test to not unconditionally add it to everything via
LIBS, and fix opus{enc,dec}_LDADD to actually use LIBM that it sets
rather than hardcoding it there as well.

Use AS_HELP_STRING to format all option descriptions.

Get rid of a bunch of shadow variables that aren't really needed.

Drop the x warts in tests, it really isn't needed, and there are lots
of places we don't use it, so if it was they'd already be exploding.

Let the pkg-config tests actually fail if they don't find the desired
package, rather than also running the manual test which will just fail
again in that case.

Don't overlink flac with -lm in the manual test.  That was fixed in
its .pc in commit 5da86630bee2336e251f0a140f33332af703c43e.

Change --disable-flac to --without-flac.  The normal autoconf idiom is
to use 'enable' for intrinsic features and 'with' for external software
support that is optional.

Change Opus_{CFLAGS,LIBS} to OPUS_{CFLAGS,LIBS}, since that what opus.m4
will try to set if pkg-config isn't available.

Drop the check for __malloc_hook, we don't use it anywhere here.

5 years agoDrop the stdint size tests that we never use anywhere
Ron [Sat, 8 Jun 2013 15:20:30 +0000 (00:50 +0930)]
Drop the stdint size tests that we never use anywhere

These were probably cribbed from libopus, where they aren't used either,
which was probably cribbed from libogg where they are.  We definitely
don't need them here since we get all our sized types from elsewhere.

5 years agoFully automate version updating
Ron [Sat, 8 Jun 2013 15:15:07 +0000 (00:45 +0930)]
Fully automate version updating

This one meets or exceeds the following requirements:

 - Version is checked/updated for every build action when in the git repo.
   Does not require the user to re- ./configure to get the correct version.

 - Version is not updated automatically when using exported tarball source.
   Avoids accidentally getting a wrong version from some other git repo in
   a parent directory of the source, and allows setting the correct version
   for distro package exports.

 - Automatic updating can be manually suppressed.
   For developers doing lots of change/rebuild cycles they don't plan to
   release, when they don't want a full rebuild triggered for every commit,
   and again for every change made immediately after a commit.
   The version will still always be updated if they do a `make dist`.

 - Does not require any manual updating of versions in the mainline git
   repo for each release aside from normal tagging.  The version is
   recorded in one file only, that is automatically generated and will
   never need to be committed.

 - Does not require gnu-make features for the autoconf builds.

It does not currently:

 - Keep a checksum of every source file in tarball releases to mangle the
   version if people modify the tarball source.  Responsible people can
   manually update the version easily though in such cases.

5 years agoFix the phoney spelling of PHONY
Ron [Sat, 8 Jun 2013 14:57:00 +0000 (00:27 +0930)]
Fix the phoney spelling of PHONY

5 years agoTidy up some of the special CPPFLAGS
Ron [Sat, 8 Jun 2013 14:51:59 +0000 (00:21 +0930)]
Tidy up some of the special CPPFLAGS

So that we can see what they are actually for, and only apply them to
the files that actually need them.

5 years agoDrop the inline PACKAGE/VERSION fallback
Ron [Sat, 8 Jun 2013 14:36:43 +0000 (00:06 +0930)]
Drop the inline PACKAGE/VERSION fallback

If this was really needed the other tools would need it too (and would be
failing to build wherever it was).  If the normal mechanism for setting
them isn't working somewhere we should fix that instead.

5 years agoDrop the HAVE_GETOPT_H guard
Ron [Sat, 8 Jun 2013 14:32:28 +0000 (00:02 +0930)]
Drop the HAVE_GETOPT_H guard

If this was really needed the other tools would be failing to compile.
And if they are, we should fix that at the cause for all of them.