Commit graph

68 commits

Author SHA1 Message Date
Jacek Caban
1f26ee2bbd Use __declspec(dllexport) on mingw build.
Signed-off-by: Gregory Maxwell <greg@xiph.org>
2013-06-17 10:12:28 -07:00
Jean-Marc Valin
359306985b Change few remaining instances of short to opus_int16 2013-05-18 02:50:40 -04:00
Jean-Marc Valin
a4dccd3f65 Implements basic surround masking
The idea is that the rate of each stream is adjusted based on its
contribution to the total energy of a stereo downmix.
2013-05-05 02:44:54 -04:00
Jean-Marc Valin
1b72386a7c Initial surround code with new API
Conflicts:
	src/opus_multistream_encoder.c
2013-05-05 02:31:09 -04:00
Jean-Marc Valin
74d43f0a36 Minor soft clipping doc fix 2013-03-18 17:06:43 -04:00
Jean-Marc Valin
f96fc8cc83 Merge branch 'exp_analysis'
Conflicts:
	celt/celt_encoder.c
2013-03-08 12:29:53 -05:00
Jean-Marc Valin
d9aa6e046b Oops, fixed API name from previous commit 2013-03-01 16:07:02 -05:00
Jean-Marc Valin
32c4a0c96e Applies soft-clipping to the int decoder API.
opus_decode() and opus_multistream_decode() now apply soft clipping
before converting to 16-bit int. This should produce better a higher
quality result than hard clipping like we were doing before. The _float()
API isn't affected, but the clipping function is exported so users can
manually apply the soft clipping.
2013-03-01 15:23:01 -05:00
Jean-Marc Valin
51f4a32ec2 Adds support for delayed decision
Variable duration option renamed to OPUS_SET_EXPERT_FRAME_DURATION,
with new API.
Also moves up the analysis to avoid having to do int->float conversion
on large buffers.
2013-02-20 04:08:34 -05:00
Jean-Marc Valin
49583ed672 First attempt at varying the frame size depending on the audio (float only)
The search is based on minimizing the bitrate increase due to transients
by considering we can reduce the "transient boost" by reducing the frame
size, at the cost of increasing the normal overhead.
2013-02-10 00:18:08 -05:00
Ralph Giles
256c9595d8 Document that opus_packet_get_nb_frames, etc. can return OPUS_BAD_ARG.
NB they only check for len < 1, not for null data.
2012-12-11 10:17:11 -08:00
Jean-Marc Valin
d0fd9d4baa Implements opus_packet_get_nb_samples() 2012-12-04 15:45:31 -05:00
Jean-Marc Valin
512d849c24 Implements OPUS_GET_LAST_FRAME_DURATION decoder ctl() 2012-12-04 15:17:43 -05:00
Jean-Marc Valin
7fcd66c40d Changes the PLC behaviour and fixes the FEC behaviour on concatenated packets
PLC and FEC now return exactly the number of samples specified for the
buffer rather than (usually) returning the size of the last packet.
Doc and tests are updated accordingly.
2012-12-04 15:07:45 -05:00
Ralph Giles
265b6b11a3 Allow the build files to override OPUS_EXPORT.
OPUS_EXPORT was conditionalized on OPUS_BUILD, so that symbols
are export based on public header declarations when building
opus as a library, but not when those headers are included in
other programmes. This doesn't address the case when the opus
source and its caller are both included in the same monolithic
build.

In that case we want to define OPUS_BUILD, to indicate that we
are compiling the codec source, but not export the symbols. To
support this, only define OPUS_EXPORT if it is not already defined.
This allows build scripts to -DOPUS_EXPORT and override the
platform-specific attribute decortation in opus_defines.h.

Based on a patch by Sergey Ulanov.
http://git.chromium.org/gitweb/?p=chromium/deps/opus.git;a=commitdiff;h=6304b9628cb7244e3cc78f740aeb6659562f1857
2012-11-29 11:26:38 -08:00
Jean-Marc Valin
1ecb7eaeaf Fixes issues with multiple files defining CELT_C 2012-11-08 11:25:20 -05:00
Jean-Marc Valin
6906210cb0 Splits out the CELT encoder and decoder 2012-11-08 09:42:27 -05:00
Gregory Maxwell
06d443266d Move LSB CTLs to the encoder specific section, thanks to Ilari on IRC for noticing. 2012-10-31 18:42:27 -04:00
Gregory Maxwell
696d68c0c3 Fix typo in documentation for opus_decoder_create(). 2012-10-06 10:51:04 -04:00
Gregory Maxwell
9fec9bb391 Belabor OPUS_SET_BITRATE instead of max_packet, as this is a common trap. 2012-09-27 18:36:51 -04:00
Philip Jägenstedt
6d9c16d142 Fix common misspellings
I stumbled upon the typo in README.draft, so took the opportunity to
grep for common misspellings using List_of_common_misspellings.txt for
hunspell.
2012-09-27 09:16:30 -04:00
Gregory Maxwell
d8b0a24201 Docbug: Replace opus_encode_frame with opus_encode_float in doxygen. 2012-09-24 21:11:00 -04:00
Gregory Maxwell
cc71cded76 Replace 'maximum frame size' with 'maximum packet duration' in the docs.
This could be confusing/misleading.
2012-09-19 09:43:52 -04:00
Jean-Marc Valin
1d13ff6a97 Fixes multistream doc 2012-09-10 21:53:39 -04:00
Timothy B. Terriberry
77ebbdf986 Expand documentation for the multistream API.
This patch also includes some small edits/additions to the main API
 documentation.
