libopusenc.git
11 months agoUse fast resampler on MSVC builds to match others
Mark Harris [Thu, 13 Sep 2018 05:49:25 +0000 (22:49 -0700)]
Use fast resampler on MSVC builds to match others

11 months agoresample: Update from upstream speexdsp
Mark Harris [Mon, 10 Sep 2018 05:39:21 +0000 (22:39 -0700)]
resample: Update from upstream speexdsp

Fixes compiler warnings and invalid use of reserved identifiers
in resampler.

12 months agoUse ambisonics families 2 and 3 instead of 254 and 253
Jean-Marc Valin [Fri, 27 Jul 2018 00:11:52 +0000 (20:11 -0400)]
Use ambisonics families 2 and 3 instead of 254 and 253

15 months agoAdd basic .gitignore
Adrian Frühwirth [Tue, 9 Jan 2018 21:35:24 +0000 (22:35 +0100)]
Add basic .gitignore

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
15 months agoopusenc.h needs to #include <stddef.h> because of size_t
Jean-Marc Valin [Thu, 17 May 2018 17:00:28 +0000 (13:00 -0400)]
opusenc.h needs to #include <stddef.h> because of size_t

Thanks to joerg-krause
https://github.com/xiph/libopusenc/issues/12

16 months agoFix uninitialized var and memory leak on error
Mark Harris [Sun, 8 Apr 2018 03:54:46 +0000 (20:54 -0700)]
Fix uninitialized var and memory leak on error

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
17 months agoSupport for Ambisonics.
Andrew Allen [Mon, 19 Mar 2018 21:56:50 +0000 (14:56 -0700)]
Support for Ambisonics.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
17 months agoFix description and URL in pkg-config files
Mark Harris [Sat, 17 Mar 2018 16:24:57 +0000 (09:24 -0700)]
Fix description and URL in pkg-config files

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
17 months agoAdds OPE_GET_NB_STREAMS() and OPE_GET_NB_COUPLED_STREAMS(x)
Jean-Marc Valin [Sat, 3 Mar 2018 04:30:16 +0000 (23:30 -0500)]
Adds OPE_GET_NB_STREAMS() and OPE_GET_NB_COUPLED_STREAMS(x)

17 months agoDisable useless messages about disabled options
Jean-Marc Valin [Fri, 2 Mar 2018 21:26:44 +0000 (16:26 -0500)]
Disable useless messages about disabled options

17 months agoRemoving unused autoconf options
Jean-Marc Valin [Fri, 2 Mar 2018 19:39:31 +0000 (14:39 -0500)]
Removing unused autoconf options

17 months agoReturn OPE_UNIMPLEMENTED on unrecognized ctl
Mark Harris [Sun, 11 Feb 2018 02:29:49 +0000 (18:29 -0800)]
Return OPE_UNIMPLEMENTED on unrecognized ctl

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
18 months agoAnother fix for ope_strerror
Mark Harris [Sun, 11 Feb 2018 02:27:46 +0000 (18:27 -0800)]
Another fix for ope_strerror

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
18 months agooops
Jean-Marc Valin [Fri, 9 Feb 2018 01:17:16 +0000 (20:17 -0500)]
oops

18 months agoupdate ope_strerror()
Jean-Marc Valin [Thu, 8 Feb 2018 22:54:15 +0000 (17:54 -0500)]
update ope_strerror()

18 months agoDocumenting callbacks
Jean-Marc Valin [Thu, 8 Feb 2018 22:47:51 +0000 (17:47 -0500)]
Documenting callbacks

18 months agoIgnore close errors in ope_encoder_destroy()
Jean-Marc Valin [Thu, 8 Feb 2018 22:23:31 +0000 (17:23 -0500)]
Ignore close errors in ope_encoder_destroy()

18 months agopacket callbacks no longer return an error code
Jean-Marc Valin [Thu, 8 Feb 2018 22:09:31 +0000 (17:09 -0500)]
packet callbacks no longer return an error code

18 months agooops
Jean-Marc Valin [Thu, 8 Feb 2018 22:09:15 +0000 (17:09 -0500)]
oops

18 months agoHandling failure from write and close callbacks
Jean-Marc Valin [Thu, 8 Feb 2018 21:53:03 +0000 (16:53 -0500)]
Handling failure from write and close callbacks

