Commit graph

112 commits

Author SHA1 Message Date
Jean-Marc Valin
239d223d84
Add rtcd for silk_inner_product_FLP() 2023-11-21 02:56:04 -05:00
Jean-Marc Valin
b93e4a149c
Start enabling AVX2 silk_inner_product_FLP()
Not yet with rtcd
2023-11-21 02:13:06 -05:00
Jean-Marc Valin
452aa95211
AVX2 version of silk_inner_product_FLP()
Not hooked up
2023-11-20 17:53:18 -05:00
Jean-Marc Valin
d4b04d3275
Speed up silk_warped_autocorrelation_FLP()
Reducing the dependency chain between tmp1 and tmp2 at the
cost of an extra multiply.
2023-11-17 23:10:59 -05:00
Jean-Marc Valin
fe84c3bcee
Make "VBR with cap" less aggressive
The bits we don't use won't be wasted, so it's less important to
get exactly the optimal number of bits below the cap.
2023-07-12 17:06:57 -04:00
Jean-Marc Valin
eb1759736f
Some general SILK CBR tuning
The gain*2 when overshooting was too aggressive and the undershoot
case wasn't aggressive enough. This now seems to work reasonably well.
2023-07-12 17:06:47 -04:00
Jean-Marc Valin
997fdf54e7
Change pitch scaling behavior wrt nFramesPerPacket
Not sure if it was the original intent, but we now reduce the
loss percentage threshold for pitch scaling as 1/nFramesPerPacket
since only the first frame will have pitch scaling anyway.
As a side effect, this brings back the original behavior of
disabling pitch scaling for 0% loss.
2022-08-04 19:02:02 -04:00
Jean-Marc Valin
5413ef7849
Re-tuning the use of LTP scaling
Making LTP scaling depend on the bitrate and whether FEC is on.
The thresholds for scaling 1 and 2 are now independent.
2022-07-24 02:12:03 -04:00
Mark Harris
ef10bf56c3
Silence GCC 11+ -Wmaybe-uninitialized warnings
Reviewed by Timothy B. Terriberry.
2022-07-05 15:16:03 -07:00
Jean-Marc Valin
ccb42e05cc
Fixes valgrind failure caused by silk_find_pred_coefs_*()
The function copies NLSFs from the stack to the state which for
order 10 means we were copying uninitialized values. That in turn
breaks check-asm when comparing the state under valgrind.

Reviewed by Timothy B. Terriberry.
2022-06-28 02:07:08 -04:00
Jean-Marc Valin
befb83bab4
Fixes misleading initialization with not enough zeros 2018-10-30 14:20:17 -04:00
Gustaf Ullberg
42f43db7e4
Silk makes use of Opus VAD
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2018-05-14 13:55:39 -04:00
Jean-Marc Valin
d01199be4c
two more asserts I forgot 2018-03-27 15:13:28 -04:00
Jean-Marc Valin
e69fc1995e
Hardening asserts for SILK float 2018-03-27 15:13:27 -04:00
Gustaf Ullberg
cea38f1c8c
Fixed off-by-one issue in Silk DTX
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2018-02-22 16:33:05 -05:00
Mark Harris
d6d70371e8
Fix compiler warnings
- celt/modes.c:430:14: warning: cast from 'const unsigned char *' to
  'opus_int16 *' increases required alignment from 1 to 2 [-Wcast-align]
- 'C[0][1]' may be used uninitialized [-Wmaybe-uninitialized]
- Unused variable/parameter
- Value stored is never read
- MSVC warnings about "possible loss of data" due to type conversions
- MSVC warning C4146: unary minus operator applied to unsigned type
- silk/NLSF_del_dec_quant.c:137:20: warning: array subscript is above
  array bounds [-Warray-bounds] (gcc -O3 false positive)
- src/mlp_train.h:39:20: warning: function declaration isn't a prototype
  [-Wstrict-prototypes]
- Remove SMALL_FOOTPRINT code from SSE 4.1 FIR implementation, matching
  the C implementation.

