Commit graph

2791 commits

Author SHA1 Message Date
Gregory Maxwell
bb389c67f9 OPUS_{GET,SET}_LSB_DEPTH for multichannel. 2012-08-06 18:20:03 -04: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
Timothy B. Terriberry
02f19c26f1 Fix fixed-point testilog2.
Use exact integer operations to confirm the value returned is the
 correct one.
2012-08-06 13:08:11 -04:00
Gregory Maxwell
0d57a5dc28 Disable silk_get_TOC in the code, as it's not used or exposed. 2012-08-06 12:29:42 -04:00
Cyril Lashkevich
622046c1f1 Fixed sizeof param in silk_get_TOC. Size for memset was calculated wrong.
Signed-off-by: Gregory Maxwell <greg@xiph.org>
silk_get_TOC is unused, unreachable, and not useful without some
packet pre-processing, but until we remove it it should be correct.
This was also reported by Mozilla.
2012-08-06 12:29:42 -04:00
Gregory Maxwell
bf7c1605f7 Fix opus_encode allowed frame sizes docs, reported by Stefan Hacker. 2012-08-06 09:24:03 -04:00
Chris Moeller
da3b5f779c Added MSVC output directories to gitignore. 2012-07-30 02:34:40 -04:00
Jean-Marc Valin
c4a95d16cf Enables the second dynalloc MDCT only at complexity 8
Also applies the compensation for tonality boost only when
the analysis is enabled.
2012-07-27 14:42:54 -04:00
Jean-Marc Valin
2b627e12e5 Makes VBR rate variations less aggressive at low bit-rates and for CVBR 2012-07-27 14:28:21 -04:00
Gregory Maxwell
446662287e Fix bkp/s -> kb/s in opus_demo. 2012-07-27 00:37:19 -04:00
Rafaël Carré
7909d8af20 Guard _MSC_VER tests, remove FLOAT2INT16 when DISABLE_FLOAT_API. 2012-07-26 14:26:43 -04:00
Jean-Marc Valin
416dc73f28 Smoother intensity stereo decision thresholds
We now have rates for each possible threshold. This also adds some
histeresis but it's not that useful for now because the effective rate
doesn't changes from frame to frame (unless one changes the target rate).
This change also has the side effect of lowering the intensity stereo
point for 64 kb/s to band 15 (instead of 16).
2012-07-25 21:17:59 -04:00
Jean-Marc Valin
32024cb5c2 Adds some histeresis to the stereo saving
This prevents rate reduction due to channel correlation from increasing
by more than 0.25 bit/sample between two frames. This issue was observed
on r.flac where the frame following a transient would lose nearly
1 bit/sample
2012-07-25 01:35:17 -04:00
Jean-Marc Valin
4044ea8a1d VBR tuning: increases transient and dynalloc boost
This only increases the average rate by about 1.5 kb/s, but it
restores the high quality of transients from 1.0. Also it
ensures that dynalloc can never starve other bands when used
aggressively.
2012-07-25 01:32:29 -04:00
Gregory Maxwell
66d429ab53 log2_frac optimization from Simon Hosie back in Aug 2011. 2012-07-24 17:56:49 -04:00
Jean-Marc Valin
bfabfd383d Fixes issues with stereo saving and dynalloc
1) Stereo saving was being too aggressive because it only considered the LF
   and because the savings were multiplied by coded_bins rather than by
   just the number of "side bins" below the intensity threshold
2) In the case of bandlimited signals, dynalloc would allocate way too many
   bits to the last non-zero band. We now explicitly check for the last
   band with a meaningful signal.

These issues were really obvious when encoding the decoded test01.mp3
because of the strong inter-channel correlation and (especially) the 16 kHz
lowpass used by the mp3 encoder.
2012-07-23 15:24:40 -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
Gian-Carlo Pascutto
0ec93137dc Small cleanups to MSVC build setup.
Add more MSVC files to .gitignore.
Make all configurations use default floating point model.
2012-07-20 08:49:01 -04:00
Chris Moeller
b768c9b0fd Fixes MSVC projects and adds git version generator tool 2012-07-20 08:48:50 -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
Gregory Maxwell
31e8a84592 Don't try to create fullband silk frames when forced to low rate.
When libopus is forced to sufficiently low rates it will start
outputting 'PLC' (one byte) frames. The code that did this
did not sanitize the mode well enough and would create corrupted
TOC values in some cases.
2012-07-18 10:06:01 -04:00
Gregory Maxwell
37f56593a2 Convert some double constants to float. 2012-07-17 17:42:00 -04:00
Ralph Giles
9621e7113d Fix a typo.
Thanks to Fatbag for pointing out the issue.
2012-07-17 17:35:12 -04:00
Timothy B. Terriberry
b7985f3262 Remove rillian from the Acknowledgments.
He's an author now.
2012-07-17 12:07:36 -07:00
Timothy B. Terriberry
f5b2d78f4a Clarify difference between user bandwidth settings. 2012-07-17 11:49:45 -07:00
Ralph Giles
b0794ba059 Wrap a long line. 2012-07-16 17:46:54 -04:00
Ralph Giles
aff527e9d6 Fix the agreement issue the other way.
Plural works better with the previous sentence. The agreement problem
was there in my original commit. I was just confused by the half
that Tim promoted.
2012-07-16 17:46:36 -04:00
Ralph Giles
c4406b5ab6 Fix an agreement typo in the previous commit. 2012-07-16 17:30:46 -04:00
Gian-Carlo Pascutto
642084c47c Output/intermediate dir cleanup and fixes in 64-bit mode.
Also make the 64-bit builds use the default output directories.
Fix the type of the default Opus output to be a library.
2012-07-16 16:45:04 -04:00
Gian-Carlo Pascutto
eeb7bd3d9d Make MSVC build work in parallel.
The (non-default) temporary & output dirs configured in the projects could
cause issues when doing compilation on a multiprocessor machine. Cleaned
this up a little to use the defaults, which makes that work again and
doesn't make the output structure any worse. Also removed debug output for
release binaries & a tiny whitespace fix.
2012-07-16 16:45:04 -04:00
Timothy B. Terriberry
396c4e5e1e Rearrange Ogg Opus references.
Sort alphabetically, and move vorbis-trim to "Informative".
Also fix a misuse of "streams" instead of "channels" in the packet
 size limits exposition.