18 months agoRemoving OPE_UNRECOVERABLE
Jean-Marc Valin [Thu, 8 Feb 2018 21:00:20 +0000 (16:00 -0500)]
Removing OPE_UNRECOVERABLE

18 months agohandle NULL description
Jean-Marc Valin [Wed, 7 Feb 2018 02:49:15 +0000 (21:49 -0500)]
handle NULL description

18 months agoope_encoder_deferred_init_with_mapping() no longer takes family 0
Jean-Marc Valin [Tue, 6 Feb 2018 19:33:44 +0000 (14:33 -0500)]
ope_encoder_deferred_init_with_mapping() no longer takes family 0

18 months agoForwarding errors from opus_multistream_encoder_create()
Jean-Marc Valin [Tue, 6 Feb 2018 18:02:34 +0000 (13:02 -0500)]
Forwarding errors from opus_multistream_encoder_create()

18 months agoproperly check for incorrect/unsupported mapping family
Jean-Marc Valin [Tue, 6 Feb 2018 08:46:26 +0000 (03:46 -0500)]
properly check for incorrect/unsupported mapping family

18 months agoAdd option to use picture from memory
Jean-Marc Valin [Mon, 5 Feb 2018 19:04:25 +0000 (14:04 -0500)]
Add option to use picture from memory

18 months agoMore refactoring of the picture handling code
Jean-Marc Valin [Mon, 5 Feb 2018 18:23:37 +0000 (13:23 -0500)]
More refactoring of the picture handling code

18 months agoRefactoring
Jean-Marc Valin [Sun, 4 Feb 2018 19:05:47 +0000 (14:05 -0500)]
Refactoring

18 months agoDon't trim the last frame below 20 ms to avoid switching mode
Jean-Marc Valin [Sun, 4 Feb 2018 17:40:17 +0000 (12:40 -0500)]
Don't trim the last frame below 20 ms to avoid switching mode

18 months agoOPE_[GS]ET_HEADER_GAIN has only one argument
Mark Harris [Sat, 3 Feb 2018 21:29:54 +0000 (13:29 -0800)]
OPE_[GS]ET_HEADER_GAIN has only one argument

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
18 months agoFix API doc
Jean-Marc Valin [Sun, 4 Feb 2018 08:56:44 +0000 (03:56 -0500)]
Fix API doc

18 months agoAdd ope_encoder_deferred_init_with_mapping()
Jean-Marc Valin [Sat, 3 Feb 2018 00:42:14 +0000 (19:42 -0500)]
Add ope_encoder_deferred_init_with_mapping()

Makes it possible to manually specify a channel mapping

18 months agoTrimming the end of files like opus-tools did
Jean-Marc Valin [Fri, 2 Feb 2018 21:29:33 +0000 (16:29 -0500)]
Trimming the end of files like opus-tools did

19 months agoFix allocation failure cleanup
Mark Harris [Mon, 15 Jan 2018 05:12:54 +0000 (21:12 -0800)]
Fix allocation failure cleanup

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoVS2015: add missing unicode_support files
Ricardo Constantino [Thu, 4 Jan 2018 22:26:42 +0000 (22:26 +0000)]
VS2015: add missing unicode_support files

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoAdd VS projects to make dist
Ricardo Constantino [Thu, 4 Jan 2018 00:51:23 +0000 (00:51 +0000)]
Add VS projects to make dist

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoAdd appveyor
Ricardo Constantino [Wed, 3 Jan 2018 23:57:02 +0000 (23:57 +0000)]
Add appveyor

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoAdd Visual Studio 2015 projects
Ricardo Constantino [Wed, 3 Jan 2018 13:44:46 +0000 (13:44 +0000)]
Add Visual Studio 2015 projects

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoAvoid undefined behavior in oggp_get_next_page
Mark Harris [Sat, 30 Dec 2017 19:17:22 +0000 (11:17 -0800)]
Avoid undefined behavior in oggp_get_next_page

This effectively changes:
  oggp->buf + (p->buf_pos - header_size)
to:
  oggp->buf + p->buf_pos - header_size

When header_size > p->buf_pos the first subtraction results in a large
unsigned value, as p->buf_pos is size_t.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoFixes ope_encoder_drain() bug
Jean-Marc Valin [Sat, 30 Dec 2017 18:57:42 +0000 (13:57 -0500)]
Fixes ope_encoder_drain() bug

assert(enc->streams == NULL) would fail because pad_samples was missing
a fractional number of samples due to the resampler output latency not
being an integer.

