opus.git
9 years agoFor some frame sizes there can be 5 shorts in a frame.
Gregory Maxwell [Tue, 30 Jun 2009 15:29:42 +0000 (11:29 -0400)]
For some frame sizes there can be 5 shorts in a frame.
Correct an out of bounds access in this case.

9 years agoThis fixes a potential assertion failure with some very weak signals
Jean-Marc Valin [Tue, 30 Jun 2009 14:31:00 +0000 (10:31 -0400)]
This fixes a potential assertion failure with some very weak signals

9 years agoietf doc: decoder overview (ASCII art)
Jean-Marc Valin [Tue, 30 Jun 2009 03:55:21 +0000 (23:55 -0400)]
ietf doc: decoder overview (ASCII art)

9 years agoietf doc: encoder overview (ASCII art)
Jean-Marc Valin [Tue, 30 Jun 2009 03:42:20 +0000 (23:42 -0400)]
ietf doc: encoder overview (ASCII art)

9 years agoietf doc: pitch description
Jean-Marc Valin [Mon, 29 Jun 2009 21:35:41 +0000 (17:35 -0400)]
ietf doc: pitch description

9 years agoFixes for celt_header_to_packet / celtdec for bigendian systems.
Gregory Maxwell [Mon, 29 Jun 2009 18:03:17 +0000 (14:03 -0400)]
Fixes for celt_header_to_packet / celtdec for bigendian systems.
Add some paranoid validation to the header functions.

9 years agoNote some more platforms where float-approx is tested, fix a bug in the prediction...
Gregory Maxwell [Mon, 29 Jun 2009 16:48:57 +0000 (12:48 -0400)]
Note some more platforms where float-approx is tested, fix a bug in the prediction ctl,
and remove some dead code from bands.c.

9 years agoAdditional mathops.h tests.
Gregory Maxwell [Sun, 28 Jun 2009 23:51:30 +0000 (19:51 -0400)]
Additional mathops.h tests.

9 years agoietf doc: final fine bits, some fixes to the references
Jean-Marc Valin [Sun, 28 Jun 2009 18:46:41 +0000 (14:46 -0400)]
ietf doc: final fine bits, some fixes to the references

9 years agoNumerous autoconf changes. Configure option for FLOAT_APPROX
Gregory Maxwell [Wed, 24 Jun 2009 20:43:33 +0000 (16:43 -0400)]
Numerous autoconf changes. Configure option for FLOAT_APPROX

9 years agoBump version to 0.6.0 and increase bitstream version.
Jean-Marc Valin [Wed, 24 Jun 2009 01:23:18 +0000 (21:23 -0400)]
Bump version to 0.6.0 and increase bitstream version.

9 years agoGives an error when trying to create a stereo mode with DISABLE_STEREO defined.
Jean-Marc Valin [Sun, 21 Jun 2009 13:47:51 +0000 (09:47 -0400)]
Gives an error when trying to create a stereo mode with DISABLE_STEREO defined.

9 years agoMinor simplification to the transient code
Jean-Marc Valin [Fri, 19 Jun 2009 03:33:04 +0000 (23:33 -0400)]
Minor simplification to the transient code

9 years agoSimplifies the stereo mixing code, throwing away some old code.
Jean-Marc Valin [Fri, 19 Jun 2009 03:18:39 +0000 (23:18 -0400)]
Simplifies the stereo mixing code, throwing away some old code.

9 years agoietf doc: misc corrections
Jean-Marc Valin [Thu, 18 Jun 2009 15:20:42 +0000 (11:20 -0400)]
ietf doc: misc corrections

9 years agoFixing a few bugs introduced in the energy interleaving changes and due to
Jean-Marc Valin [Thu, 18 Jun 2009 02:39:46 +0000 (22:39 -0400)]
Fixing a few bugs introduced in the energy interleaving changes and due to
side effects of "continue" statements.

9 years agoInterleaving the left and right final fine energy bits
Jean-Marc Valin [Thu, 18 Jun 2009 01:24:33 +0000 (21:24 -0400)]
Interleaving the left and right final fine energy bits