The clang -Wcast-align warnings with SSE intrinsics are a known
clang issue: https://llvm.org/bugs/show_bug.cgi?id=20670
2017-02-26 19:10:45 -08:00
Linfeng Zhang
95d4c9f960
Optimize silk_LPC_inverse_pred_gain() for ARM NEON
The optimization is bit exact with C function.

Change-Id: Ib3bdc26a5a4ebe02e7f24be85104e8e9a2a9a738

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2017-02-14 23:57:15 -05:00
Tristan Matthews
c4027c1d34 Fix include warning 2016-07-19 22:58:35 -04:00
Jean-Marc Valin
2b011b64d8 Moving FEC decision to the Opus encoder level (from SILK level) 2016-07-19 16:11:50 -04:00
Jean-Marc Valin
cc344b019d CBR: set gains to their previons values where we're busting the budget 2016-07-19 16:11:50 -04:00
Jean-Marc Valin
4e75dd0711 Set pulses to zero if we can't meet rate target 2016-07-19 16:11:50 -04:00
Jean-Marc Valin
d8781a0ffb CBR: lock the gain on a subframe when the number of pulses stops going down 2016-07-19 16:11:50 -04:00
Koen Vos
0a698d6522 merge back in the LTP gain safety limiter 2016-07-19 16:11:41 -04:00
Koen Vos
3e054b8e57 increase order of noise shaping filter 2016-07-19 16:11:18 -04:00
Koen Vos
f06774c640 more conservative scaling of LTP corrs; remove assert that checks for negative residual energy; discard CB entries leading to such negative energies 2016-07-19 16:11:09 -04:00
Koen Vos
07691f15d4 Clean up: alignment of comments 2016-07-17 15:05:55 -04:00
Koen Vos
90f8c5ef4d Clean up: replace tabs by spaces 2016-07-17 15:05:55 -04:00
Koen Vos
6e40eb5d75 removed prefilter
The NSQ SSE optimizations are disabled for now because they need to be updated
2016-07-17 15:05:55 -04:00
Koen Vos
8abd50ea1a undo some loop unrolling 2016-07-17 15:05:55 -04:00
Koen Vos
6adea4b93c pitch analysis (in FIX) now scales the input down at the start, instead of at every stage 2016-07-17 15:05:55 -04:00
Koen Vos
fc7ce7d588 minor clean up of pointer offsets 2016-07-17 15:05:55 -04:00
Koen Vos
8c9d41867e simplified computation of LTP coefs 2016-07-17 15:05:55 -04:00
Jean-Marc Valin
894f729417 Makes the encoder more aggressive about meeting the rate target 2016-07-17 15:05:54 -04:00
Koen Vos
3499e78bd5 Fix for flutter with FEC
The bug was caused by an improper feedback of the per-frame bitrate, causing
the bitrate to jump up and down from frame to frame, within a packet.
The patch avoids this, and also gives a slight improvement in general for
multi-frame packets, even without FEC.

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2015-08-10 12:22:25 -04:00
Timothy B. Terriberry
554b349cdb There are no tabs in source code.
There is also no trailing whitespace.
2014-10-03 21:49:57 -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
Koen Vos
c63fb978be Constrains accumulated pitch gain to avoid potential instability.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-11-20 08:32:32 -05: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
db5b19455f Fixes an initialization issue in SILK prefill found by Coverity 2013-11-12 14:20:00 -05:00
Gregory Maxwell
7830cf1bd2 Replace "inline" with OPUS_INLINE.
Newer versions of MSVC are unhappy with the strategy of the build
 environment redefining "inline" (even though they don't support the
 actual keyword). Instead we define OPUS_INLINE to the right thing
 in opus_defines.h.

This is the same approach we use for restrict.
2013-10-28 10:18:54 -07:00
Stefan Beller
2891d852a3 Remove dead code
The compiler warned:
silk/float/pitch_analysis_core_FLP.c: In function 'silk_P_Ana_calc_corr_st3':
silk/float/pitch_analysis_core_FLP.c:499:36: warning: variable 'basis_ptr' set but not used [-Wunused-but-set-variable]
     const silk_float *target_ptr, *basis_ptr;

