opus.git
12 years agoRemoved the "pitch compression" in the residual quantisation. Also, removed
Jean-Marc Valin [Tue, 25 Mar 2008 03:15:41 +0000 (14:15 +1100)]
Removed the "pitch compression" in the residual quantisation. Also, removed
the more complex "n-best search" and replaced it with a greedy search

12 years agoUnrolled the inner loop in vq_index() so that the codebook unpacking doesn't
Jean-Marc Valin [Mon, 24 Mar 2008 10:39:49 +0000 (21:39 +1100)]
Unrolled the inner loop in vq_index() so that the codebook unpacking doesn't
require a branch.

12 years agoMaking bits2pulses() use a fixed number of iterations to allow further
Jean-Marc Valin [Mon, 24 Mar 2008 06:06:08 +0000 (17:06 +1100)]
Making bits2pulses() use a fixed number of iterations to allow further
optimisations.

12 years agoinclude "dsplib.h" in fixed_c5x.h
Jean-Marc Valin [Sun, 23 Mar 2008 21:32:49 +0000 (08:32 +1100)]
include "dsplib.h" in fixed_c5x.h

12 years agoreplaced divisions by recoprocals in intra prediction and folding
Jean-Marc Valin [Sun, 23 Mar 2008 21:15:40 +0000 (08:15 +1100)]
replaced divisions by recoprocals in intra prediction and folding

12 years agodefined find_max16 and overrode it for C55x
Jean-Marc Valin [Sat, 22 Mar 2008 21:06:29 +0000 (08:06 +1100)]
defined find_max16 and overrode it for C55x

