Commit graph

463 commits

Author SHA1 Message Date
Jean-Marc Valin
294863bbea Temporal pitch search 2009-11-08 22:36:51 +09:00
Jean-Marc Valin
7a047ea096 prevent busting at ridiculously low bit-rate VBR 2009-10-22 00:23:56 -04:00
Jean-Marc Valin
45f1110583 Making sure the VBR controller never busts the number of bytes allowed 2009-10-22 00:13:44 -04:00
Jean-Marc Valin
25767d1ca7 Better computation of the VBR rate upper bound and reducing the coarse energy
budget at low bitrate.
2009-10-21 23:25:22 -04:00
Jean-Marc Valin
ab4dcc5c90 Allow coarse energy to take almost all the bits. Also, fixed a some issues with
the VBR rate controller.
2009-10-21 07:08:27 -04:00
Jean-Marc Valin
bd5d54adb8 New VBR rate controller that doesn't allow more than one frame worth of excess
bit-rate
2009-10-20 00:25:31 -04:00
Jean-Marc Valin
234969c903 Removed the _t from all the celt*_t types to avoid clashing with POSIX 2009-10-17 22:12:42 -04:00
Jean-Marc Valin
8b2ff0da5a Updated copyright notices 2009-10-17 21:40:10 -04:00
Jean-Marc Valin
30f7f813ea Changed all the celt*int*_t types to remove the _t suffix, which is reserved
by POSIX. The other _t types that are not part of the API are still there
for now. Also, got rid of all that was left of the 64-bit types.
2009-10-17 14:35:13 -04:00
Jean-Marc Valin
d35d677543 Constrain the pitch gain to prevent potential instabilities. 2009-10-16 23:16:47 -04:00
Jean-Marc Valin
ece94a0475 Improved error handling, and implemented celt_strerror() 2009-10-16 07:31:28 -04:00
Jean-Marc Valin
80ed147663 The number of channels is now set when creating the states rather than when
creating the mode. This means that the same mode can be shared for mono and
stereo.
2009-10-15 21:45:32 -04:00
Jean-Marc Valin
bf2398b049 first step for removing the number of channels from the mode 2009-10-15 07:28:19 -04:00
Jean-Marc Valin
a9947c480c merged the code for quant_bands() and unquant_bands() 2009-10-08 23:10:45 -04:00
Jean-Marc Valin
8861955d86 Doing the mdct shaping in the normalised domain, so that energy is preserved 2009-10-04 22:43:27 -04:00
Jean-Marc Valin
e12017ee2c moved the de-emphasis code to a separate function (shared between encoder and
decoder), declared a few things static
2009-10-03 13:57:31 -04:00
Jean-Marc Valin
de67858765 Simplifying the IMDCT 2009-10-03 10:36:27 -04:00
Jean-Marc Valin
aa4f58bde9 Simplifications to the code 2009-10-03 09:27:59 -04:00
Jean-Marc Valin
4213a7254c Demoved the divisions from the inner pitch prediction loops, bumped the version
and bit-stream version
2009-10-01 19:42:18 -04:00
Jean-Marc Valin
d5e5436e07 Fix for folding_decision() in stereo mode and more cleaning up of the code
now that we no longer do normalized pitch
2009-09-30 20:50:41 -04:00
Jean-Marc Valin
4834c92e2b More simplifications from denorm pitch 2009-09-28 19:17:34 -04:00
Jean-Marc Valin
92ae37027f enabling denorm pitch only at low bit-rate 2009-09-16 07:57:17 -04:00
Jean-Marc Valin
ab220aa212 denorm pitch works in fixed-point (though there's still some floats left) 2009-09-15 22:38:40 -04:00
Jean-Marc Valin
4c77ea96d0 doing pitch in denormalized domain 2009-09-14 22:51:55 -04:00
Jean-Marc Valin
515136a3f1 removed unused #ifdefs 2009-09-13 20:15:24 -04:00
Jean-Marc Valin
0f0da999ae Better fading for PLC: no fading for the first loss, muting after 6 2009-08-12 21:35:36 -04:00
Jean-Marc Valin
5a70097d79 C89 and 16-bit fixes 2009-08-08 13:23:03 -04:00
Jean-Marc Valin
e610864c74 This fixes a VBR bug introduced by raw bits. We should not write any raw
bit before the rate is decided (otherwise they'll end up at the wrong place)
and we have to shrink the byte buffer before writing raw bits.
2009-08-01 23:05:47 +02:00
Jean-Marc Valin
91f07dc125 Changing some code to use BITRES directly instead of its value. 2009-07-25 20:42:24 -04:00
Jean-Marc Valin
c08be4485b Implemented "raw bits"
Making it so all the information encoded directly with ec_enc_bits() gets
stored at the end of the stream, without going through the range coder. This
should be both faster and reduce the effects of bit errors.

Conflicts:

	tests/ectest.c
2009-07-23 07:33:24 -04:00
Jean-Marc Valin
cb8780ca96 C89 compatibility fixes for pseudo-stack mode.
Conflicts:

	libcelt/celt.c
2009-07-20 23:40:35 -04:00
Gregory Maxwell
0719f6fc25 This patch makes it safe to call the encode / decode functions with a NULL pointer in place of the pcm buffer. 2009-07-12 01:01:33 -04:00
Jean-Marc Valin
e6d832a721 Allowing frame sizes up to 1024, with pitch enabled only up to 512 2009-07-08 22:21:31 -04:00
Jean-Marc Valin
ece2cfa2d2 removed useless comments 2009-07-04 22:46:38 -04:00
Gregory Maxwell
17ea4b7e2d For some frame sizes there can be 5 shorts in a frame.
Correct an out of bounds access in this case.
2009-06-30 11:42:01 -04:00
Gregory Maxwell
a80958b025 Note some more platforms where float-approx is tested, fix a bug in the prediction ctl,
and remove some dead code from bands.c.
2009-06-29 12:48:57 -04:00
Jean-Marc Valin
2014ca380e Minor simplification to the transient code 2009-06-18 23:33:04 -04:00
Jean-Marc Valin
5b9b51bc44 Forced intra now overrides intra avoidance at low rate. Also, using the number
of bands as criterion for auto-intra disabling.
2009-06-16 22:27:12 -04:00
Jean-Marc Valin
9dff02188c Minor stuff: preventing float underflow in celt_exp2(), preventing the use of
intra energy for low bitrates, and a bit of very high bitrate tuning
2009-06-15 22:40:06 -04:00
Jean-Marc Valin
08a82ffb45 More de-interleaving: denormalised MDCT no longer stored with interleaved
channels. Fixed two stereo bugs in the process: one in the handling of
mdct_weight_shift and one in the PLC.
2009-06-14 14:20:44 -04:00
Jean-Marc Valin
83c26e713c Now storing the band energies in de-interleaved format when doing stereo 2009-06-14 09:19:51 -04:00
Jean-Marc Valin
7a56741b2e removing redundant calls to log2() 2009-06-13 23:02:54 -04:00
Jean-Marc Valin
52cb5fb3f6 Adding extra fine bits only when we have rounded down in the allocation 2009-06-10 08:08:55 -04:00
Jean-Marc Valin
c871c8de38 The 010101 end of stream pattern is no longer needed now that we use the
remaining bits for fine energy
2009-06-09 00:57:00 -04:00
Jean-Marc Valin
39710536fc This makes it possible to use the bits left after PVQ for fine energy. 2009-06-09 00:52:16 -04:00
Jean-Marc Valin
52b4cb2166 Merge commit 'greg/master'
Conflicts:
	libcelt/celt.c
	libcelt/celt.h
2009-06-05 17:21:17 -04:00
Jean-Marc Valin
56522addc2 IETF doc update, including better source code formatting 2009-06-05 17:17:25 -04:00
Gregory Maxwell
2dd3d3258a For celt_encoder_ctl CELT_SET_LTP is replaced with CELT_SET_PREDICTION
which allows the caller to request that frames be independent.
2009-06-05 14:47:21 -04:00
Gregory Maxwell
dc67fa9a4c Handle malloc failure in mode_create gracefully without leaking memory. 2009-06-04 21:51:12 -04:00
Gregory Maxwell
1716999bbe Add paranoid checking for the validity of the encoder and the decoder
state before using it. Handle malloc failures for the encoder and
decoder setup gracefully and without leaks.
2009-06-04 21:42:53 -04:00