2012-09-10 16:25:45 -04:00
Jean-Marc Valin
1491fa81f4 Fixes to the new repacketizer doc 2012-09-10 16:24:33 -04:00
Timothy B. Terriberry
ddd551e06d Add documentation for the repacketizer API.
This patch also includes some small edits for the main API
 documentation.
2012-09-10 08:22:46 -04:00
Timothy B. Terriberry
a40689e6ef Remove large multistream stack buffers.
This avoids allocating any buffers on the stack that depend on the
 total channel count.
Such buffers could easily exceed the size of the
 NONTHREADSAFE_PSEUDOSTACK.
It also checks the frame_size argument in both the encoder and
 decoder to avoid allocating large stack buffers for opus_encode()
 calls that would fail anyway or opus_decode() calls that would
 never use all that space anyway.
2012-09-08 02:17:53 -04:00
Gregory Maxwell
31cf4e1d52 More doc fixes.
In particular we no longer document the default complexity because
we're not guaranteeing to keep the default value constant.  In the
future the default may be lowered in order to keep the default
speed constant.
2012-08-12 14:50:58 -04:00
Timothy B. Terriberry
07b8e612fa Documentation updates for the CTLs.
In addition to general reformatting and cleanup, this fixes a
 couple of important mistakes:
- The arguments to OPUS_SET_FORCE_CHANNELS are now 1 and 2, not 0
   and 1 (as they were when this was called OPUS_SET_FORCE_MONO).
- The default encoder mode is now constrained VBR, not unconstrained
   VBR.
It also documents defaults for all the other parameters.
2012-08-09 11:35:36 -07:00
Jean-Marc Valin
1cd5d95b3f Implements OPUS_{GET,SET}_LSB_DEPTH
This implements an API used in future encoders to avoid dynalloc doing silly things
on periodic LSB patterns and to reduce the bitrate on near-silence.
2012-08-06 18:19:30 -04:00
Gregory Maxwell
bf7c1605f7 Fix opus_encode allowed frame sizes docs, reported by Stefan Hacker. 2012-08-06 09:24:03 -04:00
Rafaël Carré
7909d8af20 Guard _MSC_VER tests, remove FLOAT2INT16 when DISABLE_FLOAT_API. 2012-07-26 14:26:43 -04:00
Gregory Maxwell
b0c120b214 Add some more api docs. 2012-07-21 17:24:11 -04:00
Gregory Maxwell
de4a2ddd06 Replace the remaining instances of restrict with OPUS_RESTRICT.
The usage of restrict in include/opus_custom.h was missed
by the prior commit replacing this keyword with a macro.

Also fixes some prototype/function agreement with respect to
restrict.
2012-07-20 18:02:55 -04:00
Gregory Maxwell
22f7788ac1 Replace a remaining instance of restrict with OPUS_RESTRICT.
The usage of restrict in include/opus_custom.h was missed
by the prior commit replacing this keyword with a macro.
2012-07-20 12:08:29 -04:00
Gregory Maxwell
de0b5324b6 Replace C99 restrict keyword with OPUS_RESTRICT.
We had previously advised people to -Drestrict on
non-C99 compilers, but this creates problems for
some of the MSVC headers. Instead this just
uses a macro and defines it sanely.
2012-07-18 12:12:35 -04:00
Timothy B. Terriberry
f5b2d78f4a Clarify difference between user bandwidth settings. 2012-07-17 11:49:45 -07:00
Gregory Maxwell
03105f5b70 Make OPUS_SET_GAIN survive decode reset.
This is the less-surprising behavior and will hopefully
result in fewer corner case bugs (e.g. losing gain
after seeking). This commit also updates the documentation.
2012-07-11 02:33:55 -04:00
Gregory Maxwell
28b41ae5ae Add OPUS_{GET|SET}_GAIN CTLs for adjusting output gain.
This CTL was requested by Nicolas George for FFmpeg.
2012-07-11 00:04:24 -04:00
Gregory Maxwell
595b334f26 Pretty up the HTML doxygen output. 2012-06-11 01:42:32 -04:00
Gregory Maxwell
daa14598eb Add brief descriptions to the encode/decode groups to avoid weird autobreif strings. 2012-06-10 21:30:01 -04:00
Gregory Maxwell
1f65ce89b0 Correct documentation in opus_custom.h. 2012-06-10 21:15:02 -04:00
Gregory Maxwell
c64f4a4265 Update headers to cause warnings on unused returns and null args.
In places where an ignored return or a null-arg is a sure indication
of a bug add the GCC warning attributes. The null arg annotation
is not enable for Opus itself because it will cause the compiler
to optimize out some null checks. I don't trust our callers
quite that much.
2012-06-01 15:58:17 -04:00
Jean-Marc Valin
bc1683d983 Seems like using dllimport on Windows wasn't useful
This was a problem for static builds
2012-05-31 11:50:33 -04:00
Gregory Maxwell
9ce27c564e Fix for building mingw32 apps. 2012-05-30 14:42:29 -04:00
Ralph Giles
64c2dd7d8e Add extern "C" protection to opus_multistream.h.
Unlike the other headers, opus_multistream.h didn't declare
itself to be C code, causing confusing errors when the caller
tries to use the functions from C++.
2012-05-23 16:33:14 -07:00
Gregory Maxwell
d445f02f65 Tweak doxygen input so that the manpage names won't conflict. 2012-05-20 19:33:38 -04:00
Gregory Maxwell
fdd0c52b40 Minor doc improvement wrt OPUS_APPLICATION_RESTRICTED_LOWDELAY. 2012-05-17 19:45:28 -04:00
Jean-Marc Valin
7143b2d0ff Merge branch 'tmp_draft'
Conflicts:
	README
2012-05-16 00:36:19 -04:00