Commit graph

548 commits

Author SHA1 Message Date
Jean-Marc Valin
d77d6a58fc Renamed celt_[u]int* to opus_[u]int* 2011-07-29 17:33:06 -04:00
Gregory Maxwell
fce4323e15 Remove the configurability of the post-filter. It is always enabled in Opus. 2011-07-29 16:19:29 -04:00
Gregory Maxwell
a45724ef7f Remove a _overlap_mem only used for -DRESYNTH builds in celt.c. 2011-07-29 13:13:51 -04:00
Jean-Marc Valin
a0653ed1e7 Fixes a bunch of valgrind errors when decoding random junk 2011-07-05 13:33:45 -04:00
Jean-Marc Valin
27169ca9d0 Addressing all the FIXMEs in the code
Includes better error handling in fft/mdct init
2011-05-16 14:10:04 -04:00
Jean-Marc Valin
f54a0a39e5 Reduces the PLC array sizes to what's necessary 2011-05-13 17:36:31 -04:00
Jean-Marc Valin
5f3d1afc05 PLC cleanup
Pitch search can now go up to 720 samples
2011-05-13 17:24:25 -04:00
Gregory Maxwell
58ecb1ac15 The encoder would crash in the PVQ search if fed NaNs via the float interface. This patch protects against it in two sufficient ways: Making the PVQ search robust against NaNs and by squashing NaNs to zero on input.
Thanks to David Richards for reporting this failure mode.
2011-05-09 15:54:08 -04:00
Jean-Marc Valin
eda2dee88d Taking into account the percentage of packet loss for intra decision 2011-04-21 16:04:27 -04:00
Jean-Marc Valin
6965388866 Implements CELT_SET_LOSS_PERC 2011-04-21 10:41:13 -04:00
Gregory Maxwell
fdd867534a Stop adjusting the VBR drift during silent frames, this prevents overshoot after silent spans. This also results in undershoot on files with lots of silence, but this is desirable in terms of increasing quality consistency. It will be even better if we later include some open-loop correction of the targets. 2011-04-13 17:15:55 -04:00
Jean-Marc Valin
d25dd2bff9 Fixes a declaration-after-statement error when using ALLOC_STACK 2011-03-29 07:54:27 +02:00
Jean-Marc Valin
9dec74d98d Adds support for decoding stereo streams with a mono decoder
We don't allow *encoding* a stereo stream with a mono encoder
because that's just silly.
2011-03-28 01:39:41 -04:00
Jean-Marc Valin
c3086a98f4 Making CELT_GET_MODE "private" 2011-03-21 13:26:03 -04:00
Jean-Marc Valin
ff96b165fe Removes the celt_mode_info() call.
Adds a CELT_GET_LOOKAHEAD() ctl() call instead. Other uses of
celt_mode_info() should not be needed anymore.
2011-03-21 11:32:50 -04:00
Jean-Marc Valin
d6bf19d22d Using the Opus header in 48k/2.5-20 ms modes 2011-03-21 07:06:09 -04:00
Jean-Marc Valin
c5f999097f Fixes tandem-test.c 2011-03-18 15:47:53 -04:00
Jean-Marc Valin
ef20e39374 Non-fatal bit-stream errors are now reported through ctl() 2011-03-18 15:34:11 -04:00
Jean-Marc Valin
1a8bf37dba Taking into account the start and end bands in CNG 2011-03-16 22:03:15 -04:00
Jean-Marc Valin
37e788c185 Fixes return value on lost packet 2011-03-16 20:56:28 -04:00
Jean-Marc Valin
dd2973dd6c Fix missing break statements 2011-03-11 17:46:02 -05:00
Jean-Marc Valin
e6acfe07cb Adds in-band signalling of the CELT frame size and bandwidth 2011-03-11 16:38:49 -05:00
Jean-Marc Valin
f62b3bb96d Fix for global stack 2011-03-09 11:56:29 -05:00
Timothy B. Terriberry
9bac8c17d5 Eliminate the ec_int32 and ec_uint32 typedefs.
These were used because the entropy coder originally came from
 outside libcelt, and thus did not have a common type system.
It's now undergone enough modification that it's not ever likely to
 be used as-is in another codec without some porting effort, so
 there's no real reason to maintain the typedefs separately.
Hopefully we'll replace these all again somedate with a common set
 of Opus typedefs, but for now this will do.

This fixes an issue caused by commit 6c8acbf1, which moved the
 ec_ilog() prototype from entcode.h to ecintrin.h, where the
 ec_uint32 typedef was not yet available.
Thanks to John Ridges for the report.
2011-03-02 21:14:19 -05:00
Timothy B. Terriberry
115fa35a9d Fix CNG when effEBands is less than nbEBands.
We were trying to normalize bands that didn't actually exist (e.g.,
 the last band with 320-sample frames at 32kHz).