12 years agoMade a second version of ec_{en|de}code optimised for encoding bits (no div
Jean-Marc Valin [Sat, 22 Mar 2008 11:58:45 +0000 (22:58 +1100)]
Made a second version of ec_{en|de}code optimised for encoding bits (no div
required) and using it in ec_{en|de}c_bits()

12 years agoNo longer trying to save bits when encoding integers near the upper limit
Jean-Marc Valin [Sat, 22 Mar 2008 11:23:58 +0000 (22:23 +1100)]
No longer trying to save bits when encoding integers near the upper limit
(and fix for celt_div with 16-bit numerator on a 16-bit CPU)

12 years agofixed-point: added cheap celt_div() division using a reciprocal
Jean-Marc Valin [Sat, 22 Mar 2008 10:17:45 +0000 (21:17 +1100)]
fixed-point: added cheap celt_div() division using a reciprocal

12 years agomore use of restrict
Jean-Marc Valin [Sat, 22 Mar 2008 06:53:12 +0000 (17:53 +1100)]
more use of restrict

12 years agoUsing restrict to make it clear there's no aliasing issues in the mdct.
Jean-Marc Valin [Sat, 22 Mar 2008 00:23:57 +0000 (11:23 +1100)]
Using restrict to make it clear there's no aliasing issues in the mdct.

12 years agoAdded a few "restrict" keywords and changed some divisions to shifts
Jean-Marc Valin [Fri, 21 Mar 2008 22:01:50 +0000 (09:01 +1100)]
Added a few "restrict" keywords and changed some divisions to shifts

12 years agofixed TI fft code -- again
Jean-Marc Valin [Fri, 21 Mar 2008 11:54:41 +0000 (22:54 +1100)]
fixed TI fft code -- again

12 years agoRemoved potentially unused var in MDCT init
Jean-Marc Valin [Fri, 21 Mar 2008 02:11:16 +0000 (13:11 +1100)]
Removed potentially unused var in MDCT init

12 years agooops (TI FFT)
Jean-Marc Valin [Fri, 21 Mar 2008 02:02:53 +0000 (13:02 +1100)]
oops (TI FFT)

12 years agolocal var name maxval was shadowing the TI function used to compute it
Jean-Marc Valin [Fri, 21 Mar 2008 01:53:37 +0000 (12:53 +1100)]
local var name maxval was shadowing the TI function used to compute it

12 years agomake sure TRIG_UPSCALE is properly defined
Jean-Marc Valin [Fri, 21 Mar 2008 01:51:05 +0000 (12:51 +1100)]
make sure TRIG_UPSCALE is properly defined

12 years agofix for TI version of celt_maxabs16()
Jean-Marc Valin [Fri, 21 Mar 2008 01:49:36 +0000 (12:49 +1100)]
fix for TI version of celt_maxabs16()

12 years agofixed-point: fix for 32-bit TI FFT
Jean-Marc Valin [Fri, 21 Mar 2008 01:47:41 +0000 (12:47 +1100)]
fixed-point: fix for 32-bit TI FFT

12 years agofixed-point: Wrapper for the 32-bit complex FFT used in the MDCT so we can use
Jean-Marc Valin [Fri, 21 Mar 2008 01:09:27 +0000 (12:09 +1100)]
fixed-point: Wrapper for the 32-bit complex FFT used in the MDCT so we can use
the TI dsplib FFT.

12 years agofixed-point: defined celt_maxabs16() as basic operator
Jean-Marc Valin [Fri, 21 Mar 2008 00:13:51 +0000 (11:13 +1100)]
fixed-point: defined celt_maxabs16() as basic operator

12 years agofixed-point: MULT16_32_Q15 for TI DSP (not entirely happy with it)
Jean-Marc Valin [Thu, 20 Mar 2008 23:53:09 +0000 (10:53 +1100)]
fixed-point: MULT16_32_Q15 for TI DSP (not entirely happy with it)

12 years agos/ROUND/ROUND16/
Jean-Marc Valin [Thu, 20 Mar 2008 23:46:17 +0000 (10:46 +1100)]
s/ROUND/ROUND16/

12 years agofixed-point: using TI intrinsic for celt_ilog2() if available.
Jean-Marc Valin [Thu, 20 Mar 2008 23:40:43 +0000 (10:40 +1100)]
fixed-point: using TI intrinsic for celt_ilog2() if available.

12 years agoWrapper for the TI dsplib FFT
Jean-Marc Valin [Thu, 20 Mar 2008 12:17:18 +0000 (23:17 +1100)]
Wrapper for the TI dsplib FFT

12 years agoMaking the real/single FFT easier to replace
Jean-Marc Valin [Thu, 20 Mar 2008 11:23:54 +0000 (22:23 +1100)]
Making the real/single FFT easier to replace

12 years agoRandom numbers should work on 16-bit archs.
Jean-Marc Valin [Tue, 18 Mar 2008 22:33:49 +0000 (09:33 +1100)]
Random numbers should work on 16-bit archs.

12 years agofixed-point: more TI macros. Comments on the existing ones.
Jean-Marc Valin [Sun, 16 Mar 2008 12:33:02 +0000 (23:33 +1100)]
fixed-point: more TI macros. Comments on the existing ones.

12 years agoRemoved useless functions that caused warnings in skeleton.c
Jean-Marc Valin [Sun, 16 Mar 2008 10:39:05 +0000 (21:39 +1100)]
Removed useless functions that caused warnings in skeleton.c

12 years agoMaking sure not to use the C library calls directly
Jean-Marc Valin [Sat, 15 Mar 2008 20:55:29 +0000 (07:55 +1100)]
Making sure not to use the C library calls directly

12 years agoSome work on assertions.
Jean-Marc Valin [Sat, 15 Mar 2008 12:34:39 +0000 (23:34 +1100)]
Some work on assertions.

12 years agoNew C55 macro
Jean-Marc Valin [Fri, 14 Mar 2008 21:12:49 +0000 (08:12 +1100)]
New C55 macro

12 years agofixed-point: Fixed a "shift too large" warning by using a 16-bit mul instead
Jean-Marc Valin [Fri, 14 Mar 2008 21:04:16 +0000 (08:04 +1100)]
fixed-point: Fixed a "shift too large" warning by using a 16-bit mul instead
of 32-bit in find_spectral_pitch()

12 years agofixed-point: playing it safe. SHL32() now automatically casts input to 32-bit
Jean-Marc Valin [Fri, 14 Mar 2008 06:58:33 +0000 (17:58 +1100)]
fixed-point: playing it safe. SHL32() now automatically casts input to 32-bit
to prevent surprises. Also, a few comments.

12 years agofixed-point: fixed a 16-bit issue in normalise_bands() where Q15ONE was directly
Jean-Marc Valin [Fri, 14 Mar 2008 05:28:28 +0000 (16:28 +1100)]
fixed-point: fixed a 16-bit issue in normalise_bands() where Q15ONE was directly
shifted left

12 years agoRemoved unnecessary header inclusions
Jean-Marc Valin [Fri, 14 Mar 2008 00:09:50 +0000 (11:09 +1100)]
Removed unnecessary header inclusions

12 years agoAdjusting/fixing warnings
Jean-Marc Valin [Thu, 13 Mar 2008 12:01:55 +0000 (23:01 +1100)]
Adjusting/fixing warnings

12 years agofixed-point: Using reciproqual instead of DIV32_16 for find_spectral_pitch()
Jean-Marc Valin [Thu, 13 Mar 2008 06:55:03 +0000 (17:55 +1100)]
fixed-point: Using reciproqual instead of DIV32_16 for find_spectral_pitch()

12 years agoEnabling warnings and restricting symbol visibility
Jean-Marc Valin [Thu, 13 Mar 2008 06:39:55 +0000 (17:39 +1100)]
Enabling warnings and restricting symbol visibility

12 years agoAdded mathops-test
Jean-Marc Valin [Thu, 13 Mar 2008 06:20:08 +0000 (17:20 +1100)]
Added mathops-test

12 years agofixed-point: simplification of the gain in mix_pitch_and_residual()
Jean-Marc Valin [Thu, 13 Mar 2008 00:36:45 +0000 (11:36 +1100)]
fixed-point: simplification of the gain in mix_pitch_and_residual()

12 years agofixed-point: simplifying the arithmetic in alg_quant()
Jean-Marc Valin [Thu, 13 Mar 2008 00:18:15 +0000 (11:18 +1100)]
fixed-point: simplifying the arithmetic in alg_quant()

12 years agoMore accurate sqrt approximation using MULT16_16_Q15() instead of Q14.
Jean-Marc Valin [Wed, 12 Mar 2008 12:00:42 +0000 (23:00 +1100)]
More accurate sqrt approximation using MULT16_16_Q15() instead of Q14.

12 years agoTODO update
Jean-Marc Valin [Wed, 12 Mar 2008 11:21:46 +0000 (22:21 +1100)]
TODO update

12 years agoIncreased accuracy of the reciprocal approximation and made it use
Jean-Marc Valin [Wed, 12 Mar 2008 10:34:50 +0000 (21:34 +1100)]
Increased accuracy of the reciprocal approximation and made it use
MULT16_16_Q15() instead of Q14 (should be faster).

12 years agoTestcases should now work even when symbols aren't visible in the dso
Jean-Marc Valin [Wed, 12 Mar 2008 07:04:27 +0000 (18:04 +1100)]
Testcases should now work even when symbols aren't visible in the dso

12 years agoAdded info for properly exporting symbols
Jean-Marc Valin [Wed, 12 Mar 2008 06:46:04 +0000 (17:46 +1100)]
Added info for properly exporting symbols

12 years agoChanged definition of VARDECL to make it more flexible. No actual code change.
Jean-Marc Valin [Wed, 12 Mar 2008 06:17:23 +0000 (17:17 +1100)]
Changed definition of VARDECL to make it more flexible. No actual code change.

12 years agoUsing reciprocal approximation instead of full 32-bit division in alg_quant()
Jean-Marc Valin [Wed, 12 Mar 2008 02:26:37 +0000 (13:26 +1100)]
Using reciprocal approximation instead of full 32-bit division in alg_quant()

12 years agoconfigure update (MIXED_PRECISION and STATIC_MODES can now be used)
Jean-Marc Valin [Wed, 12 Mar 2008 00:47:19 +0000 (11:47 +1100)]
configure update (MIXED_PRECISION and STATIC_MODES can now be used)

12 years agoDefined the celt_rcp() reciprocal approximation
Jean-Marc Valin [Wed, 12 Mar 2008 00:28:26 +0000 (11:28 +1100)]
Defined the celt_rcp() reciprocal approximation

12 years ago__GNUC_PREREQ should be causing problems anymore.
Jean-Marc Valin [Tue, 11 Mar 2008 23:42:24 +0000 (10:42 +1100)]
__GNUC_PREREQ should be causing problems anymore.

12 years agoAdded macro definitions for the TI C5x family (untested)
Jean-Marc Valin [Tue, 11 Mar 2008 23:16:26 +0000 (10:16 +1100)]
Added macro definitions for the TI C5x family (untested)

12 years agoBetter heuristic for deciding when to use the 32-bit version of the cwrs code.
Jean-Marc Valin [Tue, 11 Mar 2008 04:24:07 +0000 (15:24 +1100)]
Better heuristic for deciding when to use the 32-bit version of the cwrs code.

12 years agoconst correctness. celt_mode_create() now makes a copy of the static mode
Jean-Marc Valin [Mon, 10 Mar 2008 23:43:06 +0000 (10:43 +1100)]
const correctness. celt_mode_create() now makes a copy of the static mode
(if STATIC_MODES is defined) instead of attempting to modify read-only
storage.

12 years agooops, forgot to disable the main()
Jean-Marc Valin [Mon, 10 Mar 2008 05:44:07 +0000 (16:44 +1100)]
oops, forgot to disable the main()

12 years agoChanged some of the mode data from int to celt_int16_t to save memory.
Jean-Marc Valin [Mon, 10 Mar 2008 05:37:37 +0000 (16:37 +1100)]
Changed some of the mode data from int to celt_int16_t to save memory.

12 years agoNo longer include redundent entries in the bit allocation cache
Jean-Marc Valin [Mon, 10 Mar 2008 05:10:15 +0000 (16:10 +1100)]
No longer include redundent entries in the bit allocation cache

12 years agoAllocation cache can now be pre-computed as well.
Jean-Marc Valin [Mon, 10 Mar 2008 04:42:35 +0000 (15:42 +1100)]
Allocation cache can now be pre-computed as well.

12 years agoPsychoacoustic decay coefficients can now be included in the static modes
Jean-Marc Valin [Mon, 10 Mar 2008 04:07:58 +0000 (15:07 +1100)]
Psychoacoustic decay coefficients can now be included in the static modes

12 years agoImprovements to static modes
Jean-Marc Valin [Mon, 10 Mar 2008 03:52:18 +0000 (14:52 +1100)]
Improvements to static modes

12 years agoMoved the psycoacoustics data to the mode struct
Jean-Marc Valin [Mon, 10 Mar 2008 02:34:52 +0000 (13:34 +1100)]
Moved the psycoacoustics data to the mode struct

12 years agoSimplified spreading function so that only one set of coefficients (the right
Jean-Marc Valin [Mon, 10 Mar 2008 02:17:58 +0000 (13:17 +1100)]
Simplified spreading function so that only one set of coefficients (the right
slope is required).

12 years agoInitial support for static modes (defined STATIC_MODES)
Jean-Marc Valin [Mon, 10 Mar 2008 01:13:23 +0000 (12:13 +1100)]
Initial support for static modes (defined STATIC_MODES)

12 years agofixed-point: done converting find_spectral_pitch()
Jean-Marc Valin [Sun, 9 Mar 2008 23:41:13 +0000 (10:41 +1100)]
fixed-point: done converting find_spectral_pitch()

12 years agofixed some build problems
Jean-Marc Valin [Sun, 9 Mar 2008 23:25:40 +0000 (10:25 +1100)]
fixed some build problems

12 years agotestcelt no longer attempts to use ALLOC()
Jean-Marc Valin [Sun, 9 Mar 2008 08:27:58 +0000 (19:27 +1100)]
testcelt no longer attempts to use ALLOC()

12 years agomanual stack allocator should now work for sizeof(char)!=1
Jean-Marc Valin [Sun, 9 Mar 2008 06:18:39 +0000 (17:18 +1100)]
manual stack allocator should now work for sizeof(char)!=1

12 years agofixed-point: stereo_mix() converted.
Jean-Marc Valin [Sat, 8 Mar 2008 09:17:12 +0000 (20:17 +1100)]
fixed-point: stereo_mix() converted.

12 years agocleaning up some of the mode stuff
Jean-Marc Valin [Sat, 8 Mar 2008 04:21:24 +0000 (15:21 +1100)]
cleaning up some of the mode stuff

12 years agooops, forgot an int sampling rate somewhere
Jean-Marc Valin [Fri, 7 Mar 2008 23:02:30 +0000 (10:02 +1100)]
oops, forgot an int sampling rate somewhere

12 years agosampling rate has to be int32
Jean-Marc Valin [Fri, 7 Mar 2008 20:39:47 +0000 (07:39 +1100)]
sampling rate has to be int32

12 years agoAdding code to dump the contents of a mode struct to a C file that can be
Jean-Marc Valin [Fri, 7 Mar 2008 11:25:27 +0000 (22:25 +1100)]
Adding code to dump the contents of a mode struct to a C file that can be
compiled without having to use the initialisation code.

12 years agofixed-point: defined HALF32() and used it for the forward mdct.
Jean-Marc Valin [Fri, 7 Mar 2008 06:50:45 +0000 (17:50 +1100)]
fixed-point: defined HALF32() and used it for the forward mdct.

12 years agofixed-point: real FFT no longer needs float ops when MIXED_PRECISION is enabled.
Jean-Marc Valin [Fri, 7 Mar 2008 06:46:00 +0000 (17:46 +1100)]
fixed-point: real FFT no longer needs float ops when MIXED_PRECISION is enabled.

12 years agoBit of cleaning up. No real code change (well, I hope so!).
Jean-Marc Valin [Fri, 7 Mar 2008 06:38:58 +0000 (17:38 +1100)]
Bit of cleaning up. No real code change (well, I hope so!).

12 years agofixed-point: removed the last float op in celt.c
Jean-Marc Valin [Fri, 7 Mar 2008 06:33:58 +0000 (17:33 +1100)]
fixed-point: removed the last float op in celt.c

12 years agofixed-point: finished intra_prediction(). No float ops left in vq.c
Jean-Marc Valin [Fri, 7 Mar 2008 06:25:47 +0000 (17:25 +1100)]
fixed-point: finished intra_prediction(). No float ops left in vq.c

12 years agofixed-point: converting intra-frame predictor (checkpoint #1).
Jean-Marc Valin [Fri, 7 Mar 2008 06:17:37 +0000 (17:17 +1100)]
fixed-point: converting intra-frame predictor (checkpoint #1).

12 years agofixed-point: intra_fold() converted
Jean-Marc Valin [Fri, 7 Mar 2008 06:05:47 +0000 (17:05 +1100)]
fixed-point: intra_fold() converted

12 years agofixed-point: compute_band_energies() converted. Had to add some tiny bias to
Jean-Marc Valin [Fri, 7 Mar 2008 05:42:31 +0000 (16:42 +1100)]
fixed-point: compute_band_energies() converted. Had to add some tiny bias to
make sure never to end up with a pitch vector with >1 norm.

12 years agofixed-point: converted normalise_bands (had to split implementation)
Jean-Marc Valin [Fri, 7 Mar 2008 04:33:32 +0000 (15:33 +1100)]
fixed-point: converted normalise_bands (had to split implementation)

12 years agoRevert "compute_band_energies() merged with normalised_bands()"
Jean-Marc Valin [Fri, 7 Mar 2008 03:53:17 +0000 (14:53 +1100)]
Revert "compute_band_energies() merged with normalised_bands()"

This reverts commit a1bc18a38836e2b1360a26a1d7ef2571b2f3b694.
I think it's easier for now to deal with two functions here, even though they
could be merged.

12 years agoChanged the pulse spreading rotations so that the number of iterations is
Jean-Marc Valin [Fri, 7 Mar 2008 03:44:56 +0000 (14:44 +1100)]
Changed the pulse spreading rotations so that the number of iterations is
variable instead of the angle. Should now be both less CPU-intensive and
makes fixed-point code simpler.

12 years agofixed-point: done converting quant_bands() and unquant_bands()
Jean-Marc Valin [Thu, 6 Mar 2008 13:21:40 +0000 (00:21 +1100)]
fixed-point: done converting quant_bands() and unquant_bands()

12 years agoAdd option to #include "custom_support.h"
Jean-Marc Valin [Wed, 5 Mar 2008 13:12:27 +0000 (00:12 +1100)]
Add option to #include "custom_support.h"

12 years agodoing spreading function and gain quantisation in-place
Jean-Marc Valin [Wed, 5 Mar 2008 12:22:00 +0000 (23:22 +1100)]
doing spreading function and gain quantisation in-place

12 years agofixed-point: part of stereo_mix() converted.
Jean-Marc Valin [Wed, 5 Mar 2008 12:00:21 +0000 (23:00 +1100)]
fixed-point: part of stereo_mix() converted.

12 years agooops, unb0rked testcelt output
Jean-Marc Valin [Wed, 5 Mar 2008 11:40:58 +0000 (22:40 +1100)]
oops, unb0rked testcelt output

12 years agoDefining RADIX_TWO_ONLY removes all butterflies, except for radix 2 and 4.
Jean-Marc Valin [Wed, 5 Mar 2008 06:34:45 +0000 (17:34 +1100)]
Defining RADIX_TWO_ONLY removes all butterflies, except for radix 2 and 4.

12 years agofixed-point: changed find_spectral_pitch() to use single-precision (16-bit) FFT.
Jean-Marc Valin [Wed, 5 Mar 2008 06:20:30 +0000 (17:20 +1100)]
fixed-point: changed find_spectral_pitch() to use single-precision (16-bit) FFT.
This involved adding kfft_single.[ch] that redefines kiss_fft a second time
with a different prefix. All this is still a bit of a mess now. The mask
had to be converted to 16-bit input, but we're still using floats to apply it.

12 years agonothing to see here
Jean-Marc Valin [Wed, 5 Mar 2008 04:18:53 +0000 (15:18 +1100)]
nothing to see here

12 years agofixed-point: masking curve computation now converted. ***Fixed a bug in the
Jean-Marc Valin [Wed, 5 Mar 2008 02:40:20 +0000 (13:40 +1100)]
fixed-point: masking curve computation now converted. ***Fixed a bug in the
handling of the left side slope of the spreading function (right-side coef
was used)

12 years agooops, pgain_table now has half the number of elements
Jean-Marc Valin [Wed, 5 Mar 2008 02:12:16 +0000 (13:12 +1100)]
oops, pgain_table now has half the number of elements

12 years agofixed-point: quantised the pitch gain table.
Jean-Marc Valin [Wed, 5 Mar 2008 01:22:37 +0000 (12:22 +1100)]
fixed-point: quantised the pitch gain table.

12 years agofixed-point: converted the pitch gain quantisation, except for the codebook
Jean-Marc Valin [Wed, 5 Mar 2008 00:31:57 +0000 (11:31 +1100)]
fixed-point: converted the pitch gain quantisation, except for the codebook
itself

12 years agoMaking 16-bit compilers happy
Jean-Marc Valin [Tue, 4 Mar 2008 21:15:55 +0000 (08:15 +1100)]
Making 16-bit compilers happy

12 years agoFixed a bunch of warnings
Jean-Marc Valin [Tue, 4 Mar 2008 21:11:57 +0000 (08:11 +1100)]
Fixed a bunch of warnings

12 years agocompute_band_energies() merged with normalised_bands()
Jean-Marc Valin [Tue, 4 Mar 2008 11:52:52 +0000 (22:52 +1100)]
compute_band_energies() merged with normalised_bands()

12 years agoRemoved deprecated mode interface and added missing include
Jean-Marc Valin [Tue, 4 Mar 2008 09:38:00 +0000 (20:38 +1100)]
Removed deprecated mode interface and added missing include