9 years agoInterleaving the left and right fine energy
Jean-Marc Valin [Thu, 18 Jun 2009 00:37:45 +0000 (20:37 -0400)]
Interleaving the left and right fine energy

9 years agoietf doc: security, VBR, stereo
Jean-Marc Valin [Wed, 17 Jun 2009 21:47:16 +0000 (17:47 -0400)]
ietf doc: security, VBR, stereo

9 years agointealeaving the left and right coarse energy
Jean-Marc Valin [Wed, 17 Jun 2009 12:02:36 +0000 (08:02 -0400)]
intealeaving the left and right coarse energy

9 years agoForced intra now overrides intra avoidance at low rate. Also, using the number
Jean-Marc Valin [Wed, 17 Jun 2009 02:27:12 +0000 (22:27 -0400)]
Forced intra now overrides intra avoidance at low rate. Also, using the number
of bands as criterion for auto-intra disabling.

9 years agoietf doc: stereo description
Jean-Marc Valin [Tue, 16 Jun 2009 20:45:23 +0000 (16:45 -0400)]
ietf doc: stereo description

9 years agoMinor stuff: preventing float underflow in celt_exp2(), preventing the use of
Jean-Marc Valin [Tue, 16 Jun 2009 02:40:06 +0000 (22:40 -0400)]
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

9 years agoThis fixes a folding issue with stereo
Jean-Marc Valin [Mon, 15 Jun 2009 15:22:01 +0000 (11:22 -0400)]
This fixes a folding issue with stereo

9 years agoMore de-interleaving: denormalised MDCT no longer stored with interleaved
Jean-Marc Valin [Sun, 14 Jun 2009 18:05:19 +0000 (14:05 -0400)]
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.

9 years agoremoving redundant calls to exp2()
Jean-Marc Valin [Sun, 14 Jun 2009 16:31:33 +0000 (12:31 -0400)]
removing redundant calls to exp2()

9 years agoSimplifying the stereo energy quantisation functions now that energy is
Jean-Marc Valin [Sun, 14 Jun 2009 13:29:51 +0000 (09:29 -0400)]
Simplifying the stereo energy quantisation functions now that energy is
de-interleaved

9 years agoNow storing the band energies in de-interleaved format when doing stereo
Jean-Marc Valin [Sun, 14 Jun 2009 13:19:51 +0000 (09:19 -0400)]
Now storing the band energies in de-interleaved format when doing stereo

9 years agoremoving redundant calls to log2()
Jean-Marc Valin [Sun, 14 Jun 2009 02:59:43 +0000 (22:59 -0400)]
removing redundant calls to log2()

9 years agofloat approximations for log2() and exp2()
Jean-Marc Valin [Sun, 14 Jun 2009 02:30:46 +0000 (22:30 -0400)]
float approximations for log2() and exp2()

9 years agoietf doc: characteristics, bit-stream
Jean-Marc Valin [Fri, 12 Jun 2009 21:41:08 +0000 (17:41 -0400)]
ietf doc: characteristics, bit-stream

9 years agoietf doc: PVQ search
Jean-Marc Valin [Fri, 12 Jun 2009 20:52:44 +0000 (16:52 -0400)]
ietf doc: PVQ search

9 years agoietf doc: better description of the bitstream
Jean-Marc Valin [Fri, 12 Jun 2009 15:49:28 +0000 (11:49 -0400)]
ietf doc: better description of the bitstream

9 years agoietf doc: fine energy
Jean-Marc Valin [Thu, 11 Jun 2009 21:40:37 +0000 (17:40 -0400)]
ietf doc: fine energy

9 years agoBetter ebits rounding and making it possible to add remaining ebits even to
Jean-Marc Valin [Thu, 11 Jun 2009 02:46:27 +0000 (22:46 -0400)]
Better ebits rounding and making it possible to add remaining ebits even to
bands that weren't rounded down.

9 years agoietf doc: synthesis
Jean-Marc Valin [Wed, 10 Jun 2009 21:48:39 +0000 (17:48 -0400)]
ietf doc: synthesis