Thanks to John Ridges for the report.
2011-03-02 21:14:04 -05:00
Jean-Marc Valin
168888f7a3 A float variable and a bug left in transient_analysis() 2011-03-02 17:26:48 -05:00
Jean-Marc Valin
3beb70e549 Fix effectiveBytes computation for VBR 2011-03-01 18:08:15 -05:00
Jean-Marc Valin
64805fd246 Fix post-filter for the case where overlap!=shortMdctSize 2011-02-12 00:50:53 -05:00
Jean-Marc Valin
a14e86d904 Fixes post-filter for transitions between 2.5ms and other frame sizes 2011-02-11 16:27:27 -05:00
Jean-Marc Valin
3806c1d738 Relicensing under the simplified (2-clause) BSD license
Got authorization from all copyright holders
2011-02-09 22:37:41 -05:00
Gregory Maxwell
1928f8df65 CELT_SET_END_BAND_REQUEST in the decoder was performing the wrong bounds check and not allowing a change to fullband. 2011-02-08 22:35:29 -05:00
Gregory Maxwell
7007f1b823 Encoder fixes for NB/WB/SWB modes. 2011-02-08 16:31:21 -05:00
Timothy B. Terriberry
285bc372ca 16-bit int fixes.
This fixes a number of issues for platforms with a 16-bit int, but
 by no means all of them.
The type change for ec_window (for platforms where sizeof(size_t)==2)
 will break ABI (but not API) compatibility with libsilk and libopus,
 and reduce speed on x86-64, but allows the code to work in real-mode
 DOS without using the huge memory model, which is useful for testing
 16-bit int compliance.
2011-02-06 17:32:58 -05:00
Jean-Marc Valin
b570f1a910 Fix previous commit by still capping what the encoder will produce 2011-02-06 17:32:30 -05:00
Jean-Marc Valin
b3dae4b026 Allowing maxCompressedBytes to be as large as one wants
Though the encoder will still never use more than 1275 bytes
2011-02-04 21:50:54 -05:00
Jean-Marc Valin
0b405d1170 Making encoder-side clipping optional 2011-02-04 01:18:42 -05:00
Gregory Maxwell
4d3e105a6c 1275 byte packets is the absolute maximum packet size we're going to support. This makes the encoder and decoder refuse to operate outside of these boundaries. 2011-02-03 23:57:30 -05:00
Jean-Marc Valin
8430a75b2f Skipping most of the PLC code for DTX
Also cap the encoder bit-rate to 260 kb/s per channel.
2011-02-03 23:54:37 -05:00
Gregory Maxwell
b8a6b31205 This removes some pointless/dead code. 2011-02-03 23:25:13 -05:00
Jean-Marc Valin
23340e2249 Fixes an int overflow in the VBR code
Also properly applies the MDCT filtering for resampling
2011-02-03 23:21:00 -05:00
Gregory Maxwell
95becbeec8 This fixes the frame_size check on the encoder and decoder and removes some unused variable warnings when compiling without custom modes. 2011-02-03 22:38:28 -05:00
Timothy B. Terriberry
a093f4df74 Refactor the entropy coder.
This unifies the byte buffer, encoder, and decoder into a single
 struct.
The common encoder and decoder functions (such as ec_tell()) can
 operate on either one, simplifying code which uses both.
The precision argument to ec_tell() has been removed.
It now comes in two precisions:
  ec_tell() gives 1 bit precision in two operations, and
  ec_tell_frac() gives 1/8th bit precision in... somewhat more.
ec_{enc|dec}_bit_prob() were removed (they are no longer needed).
Some of the byte buffer access functions were made static and
 removed from the cross-module API.
All of the code in rangeenc.c and rangedec.c was merged into
 entenc.c and entdec.c, respectively, as we are no longer
 considering alternative backends.
rangeenc.c and rangede.c have been removed entirely.

This passes make check, after disabling the modes that we removed
 support for in cf5d3a8c.
2011-02-03 21:48:52 -05:00
Jean-Marc Valin
ef986e4421 Increasing the pitch gain resolution 2011-02-03 15:47:10 -05:00
Jean-Marc Valin
d539c6b9c5 Disabling the postfilter when complexity<5 or when CELT_SET_PREDICTION<=1 2011-02-03 13:36:03 -05:00
Jean-Marc Valin
51c786241b More Opus build work 2011-02-03 00:43:37 -05:00
Jean-Marc Valin
3a8f04db17 Enabling the post-filter and exporting the ec functions for Opus 2011-02-02 23:02:25 -05:00
Timothy B. Terriberry
ce6d0904a1 Increase caps/allocation accuracy.
This stores the caps array in 32nd bits/sample instead of 1/2 bits
 scaled by LM and the channel count, which is slightly less
 less accurate for the last two bands, and much more accurate for
 all the other bands.
A constant offset is subtracted to allow it to represent values
 larger than 255 in 8 bits (the range of unoffset values is
 77...304).
In addition, this replaces the last modeline in the allocation table
 with the caps array, allowing the initial interpolation to
 allocate 8 bits/sample or more, which was otherwise impossible.
2011-02-01 21:17:57 -05:00
Jean-Marc Valin
7e983194a3 Fixing the global stack -- and an overflow in collapse_mask 2011-02-01 18:00:29 -05:00
Jean-Marc Valin
7bb26e13ca Adds a generic CELT_SET_BITRATE() ctl() API for CBR and VBR 2011-02-01 17:04:27 -05:00
Jean-Marc Valin
a350bf5262 Stop collapsing the background noise channels when switching to mono 2011-01-31 17:30:15 -05:00