2012-07-16 13:43:10 -07:00
Timothy B. Terriberry
b3744613b7 Updates from mailing list and other small fixes.
* Bump the document date.
* Mandate that the ID header must complete on the first page (to
   remove any ambiguities about this requirement in RFC 3533).
* Remove reundant wording that rillian forgot to remove in 360a4117.
* Split the "Granule Position" section into subsections.
* Move the first paragraph of the "Other Implementation Notes"
   section into the "Granule Position" section, add general seeking
   implementation guidance, and be specific about the interaction
   between pre-roll and pre-skip.
* Retitle the remaining contents of the "Other Implementation Notes"
   section to "Packet Size Limits"
* Specify that all the header fields are REQUIRED (and add a
   description of the Channel Mapping Table as a whole, so we can
   say when it is REQUIRED).
* Specify that implementations MUST NOT reject headers with extra
   data if they have an unknown minor version number.
* Add a reference to RFC 3629 (UTF-8).
* Minor formatting adjustments to vorbis-trim and vorbis-mapping
   cites.
* Eliminate semicolons and terrible "Else, if" constructs.
2012-07-16 13:31:11 -07:00
Ralph Giles
3527f9d4c4 Oops, the tag is ENCODER not ENCODED-BY. 2012-07-16 14:14:45 -04:00
Ralph Giles
360a41172a Various small improvements.
Remove a redundant phrase from the previous commit.
Thanks to Tim for pointing this out.

Clarify what 'skipped' means.

Give a reference for the vorbis granulepos-trimming.

Commas and semicolons in the resampling decision list.

Capital SHOULD on treating unknown channel mapping families
as discrete.

Clarify why goes in the vendor string. Maybe needs an example?
'gstoggmux 1.0.12; libopus 1.2.3'

Remove a redundant word. 'could' already covers 'potential' and
the line is stronger without it.
2012-07-16 13:54:27 -04:00
Ralph Giles
0cf8628528 Define TOC sequence briefly.
Hopefully it's clear from this that the demuxer can parse the
TOC sequence to verify the equal-duration constraint.
2012-07-16 12:34:46 -04:00
Ralph Giles
19658bd2f7 Clarify how multistream Opus packets are packed into Ogg packets. 2012-07-16 12:34:04 -04:00
Ralph Giles
1a7c4ceb85 Bump the version number on the Ogg Opus draft. 2012-07-16 11:42:47 -04:00
Ralph Giles
1935025ef5 Add myself as an author. 2012-07-16 11:41:27 -04:00
Ralph Giles
e515687ed7 Ogg Opus wording - avoid repeated 'this' in the abstract. 2012-07-16 11:32:15 -04:00
Gregory Maxwell
d060dd7cbd Opus_multistream API hardening. 2012-07-14 15:50:30 -04:00
Gregory Maxwell
ce87883686 Fix headers by mingw broken by recent win32 changes. 2012-07-14 11:00:24 -04:00
Gregory Maxwell
4155a40347 OPUS_{GET,SET}_LSB_DEPTH for multichannel. 2012-07-13 21:12:27 -04:00
Jean-Marc Valin
3262664db4 Fixes make dist 2012-07-13 14:52:52 -04:00
Jean-Marc Valin
cf1053dc85 Implements OPUS_{GET,SET}_LSB_DEPTH
This is used to avoid dynalloc doing silly things on periodic LSB
patterns and to reduce the bitrate on near-silence.
2012-07-13 14:52:52 -04:00
Jean-Marc Valin
c5880fe48b Builds the analysis files more cleanly than #including C files 2012-07-13 14:50:37 -04:00
Jean-Marc Valin
5d34794d8f Gets rid of // comments 2012-07-13 14:50:37 -04:00
Jean-Marc Valin
b9fe12c42e fixed-point (re-)conversion of the VBR code 2012-07-13 14:50:37 -04:00
Jean-Marc Valin
0918365b51 Fixes a VBR bug with 2.5 ms frames
tf_estimate was being initialized to zero and then never set because
transient_analysis() wasn't being called. This could also have affected
other frame sizes at lower complexity.
2012-07-13 14:50:37 -04:00