Commit graph

27 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
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
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
Jean-Marc Valin
512d849c24 Implements OPUS_GET_LAST_FRAME_DURATION decoder ctl() 2012-12-04 15:17:43 -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
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
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
Rafaël Carré
7909d8af20 Guard _MSC_VER tests, remove FLOAT2INT16 when DISABLE_FLOAT_API. 2012-07-26 14:26:43 -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
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
Gregory Maxwell
d445f02f65 Tweak doxygen input so that the manpage names won't conflict. 2012-05-20 19:33:38 -04:00
Jean-Marc Valin
ab5a049705 Merge commit '390c89225d' 2012-04-24 13:39:22 -04:00
Jean-Marc Valin
cb05e7cd96 s/FOUNDATION/COPYRIGHT OWNER/ in CELT code and "glue code"
Also added 3rd clause to "master" COPYING file
2012-04-20 16:41:42 -04:00
Jean-Marc Valin
72273000ec Misc changes to address Robert Sparks' comments
See http://www.ietf.org/mail-archive/web/codec/current/msg02833.html
Still more changes to come
2012-04-20 10:26:08 -04:00
Ralph Giles
873fc5b04b Fix documenation typos.
Doxygen is smart enough to insert a period if the paragraph
before the @see directive, which starts a new section, doesn't
have one. Unfortunately it's not smart enough to convert a
comma to a period. So while the "description, @see foo" idiom
used for the CTL documentation scans well in the header file,
the Doxygen output end up with "description,.\n".

Minimal change to remove the offending commas.
2012-03-05 17:09:54 -08:00
Ralph Giles
10ebc02ecf Misc documentation fixes (no code change)
We use macros to encapsulate the appropriate type and size
information for the different CTL requests, but the macros
still need to be used with the _ctl() function call and an
encoder or decoder instance structure. As such, just listing
the macro defines is confusing. Adding some examples outside
the OpusEncoder overview page should help with this.

Also document that OPUS_SET_APPLICATION can take
OPUS_APPLICATION_RESTRICTED_LOWDELAY.
2011-11-25 23:25:38 -05:00
Jean-Marc Valin
e6a0be8ee6 Makes OPUS_SET_VOICE_RATIO private
Let's put it back in if/when we have a clearer view of voice/music detection
2011-10-27 13:43:43 -04:00
Jean-Marc Valin
4923f3f80e Moves the main headers from src/ to include/ 2011-10-26 21:36:57 -04:00
Renamed from celt/opus_defines.h (Browse further)