libopusenc.git
9 days agoresample: fix UINT32_MAX fallback bugfix/resampler-uint master v0.2
Tristan Matthews [Fri, 14 Sep 2018 23:15:33 +0000 (19:15 -0400)]
resample: fix UINT32_MAX fallback

Reported by Mark Harris

(cherry picked from commit 7181b9e84fbf6887c74807af5ad0030a5181640a)

11 days agoDon't overrun buffer on oom if assertions disabled
Mark Harris [Thu, 13 Sep 2018 06:52:21 +0000 (23:52 -0700)]
Don't overrun buffer on oom if assertions disabled

11 days agoRemove trailing spaces
Mark Harris [Thu, 13 Sep 2018 06:35:29 +0000 (23:35 -0700)]
Remove trailing spaces

11 days agoAvoid reserved identifiers for macros/functions
Mark Harris [Thu, 13 Sep 2018 06:30:41 +0000 (23:30 -0700)]
Avoid reserved identifiers for macros/functions

11 days agoRemove unused macros, typedef, and header file
Mark Harris [Thu, 13 Sep 2018 05:53:21 +0000 (22:53 -0700)]
Remove unused macros, typedef, and header file

11 days 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

12 days 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.

8 weeks 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

4 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>
4 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

5 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>
6 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>
6 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>
6 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)

6 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

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

7 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>
7 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>
7 months agooops
Jean-Marc Valin [Fri, 9 Feb 2018 01:17:16 +0000 (20:17 -0500)]
oops

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

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

7 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()

7 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

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

7 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

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

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

7 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

7 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()

7 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

7 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

7 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

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

7 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

7 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>
7 months agoFix API doc
Jean-Marc Valin [Sun, 4 Feb 2018 08:56:44 +0000 (03:56 -0500)]
Fix API doc

7 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

7 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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.

8 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

8 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>
8 months agoAdd Windows UTF8 support
Jean-Marc Valin [Fri, 29 Dec 2017 18:47:13 +0000 (13:47 -0500)]
Add Windows UTF8 support

8 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

8 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

8 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)

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

8 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

8 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

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

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

13 months 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.

14 months 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>
14 months 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>
14 months 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

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

14 months 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

15 months 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

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

15 months 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.

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

15 months 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.

15 months 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

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

16 months 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.

16 months 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`.

16 months 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.

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

16 months 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>
16 months 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>
16 months 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>
16 months agopackage name is libopusenc
Jean-Marc Valin [Sat, 20 May 2017 02:01:18 +0000 (22:01 -0400)]
package name is libopusenc

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

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

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

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

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

16 months 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

16 months 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()

16 months 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

16 months 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

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

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

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

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

16 months 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

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

16 months 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

16 months 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

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

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

16 months 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

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

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

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