Commit graph

31 commits

Author SHA1 Message Date
Timothy B. Terriberry
d503125101
Add check-asm for fixed-point xcorr_kernel().
Compare the output of xcorr_kernel() against the results of
 xcorr_kernel_c() when configured with --enable-check-asm.
Currently this is only checked in fixed point, as a float check
 requires more sophisticated error analysis and may need to be
 customized for each vector implementation.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2024-02-09 20:39:58 -05:00
Jean-Marc Valin
152d57de5c
Rename LPC_ORDER to CELT_LPC_ORDER to avoid clash 2023-06-19 15:55:39 -04:00
Jean-Marc Valin
e05aea9785
Using saturating round to fix some wrap-arounds
Reviewed by Mark Harris
2022-07-22 12:22:34 -04:00
Felicia Lim
1639592368
Revert relaxing comparison to 0 for fixed point only 2021-06-10 11:54:55 -07:00
Felicia Lim
4b21ff9c54
Relax comparison to 0 to avoid a floating point divide-by-zero error. 2021-06-07 16:35:27 -07:00
Felicia Lim
7b05f44f4b
celt_lpc: avoid overflows when computing lpcs in fixed point
The LPCs are computed in 32-bit, so increase the allowed range from +/-8
to +/-64 to avoid overflows caught during fuzzing. Before downshifting
back down to the +/-8 range in the final 16-bit output, perform bandwidth
extension to avoid any additional overflow issues.
2021-03-02 21:35:16 -08:00
Jean-Marc Valin
ea8b26ff85
Fix comma that should have been a semicolon
Didn't cause any problem, but still good to fix. Reported by
keithchugg on github.
2018-07-26 00:29:26 -04:00
Jean-Marc Valin
072d133f78
Fixes CELT PLC
The regression was introduced in 783ad76766
by changes to celt_fir() that make it no longer in-place.
2017-10-06 18:24:57 -04:00
Jean-Marc Valin
ad15578102
Fix sum initializer in celt_fir() 2017-02-18 17:04:24 -05:00
Jean-Marc Valin
414eef55bd
Remove SMALL_FOOTPRINT code for celt_fir()
Wasn't worth it given the small code size of the alternative, which also
got refactored a little (still bit exact).
2017-02-17 19:28:28 -05:00
Linfeng Zhang
783ad76766 Revise celt_fir_c() to not pass in argument "mem"
The "mem" in celt_fir_c() either is contained in the head of input "x"
in reverse order already, or can be easily attached to the head of "x"
before calling the function. Removing argument "mem" can eliminate the
redundant buffer copies inside.
Update celt_fir_sse4_1() accordingly.
2017-01-17 14:04:37 -08:00
Jean-Marc Valin
a0bd7d3b84 fixes overflows in celt_iir() by doing proper saturation 2016-07-22 15:57:01 -04:00
Jean-Marc Valin
b66080a879 Fixes minor code quality issues in CELT
Reported by Durandal.
2016-06-20 12:11:05 -04:00
Timothy B. Terriberry
020a0a48d5 Fix build bustage from c95c9a048. 2014-10-03 21:11:51 -07:00
xiangmingzhu
c95c9a048f Cisco optimization for x86 & fixed point
1. Only for fixed point on x86 platform (32bit and 64bit, uses SIMD
   intrinsics up to SSE4.2)
2. Use "configure --enable-fixed-point --enable-intrinsics" to enable
   optimization, default is disabled.
3. Official test cases are verified and passed.

Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
2014-10-03 21:16:00 -04:00
Timothy B. Terriberry
39386e0b85 Adds Neon assembly for correlation/convolution
Optimizing celt_pitch_xcorr()/xcorr_kernel() which also speeds up
FIRs, IIRs and auto-correlations

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-11-18 13:41:17 -05:00
Jean-Marc Valin
02fed471a4 Implements fixed-point silk_LPC_analysis_filter() in terms of celt_fir()
Saves 2.5% on ARM without any asm. The float build still uses the old
code because celt_fir() then becomes a float function.
2013-08-29 15:29:02 -04:00
Jean-Marc Valin
6a7ee7fb55 Share auto-correlation code between SILK and CELT 2013-08-28 17:55:34 -04:00
Jean-Marc Valin
71766ef7a4 Avoids symbol clashes with Speex (pitch_xcorr) and libm (y1) 2013-06-17 00:44:12 -04:00
John Ridges
e50e8084a9 Improved SSE version of xcorr_kernel()
The loop no longer reads past its buffer and is slightly faster.
Also fixes RESTORE_STACK in celt_iir().
2013-06-06 23:12:57 -04:00
Jean-Marc Valin
0fed074b04 C89 fix 2013-05-26 20:29:44 -04:00
Jean-Marc Valin
068cbd89bf Creates xcorr_kernel() that gets used by pitch_xcorr, celt_fir and celt_iir. 2013-05-26 20:11:44 -04:00
Jean-Marc Valin
0fa5fa88e9 Adds missing RESTORE_STACK calls 2013-05-25 18:50:01 -04:00
Jean-Marc Valin
531cf591e6 Speeds up celt_iir() by more than a factor of two.
Again, this only impacts the PLC and we assume the order is a multiple of 4.
2013-05-25 07:41:55 -04:00
Jean-Marc Valin
e2374a8ec2 Speeds up celt_fir by more than a factor of two.
Only impacts the PLC. We now assume that the order is a multiple of 4.
2013-05-25 04:25:54 -04:00
Jean-Marc Valin
e8e57a32f6 Optimizes _celt_autocorr() by using pitch_xcorr()
Computes most of the auto-correlation by reusing pitch_xcorr(). We only
need lag*(lag-1)/2 MACs to complete the calculations.
To do this, pitch_xcorr() was modified so that it no longer truncates the
length to a multiple of 4. Also, the xcorr didn't need the floor at -1.
As a side benefit, this speeds up the PLC, which uses a higher order LPC
filter.
2013-05-25 02:14:25 -04:00
Timothy B. Terriberry
7c74bc3930 Remove an unused variable added in 85ede2c6.
Thanks to John Ridges for the report.
2013-05-23 13:00:28 -07:00
Timothy B. Terriberry
85ede2c6aa Use more MAC16_16's and unroll a loop.
This splits out the non-arch-specific portions of a patch written
 by Aurélien Zanelli <aurelien.zanelli@parrot.com
 http://lists.xiph.org/pipermail/opus/2013-May/002088.html

I also added support for odd n, for custom modes.

0.25% speedup on 96 kbps stereo encode+decode on a Cortex A8.
2013-05-22 15:32:50 -07:00
Jean-Marc Valin
cb05e7cd96 s/FOUNDATION/COPYRIGHT OWNER/ in CELT code and "glue code"
Also added 3rd clause to "master" COPYING file
2012-04-20 16:41:42 -04:00
Jean-Marc Valin
e1be1920ba Some minor (non-bitstream-affecting) changes to help us have better test vectors
These fix corner cases discovered during the latest fuzzing tests.
2011-11-28 22:48:01 -05:00
Jean-Marc Valin
2779df7ff6 Renaming the CELT plc.c file to celt_lpc.c to avoid MSVC conflicts with Skype's PLC.c 2011-10-04 13:31:54 -04:00
Renamed from celt/plc.c (Browse further)