9 years agoPVQ doc
Jean-Marc Valin [Tue, 9 Jun 2009 21:44:02 +0000 (17:44 -0400)]
PVQ doc

9 years agoAdding extra fine bits only when we have rounded down in the allocation
Jean-Marc Valin [Wed, 10 Jun 2009 12:08:55 +0000 (08:08 -0400)]
Adding extra fine bits only when we have rounded down in the allocation

9 years agocwrs documentation
Jean-Marc Valin [Tue, 9 Jun 2009 18:17:05 +0000 (14:17 -0400)]
cwrs documentation

9 years agoFolding, coarse energy, source cleanup
Jean-Marc Valin [Tue, 9 Jun 2009 15:56:59 +0000 (11:56 -0400)]
Folding, coarse energy, source cleanup

9 years agoThe 010101 end of stream pattern is no longer needed now that we use the
Jean-Marc Valin [Tue, 9 Jun 2009 04:57:00 +0000 (00:57 -0400)]
The 010101 end of stream pattern is no longer needed now that we use the
remaining bits for fine energy

9 years agoThis makes it possible to use the bits left after PVQ for fine energy.
Jean-Marc Valin [Tue, 9 Jun 2009 04:10:32 +0000 (00:10 -0400)]
This makes it possible to use the bits left after PVQ for fine energy.

9 years agoIllustrating the bit-stream
Jean-Marc Valin [Mon, 8 Jun 2009 21:45:00 +0000 (17:45 -0400)]
Illustrating the bit-stream

9 years agoDescribing pitch and short blocks
Jean-Marc Valin [Mon, 8 Jun 2009 20:50:34 +0000 (16:50 -0400)]
Describing pitch and short blocks

9 years agoDefining mode flags
Jean-Marc Valin [Mon, 8 Jun 2009 18:27:08 +0000 (14:27 -0400)]
Defining mode flags

9 years agoAdd support for interframe prediction control in celtenc.
Gregory Maxwell [Fri, 5 Jun 2009 19:01:54 +0000 (15:01 -0400)]
Add support for interframe prediction control in celtenc.

9 years agoMerge commit 'origin/master'
Jean-Marc Valin [Mon, 8 Jun 2009 13:33:47 +0000 (09:33 -0400)]
Merge commit 'origin/master'

9 years agoMinor simplification to the fine energy code
Jean-Marc Valin [Mon, 8 Jun 2009 03:54:22 +0000 (23:54 -0400)]
Minor simplification to the fine energy code

9 years agoThis simplifies the energy quantisation by converting to the log2() scale
Jean-Marc Valin [Sun, 7 Jun 2009 17:01:25 +0000 (13:01 -0400)]
This simplifies the energy quantisation by converting to the log2() scale
directly instead of converting to dB and later dividing by 6.

9 years agoIndent options
Jean-Marc Valin [Fri, 5 Jun 2009 22:10:17 +0000 (18:10 -0400)]
Indent options

9 years agoMerge commit 'greg/master'
Jean-Marc Valin [Fri, 5 Jun 2009 21:21:17 +0000 (17:21 -0400)]
Merge commit 'greg/master'

Conflicts:
libcelt/celt.c
libcelt/celt.h

9 years agoIETF doc update, including better source code formatting
Jean-Marc Valin [Fri, 5 Jun 2009 21:17:25 +0000 (17:17 -0400)]
IETF doc update, including better source code formatting

9 years agoFor celt_encoder_ctl CELT_SET_LTP is replaced with CELT_SET_PREDICTION
Gregory Maxwell [Fri, 5 Jun 2009 18:05:51 +0000 (14:05 -0400)]
For celt_encoder_ctl CELT_SET_LTP is replaced with CELT_SET_PREDICTION
which allows the caller to request that frames be independent.

9 years agoFix non-C90 declaration after statement
Jean-Marc Valin [Fri, 5 Jun 2009 15:07:31 +0000 (11:07 -0400)]
Fix non-C90 declaration after statement

9 years agoImproving code conversion to publishable form.
Jean-Marc Valin [Fri, 5 Jun 2009 04:02:56 +0000 (00:02 -0400)]
Improving code conversion to publishable form.