This means we can safely remove it.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
2013-10-23 16:18:32 -04:00
Ralph Giles
f2446c25c6 Remove trailing whitespace from the license headers. 2013-09-16 14:40:04 -07:00
Jean-Marc Valin
a156c5ece7 Makes the SILK pitch search use celt_pitch_xcorr()
Should gives us ARM/SSE optimizations for free.
2013-08-26 19:27:46 -04:00
Jean-Marc Valin
1975eeadd2 Big squashed commit of Garf's MSVC reorg:
commit 77880655f652c54415e4b5f03b5984b951f5267b
Author: Timothy B. Terriberry <tterribe@xiph.org>
Date:   Wed Jun 26 12:23:53 2013 +0200

    Fix version.mk parsing in genversion.bat.

    This was broken by the changes in 0482c82f to make it work with spaces.

    CMD interprets the quotes to mean the argument to FOR is a string,
    not a file name. Instead, we expand the path to a short file name.

    Signed-off-by: Gian-Carlo Pascutto <gcp@sjeng.org>

commit 8e97847ecac3a04956747b117fefef14939cbcbe
Merge: 0482c82 3c0aa8f
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Wed Jun 26 12:19:41 2013 +0200

    Merge branch 'master' into msvc_reorg

commit 0482c82fea6dd397a7d2ab50dc6cda4965278fc2
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Tue May 21 17:59:30 2013 +0200

    Make genversion.bat work in paths with spaces.

commit 3648ec55b7511119735280fc49bc57c7a3b55d6a
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Tue May 21 17:42:14 2013 +0200

    Rework output & intermediate dirs for parallel build support.

commit c367a0fcfcbf5551fb65d61365d9b832d7af2b38
Merge: bafb1dd b518b56
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Tue May 21 14:17:11 2013 +0200

    Merge branch 'master' into msvc_reorg

    Conflicts:
    	win32/VS2010/celt.vcxproj
    	win32/VS2010/opus.vcxproj
    	win32/VS2010/silk_common.vcxproj
    	win32/VS2010/silk_float.vcxproj

commit bafb1dda3fcf6785decdfb42a1f934c7fab0c567
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Mon Mar 11 21:25:28 2013 +0100

    Fix two more files to not have the Platform Toolset explicitly set.

commit c69c870201fec7461862fe79731a37866a1810f1
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Mon Mar 11 21:08:00 2013 +0100

    Add missing SILK MSVC project files.

commit a0d41fb7f97558c8f812d500b9027c77907c37c0
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Fri Mar 8 15:00:51 2013 +0100

    Use the default toolset in the MSVC project files.

commit 34aac5b2637ed38c5620f0d876e08db232849933
Author: Gian-Carlo Pascutto <gcp@sjeng.org>
Date:   Fri Mar 8 14:54:41 2013 +0100

    Move the MSVC project files outside the source tree.

    Bring the project structure more in line with the one in libogg.
2013-06-27 03:12:38 -04:00
Timothy B. Terriberry
80ad38370c Convert quotes in license headers to ASCII.
Since the last patch originally had them mangled (presumably by
 mailer, http server, or something else), let's just get rid of
 them.
2013-05-19 19:16:11 -07:00
Ralph Giles
b7d5531ffe Change Visual Studio files to use PACKAGE_VERSION.
This replaces the OPUS_VERSION removed by ron's auto-updater.
2013-05-10 11:27:13 -07:00
Jean-Marc Valin
e9b36c1e38 Fixes comment-in-comment warning 2012-10-10 13:53:59 -04:00
Koen Vos
9cbbcb53ae Improvements to the pitch search
Normalizes the cost function by (x+y) instead of sqrt(x*y)
2012-10-10 09:37:10 -04:00
Philip Jägenstedt
ba28403a04 Typo: FIND_PITCH_BANDWI(D)TH_EXPANSION 2012-09-27 09:16:31 -04:00
Philip Jägenstedt
6d9c16d142 Fix common misspellings
I stumbled upon the typo in README.draft, so took the opportunity to
grep for common misspellings using List_of_common_misspellings.txt for
hunspell.
2012-09-27 09:16:30 -04:00