19 months agog_old_output_cp is no longer needed
Jean-Marc Valin [Fri, 29 Dec 2017 20:35:54 +0000 (15:35 -0500)]
g_old_output_cp is no longer needed

19 months agoRelax JPEG check to allow EXIF metadata
Mark Harris [Fri, 29 Dec 2017 18:31:59 +0000 (10:31 -0800)]
Relax JPEG check to allow EXIF metadata

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
19 months agoAdd Windows UTF8 support
Jean-Marc Valin [Fri, 29 Dec 2017 18:47:13 +0000 (13:47 -0500)]
Add Windows UTF8 support

19 months agoFixes uninitialized seen_file_icons
Jean-Marc Valin [Fri, 29 Dec 2017 18:28:59 +0000 (13:28 -0500)]
Fixes uninitialized seen_file_icons

19 months agoRemove comment_replace_vendor_string() which is now useless
Jean-Marc Valin [Fri, 29 Dec 2017 16:53:29 +0000 (11:53 -0500)]
Remove comment_replace_vendor_string() which is now useless

19 months agoAvoid symbol collisions (especially with static linking)
Jean-Marc Valin [Fri, 29 Dec 2017 16:52:44 +0000 (11:52 -0500)]
Avoid symbol collisions (especially with static linking)

19 months agocleanup
Jean-Marc Valin [Fri, 29 Dec 2017 16:47:49 +0000 (11:47 -0500)]
cleanup

19 months agoAvoiding symbol collisions for the picture code
Jean-Marc Valin [Fri, 29 Dec 2017 07:59:00 +0000 (02:59 -0500)]
Avoiding symbol collisions for the picture code

19 months agofixes lookahead when application is changed
Jean-Marc Valin [Thu, 28 Dec 2017 23:12:48 +0000 (18:12 -0500)]
fixes lookahead when application is changed

19 months agofix comments
Jean-Marc Valin [Thu, 28 Dec 2017 21:49:19 +0000 (16:49 -0500)]
fix comments

21 months agoBump revision v0.1.1
Jean-Marc Valin [Mon, 13 Nov 2017 01:49:13 +0000 (20:49 -0500)]
Bump revision

2 years agoPrint a useful error when pkg-config is missing
Jean-Marc Valin [Wed, 2 Aug 2017 22:20:54 +0000 (18:20 -0400)]
Print a useful error when pkg-config is missing

(copied from opusfile)
Without this check, the PKG_CHECK_MODULES() macro remains
unexpanded, which gives a syntax error when the shell reaches that
point in the configure script, even for checks which are disabled
(e.g., the OpenSSL check when using --disable-http).

Instead, explicitly check for pkg-config and give the user useful
advice on how to solve the problem if it's not found.

Thanks to eXpl0it3r for reporting a problem for which installing
pkg-config turned out to be the solution.

2 years agosome extra checks to avoid crashing
Dragos Oancea [Mon, 24 Jul 2017 18:01:18 +0000 (19:01 +0100)]
some extra checks to avoid crashing

(modified by Jean-Marc Valin)

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoFix pull_api mode
miv [Fri, 14 Jul 2017 10:25:22 +0000 (12:25 +0200)]
Fix pull_api mode

ope_encoder_create_pull calls ope_encoder_create_callbacks with a
NULL callbacks argument, which causes the function to crash. Test
for NULL to prevent this.

As well, we try and call the close callback when flushing the stream,
which also leads to a crash when the callbacks are not set. Don't call
the callback in pull mode.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoUse snprintf() on newer MS compilers
Jean-Marc Valin [Mon, 10 Jul 2017 18:43:55 +0000 (14:43 -0400)]
Use snprintf() on newer MS compilers

2 years agoUsing _snprintf() on windows
Jean-Marc Valin [Mon, 10 Jul 2017 18:22:46 +0000 (14:22 -0400)]
Using _snprintf() on windows

2 years agoAvoid crashing when setting the muxing delay early
Jean-Marc Valin [Mon, 10 Jul 2017 17:10:28 +0000 (13:10 -0400)]
Avoid crashing when setting the muxing delay early

2 years agolimit decision_delay to MAX_LOOKAHEAD
Jean-Marc Valin [Sat, 24 Jun 2017 01:14:30 +0000 (21:14 -0400)]
limit decision_delay to MAX_LOOKAHEAD