9 years agoHandle malloc failure in mode_create gracefully without leaking memory.
Gregory Maxwell [Thu, 4 Jun 2009 21:17:35 +0000 (17:17 -0400)]
Handle malloc failure in mode_create gracefully without leaking memory.

9 years agoAdd paranoid checking for the validity of the encoder and the decoder
Gregory Maxwell [Thu, 4 Jun 2009 19:15:34 +0000 (15:15 -0400)]
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.

9 years agoFixes for the tests in pseudo-stack mode.
Gregory Maxwell [Thu, 4 Jun 2009 00:02:53 +0000 (20:02 -0400)]
Fixes for the tests in pseudo-stack mode.

9 years agoUpdated scripts for converting the source code to something more publishable
Jean-Marc Valin [Thu, 4 Jun 2009 20:39:38 +0000 (16:39 -0400)]
Updated scripts for converting the source code to something more publishable

9 years agoAdd get_mode CTL for the encoder and decoder.
Gregory Maxwell [Wed, 3 Jun 2009 17:37:45 +0000 (13:37 -0400)]
Add get_mode CTL for the encoder and decoder.

9 years agoRemoved support for band-per-band stereo_mode that was never really used
Jean-Marc Valin [Wed, 3 Jun 2009 00:21:53 +0000 (20:21 -0400)]
Removed support for band-per-band stereo_mode that was never really used

9 years agoUpdating DISABLE_STEREO to the new stereo code (i.e. disabling more stuff)
Jean-Marc Valin [Wed, 3 Jun 2009 00:07:25 +0000 (20:07 -0400)]
Updating DISABLE_STEREO to the new stereo code (i.e. disabling more stuff)

9 years agoDisabling K>128 until it can be shown to be useful.
Jean-Marc Valin [Tue, 2 Jun 2009 12:02:41 +0000 (08:02 -0400)]
Disabling K>128 until it can be shown to be useful.

9 years agoIt is no longer necessary to have a minimum of one bit for fine energy
Jean-Marc Valin [Tue, 2 Jun 2009 11:59:32 +0000 (07:59 -0400)]
It is no longer necessary to have a minimum of one bit for fine energy
allocation

9 years agoAdding a decision mechanism for turning folding on or off depending on the
Jean-Marc Valin [Tue, 2 Jun 2009 11:56:19 +0000 (07:56 -0400)]
Adding a decision mechanism for turning folding on or off depending on the
signal characteristics

9 years agoAdd a mode_info call to obtain the sampling rate of the current mode.
Gregory Maxwell [Sat, 30 May 2009 21:04:02 +0000 (17:04 -0400)]
Add a mode_info call to obtain the sampling rate of the current mode.

9 years agoMaking the modified transient code work with stereo as well
Jean-Marc Valin [Sat, 30 May 2009 14:09:06 +0000 (10:09 -0400)]
Making the modified transient code work with stereo as well

9 years agoFix for a mode memory leak -- was still allocating memory for the energy
Jean-Marc Valin [Sat, 30 May 2009 13:50:47 +0000 (09:50 -0400)]
Fix for a mode memory leak -- was still allocating memory for the energy
allocator which was removed a while ago.

9 years agoNew transient handling code that weights the MDCTs directly unless there's
Jean-Marc Valin [Sat, 30 May 2009 02:14:20 +0000 (22:14 -0400)]
New transient handling code that weights the MDCTs directly unless there's
a really big amplitude change, in which case the original time-domain window
is used.

9 years ago1024 pulses ought to be enough for everybody
Jean-Marc Valin [Wed, 27 May 2009 04:05:27 +0000 (00:05 -0400)]
1024 pulses ought to be enough for everybody

9 years agoMinor optimisation -- using do-while() instead of for() in isqrt32()
Timothy B. Terriberry [Wed, 27 May 2009 03:15:05 +0000 (23:15 -0400)]
Minor optimisation -- using do-while() instead of for() in isqrt32()

