opus.git
11 years agoUsing only a sign for the intra prediction instead of using up to 5 bits for
Jean-Marc Valin [Mon, 5 May 2008 02:02:14 +0000 (12:02 +1000)]
Using only a sign for the intra prediction instead of using up to 5 bits for
an offset.

11 years agoFixed a bug in the PLC and added code to estimate the pitch from the synthesis
Jean-Marc Valin [Fri, 2 May 2008 00:34:07 +0000 (10:34 +1000)]
Fixed a bug in the PLC and added code to estimate the pitch from the synthesis
instead of relying on the one previously transmitted by the encoder.

11 years agoError detection in uint decoding (can no longer return an int that's out
Jean-Marc Valin [Mon, 28 Apr 2008 07:30:26 +0000 (17:30 +1000)]
Error detection in uint decoding (can no longer return an int that's out
of range.

11 years agoBetter value for prediction coef beta
Jean-Marc Valin [Mon, 28 Apr 2008 05:57:03 +0000 (15:57 +1000)]
Better value for prediction coef beta

11 years agoAdded code for simulating bit errors
Jean-Marc Valin [Mon, 28 Apr 2008 05:56:38 +0000 (15:56 +1000)]
Added code for simulating bit errors

11 years agomdct_overlap no longer needed
Jean-Marc Valin [Wed, 23 Apr 2008 08:03:46 +0000 (18:03 +1000)]
mdct_overlap no longer needed

11 years agoAdded STDIN_TUNING to make it easier to tune CELT
Jean-Marc Valin [Fri, 25 Apr 2008 22:16:12 +0000 (08:16 +1000)]
Added STDIN_TUNING to make it easier to tune CELT

11 years agobump version number
Jean-Marc Valin [Fri, 25 Apr 2008 12:54:11 +0000 (22:54 +1000)]
bump version number

11 years agoBrought the mdct test-case with the recent changes to the mdct semantic
Jean-Marc Valin [Fri, 25 Apr 2008 12:39:46 +0000 (22:39 +1000)]
Brought the mdct test-case with the recent changes to the mdct semantic

11 years agoSHORTCUTS now disables the encoder's de-emphasis (i.e. can't check encoder
Jean-Marc Valin [Wed, 23 Apr 2008 22:29:25 +0000 (08:29 +1000)]
SHORTCUTS now disables the encoder's de-emphasis (i.e. can't check encoder
against the decoder)

11 years agoOptimisation: caching the divisions used in the Laplace encoder.
Jean-Marc Valin [Wed, 23 Apr 2008 03:42:10 +0000 (13:42 +1000)]
Optimisation: caching the divisions used in the Laplace encoder.

11 years agoremoved two shifts from the pitch estimation inner loop
Jean-Marc Valin [Wed, 23 Apr 2008 01:57:40 +0000 (11:57 +1000)]
removed two shifts from the pitch estimation inner loop

11 years agoBetter indexing for find_spectral_pitch()
Jean-Marc Valin [Tue, 22 Apr 2008 22:49:32 +0000 (08:49 +1000)]
Better indexing for find_spectral_pitch()

11 years agoReverted to the old MDCT behaviour of only doing down-scaling in the FFT.
Jean-Marc Valin [Tue, 22 Apr 2008 07:08:59 +0000 (17:08 +1000)]
Reverted to the old MDCT behaviour of only doing down-scaling in the FFT.

11 years agomdct_backward now does the WOLA, so there isn't much left in compute_inv_mdcts
Jean-Marc Valin [Tue, 22 Apr 2008 03:37:16 +0000 (13:37 +1000)]
mdct_backward now does the WOLA, so there isn't much left in compute_inv_mdcts

11 years agoMoved the windowing from compute_inv_mdcts() to mdct_backward()
Jean-Marc Valin [Tue, 22 Apr 2008 02:18:36 +0000 (12:18 +1000)]
Moved the windowing from compute_inv_mdcts() to mdct_backward()

11 years agoSeparated the pre-rotate from the window+shuffling and further simplified
Jean-Marc Valin [Tue, 22 Apr 2008 00:13:25 +0000 (10:13 +1000)]
Separated the pre-rotate from the window+shuffling and further simplified
everything.

11 years agoFurther simplifications to the forward mdct
Jean-Marc Valin [Mon, 21 Apr 2008 23:49:22 +0000 (09:49 +1000)]
Further simplifications to the forward mdct

11 years agonon-negative mdct input index
Jean-Marc Valin [Mon, 21 Apr 2008 21:50:50 +0000 (07:50 +1000)]
non-negative mdct input index

11 years agoMoved the windowing operation from compute_mdcts() to mdct_forward() in an
Jean-Marc Valin [Mon, 21 Apr 2008 14:10:52 +0000 (00:10 +1000)]
Moved the windowing operation from compute_mdcts() to mdct_forward() in an
attempt to reduce copying.

11 years agoPassing the mode to the intra prediction functions so the single-channel case
Jean-Marc Valin [Mon, 21 Apr 2008 11:59:37 +0000 (21:59 +1000)]
Passing the mode to the intra prediction functions so the single-channel case
can be optimised

11 years agoDisabling pitch when gain is very small.
Jean-Marc Valin [Mon, 21 Apr 2008 05:08:57 +0000 (15:08 +1000)]
Disabling pitch when gain is very small.

11 years agoMaking stack push a tiny bit clearer to the compiler -- don't think it really
Jean-Marc Valin [Mon, 21 Apr 2008 03:54:41 +0000 (13:54 +1000)]
Making stack push a tiny bit clearer to the compiler -- don't think it really
has an effect though.

11 years agos/B/C/ in the intra stuff to have the same notation as everywhere else
Jean-Marc Valin [Mon, 21 Apr 2008 03:41:09 +0000 (13:41 +1000)]
s/B/C/ in the intra stuff to have the same notation as everywhere else

11 years agoBit better indexing in intra_prediction()
Jean-Marc Valin [Mon, 21 Apr 2008 02:15:16 +0000 (12:15 +1000)]
Bit better indexing in intra_prediction()

11 years agoRemoving some unnecessary initialisations to zero.
Jean-Marc Valin [Mon, 21 Apr 2008 02:14:16 +0000 (12:14 +1000)]
Removing some unnecessary initialisations to zero.

11 years agoAnother bunch of do-while() loops
Jean-Marc Valin [Mon, 21 Apr 2008 01:43:51 +0000 (11:43 +1000)]
Another bunch of do-while() loops

11 years agoFurther simplifications to comb2pulses() to remove all conditional branches.
Jean-Marc Valin [Sun, 20 Apr 2008 21:53:40 +0000 (07:53 +1000)]
Further simplifications to comb2pulses() to remove all conditional branches.

11 years agoSaved some memory by reducing the size of some arrays to only what's needed.
Jean-Marc Valin [Sun, 20 Apr 2008 14:04:23 +0000 (00:04 +1000)]
Saved some memory by reducing the size of some arrays to only what's needed.
Typically saves 768 bytes.

11 years agoBetter indexing of pre/de-emphasis in celt_{en|de}code().
Jean-Marc Valin [Sun, 20 Apr 2008 12:16:02 +0000 (22:16 +1000)]
Better indexing of pre/de-emphasis in celt_{en|de}code().

11 years agoSaved two copies when computing MDCTs of mono signals
Jean-Marc Valin [Sun, 20 Apr 2008 10:39:53 +0000 (20:39 +1000)]
Saved two copies when computing MDCTs of mono signals

11 years agomore use of CELT_COPY in celt_encode(). Also fixed a stack size bug for stereo
Jean-Marc Valin [Sun, 20 Apr 2008 07:42:10 +0000 (17:42 +1000)]
more use of CELT_COPY in celt_encode(). Also fixed a stack size bug for stereo

11 years agoThis both reverts 3fe0db172c334b4fc3fc773cb08d96867402b532 that caused
Jean-Marc Valin [Sun, 20 Apr 2008 07:16:18 +0000 (17:16 +1000)]
This both reverts 3fe0db172c334b4fc3fc773cb08d96867402b532 that caused
accuracy-related issues at high bit-rate, and fixed an overflow caused by large
Rxy values.

11 years agomore restricted pointers in celt.c
Jean-Marc Valin [Sat, 19 Apr 2008 12:24:53 +0000 (22:24 +1000)]
more restricted pointers in celt.c

11 years agoadded a shortcut (SHORTCUT) to skip the spreading function in the pitch search
Jean-Marc Valin [Sat, 19 Apr 2008 11:39:26 +0000 (21:39 +1000)]
added a shortcut (SHORTCUT) to skip the spreading function in the pitch search

11 years agoencoder pre-emphasis now in 16-bits
Jean-Marc Valin [Sat, 19 Apr 2008 09:44:58 +0000 (19:44 +1000)]
encoder pre-emphasis now in 16-bits

11 years agobetter indexing in exp_rotation()
Jean-Marc Valin [Sat, 19 Apr 2008 02:58:29 +0000 (12:58 +1000)]
better indexing in exp_rotation()

11 years agobetter mdct_backward() indexing
Jean-Marc Valin [Sat, 19 Apr 2008 02:53:43 +0000 (12:53 +1000)]
better mdct_backward() indexing

11 years agooptimisation: giving more hints to the compiler about the sizes in
Jean-Marc Valin [Fri, 18 Apr 2008 13:13:14 +0000 (23:13 +1000)]
optimisation: giving more hints to the compiler about the sizes in
find_spectral_pitch()

11 years agoa few minor optimisations
Jean-Marc Valin [Fri, 18 Apr 2008 12:19:58 +0000 (22:19 +1000)]
a few minor optimisations

11 years agoremoved unneeded variable shifts from alg_quant()
Jean-Marc Valin [Fri, 18 Apr 2008 11:00:06 +0000 (21:00 +1000)]
removed unneeded variable shifts from alg_quant()

11 years agoseparated the two passes from interp_bits2pulses()
Jean-Marc Valin [Fri, 18 Apr 2008 09:35:34 +0000 (19:35 +1000)]
separated the two passes from interp_bits2pulses()

11 years agooptimisation: removed the shifts from the vq_index() inner loop
Jean-Marc Valin [Fri, 18 Apr 2008 09:34:58 +0000 (19:34 +1000)]
optimisation: removed the shifts from the vq_index() inner loop

11 years agooptimisation: better indexing/looping in vq_index()
Jean-Marc Valin [Fri, 18 Apr 2008 07:54:52 +0000 (17:54 +1000)]
optimisation: better indexing/looping in vq_index()

11 years agopseudo-stack no longer checks on every function entry whether it has been
Jean-Marc Valin [Fri, 18 Apr 2008 07:29:56 +0000 (17:29 +1000)]
pseudo-stack no longer checks on every function entry whether it has been
allocated

11 years agooptimisation: one less conditional branch in pulse2comb()
Jean-Marc Valin [Fri, 18 Apr 2008 06:58:19 +0000 (16:58 +1000)]
optimisation: one less conditional branch in pulse2comb()

11 years agooptimisation: Removed a bunch of conditional branches from comb2pulse()
Jean-Marc Valin [Fri, 18 Apr 2008 06:46:39 +0000 (16:46 +1000)]
optimisation: Removed a bunch of conditional branches from comb2pulse()

11 years agoSaturation in SIG2INT16 using MIN/MAX
Jean-Marc Valin [Fri, 18 Apr 2008 05:57:18 +0000 (15:57 +1000)]
Saturation in SIG2INT16 using MIN/MAX

11 years agoRemoved implicit 32=>16 conversion (changed to EXTRACT16)
Jean-Marc Valin [Fri, 18 Apr 2008 00:59:03 +0000 (10:59 +1000)]
Removed implicit 32=>16 conversion (changed to EXTRACT16)

11 years agooptimisation: Got rid of the 32-bit mul in find_spectral_pitch()
Jean-Marc Valin [Fri, 18 Apr 2008 00:33:06 +0000 (10:33 +1000)]
optimisation: Got rid of the 32-bit mul in find_spectral_pitch()

11 years agominor simplification in alg_quant()
Jean-Marc Valin [Wed, 16 Apr 2008 21:50:12 +0000 (07:50 +1000)]
minor simplification in alg_quant()

11 years agofixed an issue (lacking parentheses) in the no-op version of BITREV
Jean-Marc Valin [Wed, 16 Apr 2008 21:41:39 +0000 (07:41 +1000)]
fixed an issue (lacking parentheses) in the no-op version of BITREV

11 years agoMade twiddle pointer in mdct more explicit
Jean-Marc Valin [Wed, 16 Apr 2008 21:29:53 +0000 (07:29 +1000)]
Made twiddle pointer in mdct more explicit

11 years agooptimisation: Making it clear to the compiler that many of the loops in cwrs
Jean-Marc Valin [Wed, 16 Apr 2008 04:15:07 +0000 (14:15 +1000)]
optimisation: Making it clear to the compiler that many of the loops in cwrs
need to iterate at least once.

11 years agoMore use of CELT_MEMSET
Jean-Marc Valin [Wed, 16 Apr 2008 01:58:48 +0000 (11:58 +1000)]
More use of CELT_MEMSET

11 years agoMake use of CELT_MEMSET() in find_spectral_pitch()
Jean-Marc Valin [Wed, 16 Apr 2008 01:47:24 +0000 (11:47 +1000)]
Make use of CELT_MEMSET() in find_spectral_pitch()

11 years agoFixed incorrect energy calculation in stereo intra prediction
Jean-Marc Valin [Wed, 16 Apr 2008 00:45:52 +0000 (10:45 +1000)]
Fixed incorrect energy calculation in stereo intra prediction

11 years agooptimisation: reworked intra_prediction() so that yy is computed fully only
Jean-Marc Valin [Wed, 16 Apr 2008 00:43:32 +0000 (10:43 +1000)]
optimisation: reworked intra_prediction() so that yy is computed fully only
once and then updated for each iteration

11 years agooptimisation: intra_prediction() uses a 16-bit numerator for the search
Jean-Marc Valin [Wed, 16 Apr 2008 00:29:01 +0000 (10:29 +1000)]
optimisation: intra_prediction() uses a 16-bit numerator for the search

11 years agoadded fixed_c6x.h
Jean-Marc Valin [Tue, 15 Apr 2008 11:31:42 +0000 (21:31 +1000)]
added fixed_c6x.h

11 years agooptimisation: managed to avoid dividing in the "full gain" case of alg_quant()
Jean-Marc Valin [Tue, 15 Apr 2008 11:14:18 +0000 (21:14 +1000)]
optimisation: managed to avoid dividing in the "full gain" case of alg_quant()

11 years agooops, forgot to make the gain a 16-bit var
Jean-Marc Valin [Tue, 15 Apr 2008 08:06:59 +0000 (18:06 +1000)]
oops, forgot to make the gain a 16-bit var

11 years agooptimisation: simplified the "full gain" case of alg_quant() to remove some
Jean-Marc Valin [Tue, 15 Apr 2008 08:04:33 +0000 (18:04 +1000)]
optimisation: simplified the "full gain" case of alg_quant() to remove some
32-bit muls.

11 years agooptimisation: another bunch of simplifications to the "simple case" of the
Jean-Marc Valin [Tue, 15 Apr 2008 07:31:23 +0000 (17:31 +1000)]
optimisation: another bunch of simplifications to the "simple case" of the
alg_quant() search.

11 years agoa few loop optimisations.
Jean-Marc Valin [Mon, 14 Apr 2008 22:01:33 +0000 (08:01 +1000)]
a few loop optimisations.

11 years agooptimisation: merged the init loop of vq_quant().
Jean-Marc Valin [Mon, 14 Apr 2008 21:46:48 +0000 (07:46 +1000)]
optimisation: merged the init loop of vq_quant().

11 years agofix minor compilation error/warning
Jean-Marc Valin [Fri, 11 Apr 2008 20:55:39 +0000 (06:55 +1000)]
fix minor compilation error/warning

11 years agofixed three declaration-after-statement issues
Jean-Marc Valin [Fri, 11 Apr 2008 07:23:01 +0000 (17:23 +1000)]
fixed three declaration-after-statement issues

11 years agofixed a few warnings, no real change
Jean-Marc Valin [Thu, 10 Apr 2008 21:23:53 +0000 (07:23 +1000)]
fixed a few warnings, no real change

11 years agoReworked the static modes. Now, if all static modes have the same frame size,
Jean-Marc Valin [Thu, 10 Apr 2008 18:07:52 +0000 (04:07 +1000)]
Reworked the static modes. Now, if all static modes have the same frame size,
overlap or number of channels, we can pass the hint to the compiler.

11 years agosome index work (simplifications for dumb compilers) on IMDCT
Jean-Marc Valin [Thu, 10 Apr 2008 08:54:02 +0000 (18:54 +1000)]
some index work (simplifications for dumb compilers) on IMDCT

11 years agoAdded a missing RESTORE_STACK in intra_prediction()
Jean-Marc Valin [Thu, 10 Apr 2008 04:43:59 +0000 (14:43 +1000)]
Added a missing RESTORE_STACK in intra_prediction()

11 years agoNot all compilers are equal -- making it clearer how the MDCT indexing is done
Jean-Marc Valin [Thu, 10 Apr 2008 04:38:14 +0000 (14:38 +1000)]
Not all compilers are equal -- making it clearer how the MDCT indexing is done

11 years agoDefining IMUL32 for 32x32=>32 int multiplications and using it in the range
Jean-Marc Valin [Thu, 10 Apr 2008 03:24:48 +0000 (13:24 +1000)]
Defining IMUL32 for 32x32=>32 int multiplications and using it in the range
coder

11 years agoSimplified indexing in intra_prediction()
Jean-Marc Valin [Thu, 10 Apr 2008 02:21:26 +0000 (12:21 +1000)]
Simplified indexing in intra_prediction()

11 years agofixed ordering of the channels in the intra prediction.
Jean-Marc Valin [Thu, 10 Apr 2008 01:00:51 +0000 (11:00 +1000)]
fixed ordering of the channels in the intra prediction.

11 years agoDefining DISABLE_STEREO now optimises for the mono case
Jean-Marc Valin [Wed, 9 Apr 2008 23:13:05 +0000 (09:13 +1000)]
Defining DISABLE_STEREO now optimises for the mono case

11 years agoFixed a stereo regression introduced in e28f25f0d14959d521fda0cdb8f1220995bc50e8
Jean-Marc Valin [Wed, 9 Apr 2008 23:00:12 +0000 (09:00 +1000)]
Fixed a stereo regression introduced in e28f25f0d14959d521fda0cdb8f1220995bc50e8

11 years agoFixed rsqrt testcase for float
Jean-Marc Valin [Sat, 5 Apr 2008 04:36:05 +0000 (14:36 +1000)]
Fixed rsqrt testcase for float

11 years agoRework CWRS code.
Timothy B. Terriberry [Fri, 4 Apr 2008 14:16:19 +0000 (10:16 -0400)]
Rework CWRS code.

This eliminates an extra O(nm) lookups on decode, and reduces the rate control
 from O(nm^2) to O(nm), in addition to eliminating O(m) lookups on both encode
 and decode.
Although the interface is slightly more complex, the internal code is also
 simpler.

11 years agoChanged the rules for using the pulse spreading. It should be used less often
Jean-Marc Valin [Fri, 28 Mar 2008 06:59:36 +0000 (17:59 +1100)]
Changed the rules for using the pulse spreading. It should be used less often
and mainly in the mid-range.

11 years agoRevert ABS16/32 on C55 -- ended up being slower
Jean-Marc Valin [Thu, 27 Mar 2008 21:45:46 +0000 (08:45 +1100)]
Revert ABS16/32 on C55 -- ended up being slower

11 years agoABS16 and ABS32 for the C55
Jean-Marc Valin [Thu, 27 Mar 2008 21:31:33 +0000 (08:31 +1100)]
ABS16 and ABS32 for the C55

11 years agoMaking the pulsesAtOnce code 16-bit safe.
Jean-Marc Valin [Thu, 27 Mar 2008 13:33:04 +0000 (00:33 +1100)]
Making the pulsesAtOnce code 16-bit safe.

11 years agoJust commenting -- nothing to see.
Jean-Marc Valin [Thu, 27 Mar 2008 07:05:01 +0000 (18:05 +1100)]
Just commenting -- nothing to see.

11 years agoOptimisation: got rid of about 10% of the 32-bit divisions by using ec_enc_uint
Jean-Marc Valin [Thu, 27 Mar 2008 04:41:38 +0000 (15:41 +1100)]
Optimisation: got rid of about 10% of the 32-bit divisions by using ec_enc_uint
in energy quantisation when possible.

11 years agoRemoved a few int divisions from the intra prediction code.
Jean-Marc Valin [Thu, 27 Mar 2008 03:18:28 +0000 (14:18 +1100)]
Removed a few int divisions from the intra prediction code.

11 years agoremoved some int div
Jean-Marc Valin [Thu, 27 Mar 2008 01:22:44 +0000 (12:22 +1100)]
removed some int div

11 years agofixed-point: using MULT16_16 instead of * in compute_band_energies()
Jean-Marc Valin [Wed, 26 Mar 2008 23:22:42 +0000 (10:22 +1100)]
fixed-point: using MULT16_16 instead of * in compute_band_energies()

11 years agoMaking a few functions static inline
Jean-Marc Valin [Wed, 26 Mar 2008 22:00:14 +0000 (09:00 +1100)]
Making a few functions static inline

11 years agoTrying to clean up celt_ilog2() vs. EC_ILOG a bit.
Jean-Marc Valin [Wed, 26 Mar 2008 21:40:45 +0000 (08:40 +1100)]
Trying to clean up celt_ilog2() vs. EC_ILOG a bit.

11 years agomaking {next|prev}_cwrs* inline
Jean-Marc Valin [Wed, 26 Mar 2008 12:33:06 +0000 (23:33 +1100)]
making {next|prev}_cwrs* inline

11 years agooptimisation: changed some for() loops to do-while() to give the compiler
Jean-Marc Valin [Wed, 26 Mar 2008 10:31:56 +0000 (21:31 +1100)]
optimisation: changed some for() loops to do-while() to give the compiler
a hint that there has to be at least one iteration.

11 years agoMaking it obvious to the compiler how to generate a dual-MAC in
Jean-Marc Valin [Wed, 26 Mar 2008 07:03:22 +0000 (18:03 +1100)]
Making it obvious to the compiler how to generate a dual-MAC in
mix_pitch_and_residual()

11 years agomix_pitch_and_residual() no longer computing Ryp twice
Jean-Marc Valin [Wed, 26 Mar 2008 06:57:49 +0000 (17:57 +1100)]
mix_pitch_and_residual() no longer computing Ryp twice

11 years agooptimisation: defined a reciprocal square root (celt_rsqrt) for use in
Jean-Marc Valin [Wed, 26 Mar 2008 05:42:42 +0000 (16:42 +1100)]
optimisation: defined a reciprocal square root (celt_rsqrt) for use in
find_spectral_pitch instead of using celt_rcp(celt_sqrt(x))

11 years agoFixed the rcp() testcase for new assumptions (x is positive)
Jean-Marc Valin [Wed, 26 Mar 2008 04:56:07 +0000 (15:56 +1100)]
Fixed the rcp() testcase for new assumptions (x is positive)

11 years agooptimisation: shaving a few cycles off prev_cwrs* by not computed the values
Jean-Marc Valin [Wed, 26 Mar 2008 04:46:51 +0000 (15:46 +1100)]
optimisation: shaving a few cycles off prev_cwrs* by not computed the values
we're not going to use.

11 years agooptimisations: faster handling of the zero for compute_band_energies() and
Jean-Marc Valin [Wed, 26 Mar 2008 03:36:07 +0000 (14:36 +1100)]
optimisations: faster handling of the zero for compute_band_energies() and
normalise_bands(). Also, another bunch of restrict qualifiers -- mainly
to tell the compiler there's no aliasing between the array bounds and the
data.

11 years agochanged 1*rcp(x) to just rcp(x)
Jean-Marc Valin [Wed, 26 Mar 2008 02:45:01 +0000 (13:45 +1100)]
changed 1*rcp(x) to just rcp(x)