2 years agomissed one
Jean-Marc Valin [Sat, 24 Jun 2017 00:59:38 +0000 (20:59 -0400)]
missed one

2 years agoRemove wav_permute_matrix[][]
Jean-Marc Valin [Sat, 24 Jun 2017 00:50:33 +0000 (20:50 -0400)]
Remove wav_permute_matrix[][]

It got copied from opus-tools, but it's not needed.

2 years agos/opusenc/libopusenc/
Jean-Marc Valin [Sat, 24 Jun 2017 00:50:06 +0000 (20:50 -0400)]
s/opusenc/libopusenc/

2 years agoFixes LPC extension for the resampling case
Jean-Marc Valin [Mon, 19 Jun 2017 17:34:39 +0000 (13:34 -0400)]
Fixes LPC extension for the resampling case

We have to do the extension at the input sampling rate, not at the output
sampling rate.

2 years agoFixes shift_buffer() to actually preserve the first LPC_INPUT samples
Jean-Marc Valin [Mon, 19 Jun 2017 17:06:25 +0000 (13:06 -0400)]
Fixes shift_buffer() to actually preserve the first LPC_INPUT samples

2 years agominor comment tweak v0.1
Jean-Marc Valin [Wed, 24 May 2017 00:12:48 +0000 (20:12 -0400)]
minor comment tweak

2 years agoRename opusenc makefile shortcuts to libopusenc.
Ralph Giles [Tue, 23 May 2017 22:29:25 +0000 (15:29 -0700)]
Rename opusenc makefile shortcuts to libopusenc.

Be consistent with the package name.

2 years agoUpdate makefile for libopusenc.pc name change.
Ralph Giles [Tue, 23 May 2017 22:27:39 +0000 (15:27 -0700)]
Update makefile for libopusenc.pc name change.

Fixes `make distcheck`.

2 years agoUpdate travis badge for the project rename.
Ralph Giles [Tue, 23 May 2017 22:17:58 +0000 (15:17 -0700)]
Update travis badge for the project rename.

Travis was initially configured to use the `opusenc`
repository name on github. Since it's been renamed
to `libopusenc` I've poked the travis config to pick
up the rename. However, that means the urls we use
for the build status have changed.

2 years agos/opusenc/libopusenc/
Jean-Marc Valin [Tue, 23 May 2017 22:06:09 +0000 (18:06 -0400)]
s/opusenc/libopusenc/

2 years agoAdd travis build status badge to the readme.
Ralph Giles [Fri, 19 May 2017 22:27:38 +0000 (15:27 -0700)]
Add travis build status badge to the readme.

This displays the current build status for the master branch
from travis-ci.org as part of the readme. This can be misleading
if one is working from a branch instead, but seems to be the
convention, at least until github gets better support for
the badges.

Signed-of-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agotravis: Require Ubuntu 14.04.
Ralph Giles [Fri, 19 May 2017 22:16:35 +0000 (15:16 -0700)]
travis: Require Ubuntu 14.04.

This is necessary to have an apt-packaged libopus
available as part of the build environment.

Signed-of-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agoAdd travis-ci.org build config.
Ralph Giles [Fri, 19 May 2017 22:10:22 +0000 (15:10 -0700)]
Add travis-ci.org build config.

This lets us get test feedback on github.

Signed-of-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2 years agopackage name is libopusenc
Jean-Marc Valin [Sat, 20 May 2017 02:01:18 +0000 (22:01 -0400)]
package name is libopusenc

2 years agoremoving mentions of libogg
Jean-Marc Valin [Fri, 19 May 2017 21:18:27 +0000 (17:18 -0400)]
removing mentions of libogg

2 years agomisc fixes
Jean-Marc Valin [Fri, 19 May 2017 21:04:10 +0000 (17:04 -0400)]
misc fixes

2 years agoFixes mixed declaration and code
Jean-Marc Valin [Fri, 19 May 2017 20:18:01 +0000 (16:18 -0400)]
Fixes mixed declaration and code

2 years agoRemove http from configure.ac
Jean-Marc Valin [Fri, 19 May 2017 20:08:54 +0000 (16:08 -0400)]
Remove http from configure.ac

2 years agoAdd missing copyright header
Jean-Marc Valin [Fri, 19 May 2017 19:47:52 +0000 (15:47 -0400)]
Add missing copyright header

2 years agoAvoiding sign comparison warnings on the resampler
Jean-Marc Valin [Fri, 19 May 2017 17:28:13 +0000 (13:28 -0400)]
Avoiding sign comparison warnings on the resampler