9 years agoMake ectest use random random numbers. Add a new test
Gregory Maxwell [Fri, 20 Feb 2009 02:28:33 +0000 (21:28 -0500)]
Make ectest use random random numbers. Add a new test
"tandem-test" which tests the encoder and decoder in
many modes.

9 years agoFixing the encoder's handling of no-folding; with folding enabled
Gregory Maxwell [Wed, 27 May 2009 01:15:12 +0000 (21:15 -0400)]
Fixing the encoder's handling of no-folding; with folding enabled
the encoder could attempt to create folding-free short blocks which
is not permitted by the bitstream.

9 years agoEnabling more than 128 pulses for N=3 and N=4.
Jean-Marc Valin [Wed, 27 May 2009 01:50:38 +0000 (21:50 -0400)]
Enabling more than 128 pulses for N=3 and N=4.

9 years agoSwitch the N=5 case of CWRS to also use a binary search.
Gregory Maxwell [Tue, 26 May 2009 15:56:37 +0000 (11:56 -0400)]
Switch the N=5 case of CWRS to also use a binary search.
This avoids the need for 64-bit addition and is faster on x86_64.
It may be slower on some platforms so the direct solution is still
available in the source.

9 years agoCWRS clean-ups and optimizations.
Timothy B. Terriberry [Tue, 26 May 2009 13:09:27 +0000 (09:09 -0400)]
CWRS clean-ups and optimizations.

Adds specialized O(N*log(K)) versions of cwrsi() and O(N) versions of icwrs()
 for N={3,4,5}, which allows them to operate all the way up to the theoretical
 pulse limit without serious performance degredation.
Also substantially reduces the computation time and stack usage of
 get_required_bits().
On x86-64, this gives a 2% speed-up for 256 sample frames, and almost a 16%
 speed-up for 64 sample frames.

9 years agoThis fixes a bug in the new stereo code triggered only at ridiculously high
Jean-Marc Valin [Sun, 24 May 2009 02:28:04 +0000 (22:28 -0400)]
This fixes a bug in the new stereo code triggered only at ridiculously high
bitrates. It was caused by excessive "balance" bits leading to qb>14.

9 years agoSlightly increasing the range of value by making sure the "start fs" is even
Jean-Marc Valin [Sun, 24 May 2009 01:53:57 +0000 (21:53 -0400)]
Slightly increasing the range of value by making sure the "start fs" is even
(rounding towards zero).

9 years agoDocumentation update: removed lookahead from the doxygen comment long after it
Jean-Marc Valin [Sat, 23 May 2009 19:09:15 +0000 (15:09 -0400)]
Documentation update: removed lookahead from the doxygen comment long after it
was removed from celt_mode_create()

9 years agoMaking use of previously unused range of the laplace encoder to have a slightly
Jean-Marc Valin [Sat, 23 May 2009 18:17:02 +0000 (14:17 -0400)]
Making use of previously unused range of the laplace encoder to have a slightly
wider range of values.

9 years agoSetting ft=32768 instead of 32767 so that implementations can use shifts and
Jean-Marc Valin [Sat, 23 May 2009 14:29:55 +0000 (10:29 -0400)]
Setting ft=32768 instead of 32767 so that implementations can use shifts and
thus save a few divisions.

9 years agoShould be enough to handle signals with a 144 dB (24-bit) dynamic range
Jean-Marc Valin [Sat, 23 May 2009 04:07:08 +0000 (00:07 -0400)]
Should be enough to handle signals with a 144 dB (24-bit) dynamic range

9 years agoAdds support for up to 32767 pulses for the N=3 case (disabled for now)
Jean-Marc Valin [Thu, 21 May 2009 02:50:46 +0000 (22:50 -0400)]
Adds support for up to 32767 pulses for the N=3 case (disabled for now)

9 years agoThe change to FLOAT2INT16 in a8734e0f would break float input for
Gregory Maxwell [Fri, 22 May 2009 03:08:46 +0000 (23:08 -0400)]
The change to FLOAT2INT16 in a8734e0f would break float input for
fixed point compilation because SCALEIN is a no-op in fixed point
mode but the float interface is still normally +/- 1.0.

This patch adds a seperate define for the scaling factor so people
can adjust it for unusual input levels.

9 years agoThis code does a very naive reset of the state. It is possible (even likely)
John Ridges [Fri, 22 May 2009 02:38:39 +0000 (22:38 -0400)]
This code does a very naive reset of the state. It is possible (even likely)
that I'm resetting more than is necessary, but I would have to know a lot
more about how CELT works to determine that.

9 years agoProper use of SCALEIN() as suggested by John Ridges
Jean-Marc Valin [Fri, 22 May 2009 02:29:09 +0000 (22:29 -0400)]
Proper use of SCALEIN() as suggested by John Ridges

9 years agoVBR support. VBR API and VBR support in celtenc.
Gregory Maxwell [Thu, 21 May 2009 08:21:53 +0000 (04:21 -0400)]
VBR support. VBR API and VBR support in celtenc.

10 years agoMake it possible to use more than 255 pulses (not used yet).
Jean-Marc Valin [Tue, 19 May 2009 14:12:34 +0000 (10:12 -0400)]
Make it possible to use more than 255 pulses (not used yet).

10 years agomaking codec draft more compliant with IETF submission rules
Jean-Marc Valin [Tue, 12 May 2009 19:39:37 +0000 (15:39 -0400)]
making codec draft more compliant with IETF submission rules

10 years agoVersion -01 of the RTP draft
Jean-Marc Valin [Mon, 11 May 2009 20:34:58 +0000 (16:34 -0400)]
Version -01 of the RTP draft

10 years agoChange to ipr="trust200902" to make the experimental xml2rfc happy. Also, added
Jean-Marc Valin [Mon, 11 May 2009 20:33:05 +0000 (16:33 -0400)]
Change to ipr="trust200902" to make the experimental xml2rfc happy. Also, added
(old) version -00 of the draft

10 years agoUpdated RTP draft
Jean-Marc Valin [Mon, 11 May 2009 16:53:46 +0000 (12:53 -0400)]
Updated RTP draft

10 years agoFixing stereo: Do not attempt to use more bits than are available.
Gregory Maxwell [Mon, 4 May 2009 19:58:40 +0000 (15:58 -0400)]
Fixing stereo: Do not attempt to use more bits than are available.
This change breaks the bitstream.

Make the first frame out of the encoder an intra-frame. (While not required this may help
in the case that the decoder has old state laying around, and it shouldn't hurt)

10 years agoReduce rounding in the mode allocator and remove a scaling loop.
Gregory Maxwell [Mon, 4 May 2009 18:55:40 +0000 (14:55 -0400)]
Reduce rounding in the mode allocator and remove a scaling loop.
This breaks the bitstream.

10 years agoThe intra decision is now made for the following frame, not the current one.
Jean-Marc Valin [Sat, 2 May 2009 13:57:50 +0000 (09:57 -0400)]
The intra decision is now made for the following frame, not the current one.
Also, setting transient shift to zero when not using short blocks (this causes a
failed assertion otherwise)

10 years agoDynamically selecting intra energy based on energy variations from the previous
Jean-Marc Valin [Sat, 2 May 2009 01:28:58 +0000 (21:28 -0400)]
Dynamically selecting intra energy based on energy variations from the previous
frame

10 years agoAdd support for intra-coding of the coarse energy.
Jean-Marc Valin [Fri, 1 May 2009 23:58:55 +0000 (19:58 -0400)]
Add support for intra-coding of the coarse energy.

10 years agoApparently the 0b notation used for the flags isn't standard C.
Jean-Marc Valin [Thu, 30 Apr 2009 02:16:26 +0000 (22:16 -0400)]
Apparently the 0b notation used for the flags isn't standard C.

10 years agofix testcelt to use loss simulation
Torben Hohn [Thu, 23 Apr 2009 19:51:54 +0000 (21:51 +0200)]
fix testcelt to use loss simulation

10 years agoNew code for encoding the flags
Jean-Marc Valin [Wed, 29 Apr 2009 11:44:13 +0000 (07:44 -0400)]
New code for encoding the flags