2 years agoAvoiding using the packet after invalidated by oggp_commit_packet()
Jean-Marc Valin [Fri, 19 May 2017 16:59:05 +0000 (12:59 -0400)]
Avoiding using the packet after invalidated by oggp_commit_packet()

2 years agoUsing oggp_get_packet_buffer() instead of a fixed size on the stack
Jean-Marc Valin [Fri, 19 May 2017 05:55:23 +0000 (01:55 -0400)]
Using oggp_get_packet_buffer() instead of a fixed size on the stack

2 years agoCall packet callback before committing the packet
Jean-Marc Valin [Fri, 19 May 2017 05:27:47 +0000 (01:27 -0400)]
Call packet callback before committing the packet

2 years agoImplement OPE_GET_* ctl() calls
Jean-Marc Valin [Fri, 19 May 2017 04:30:19 +0000 (00:30 -0400)]
Implement OPE_GET_* ctl() calls

2 years agoAdds OPUS_GET* calls
Jean-Marc Valin [Fri, 19 May 2017 04:22:40 +0000 (00:22 -0400)]
Adds OPUS_GET* calls

2 years agomisc fixes
Jean-Marc Valin [Fri, 19 May 2017 04:19:20 +0000 (00:19 -0400)]
misc fixes

2 years agoImplement ope_strerror()
Jean-Marc Valin [Fri, 19 May 2017 03:43:10 +0000 (23:43 -0400)]
Implement ope_strerror()

2 years agoReturn int error codes for pictures
Jean-Marc Valin [Fri, 19 May 2017 03:20:37 +0000 (23:20 -0400)]
Return int error codes for pictures

2 years agoChanging picture API
Jean-Marc Valin [Thu, 18 May 2017 21:47:05 +0000 (17:47 -0400)]
Changing picture API

2 years agoDon't need libogg anymore, but we need libopus 1.1 for the frame size API
Jean-Marc Valin [Thu, 18 May 2017 18:46:34 +0000 (14:46 -0400)]
Don't need libogg anymore, but we need libopus 1.1 for the frame size API

2 years agoreenable SSE and full sinc table
Jean-Marc Valin [Thu, 18 May 2017 18:39:58 +0000 (14:39 -0400)]
reenable SSE and full sinc table

2 years agoSync resampler with libspeexdsp
Jean-Marc Valin [Fri, 12 May 2017 23:13:08 +0000 (19:13 -0400)]
Sync resampler with libspeexdsp

2 years agoAdd support for header gain
Jean-Marc Valin [Tue, 16 May 2017 22:36:27 +0000 (18:36 -0400)]
Add support for header gain

2 years agoRemove const on OggOpusComments
Jean-Marc Valin [Sun, 14 May 2017 18:50:43 +0000 (14:50 -0400)]
Remove const on OggOpusComments

Will make it possible to do reference counting and copy-on-write

2 years agoRemove useless #includes
Jean-Marc Valin [Sun, 14 May 2017 18:13:56 +0000 (14:13 -0400)]
Remove useless #includes

2 years agoDocumenting API parameters
Jean-Marc Valin [Sun, 14 May 2017 18:13:44 +0000 (14:13 -0400)]
Documenting API parameters

2 years agoAdd some Doxygen doc
Jean-Marc Valin [Sun, 14 May 2017 02:09:45 +0000 (22:09 -0400)]
Add some Doxygen doc

2 years agoFIXME no longer applies (was only for libogg code)
Jean-Marc Valin [Fri, 12 May 2017 22:34:39 +0000 (18:34 -0400)]
FIXME no longer applies (was only for libogg code)

2 years agoProperly support > 8 channels
Jean-Marc Valin [Fri, 12 May 2017 22:24:17 +0000 (18:24 -0400)]
Properly support > 8 channels

2 years agocleanup
Jean-Marc Valin [Fri, 12 May 2017 22:20:44 +0000 (18:20 -0400)]
cleanup

2 years agoFix granulepos bug on empty streams
Jean-Marc Valin [Fri, 12 May 2017 22:17:28 +0000 (18:17 -0400)]
Fix granulepos bug on empty streams

2 years agoRemove use of ogg_packet
Jean-Marc Valin [Fri, 12 May 2017 19:15:30 +0000 (15:15 -0400)]
Remove use of ogg_packet