summaryrefslogtreecommitdiffstats
path: root/thirdparty/opus/silk/fixed/schur_FIX.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-11-12 07:55:25 +0100
committerGitHub <noreply@github.com>2019-11-12 07:55:25 +0100
commitba4c808721592a8558686b518d12f36e0fe60957 (patch)
tree90bfefa3d3b0d524c562b6280776807595a10400 /thirdparty/opus/silk/fixed/schur_FIX.c
parent067c259ef139a1d60b64386ff596dfea690aa06d (diff)
parente00426c512a7905f5f925d382c443bab7a0ca693 (diff)
downloadredot-engine-ba4c808721592a8558686b518d12f36e0fe60957.tar.gz
Merge pull request #33311 from SneakyFish5/update-opus
Update opus to 1.3.1 and opusfile to 0.11
Diffstat (limited to 'thirdparty/opus/silk/fixed/schur_FIX.c')
-rw-r--r--thirdparty/opus/silk/fixed/schur_FIX.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/thirdparty/opus/silk/fixed/schur_FIX.c b/thirdparty/opus/silk/fixed/schur_FIX.c
index c4c0ef23b4..2840f6b1aa 100644
--- a/thirdparty/opus/silk/fixed/schur_FIX.c
+++ b/thirdparty/opus/silk/fixed/schur_FIX.c
@@ -43,28 +43,29 @@ opus_int32 silk_schur( /* O Returns residual ene
opus_int32 C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ];
opus_int32 Ctmp1, Ctmp2, rc_tmp_Q15;
- silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 );
+ celt_assert( order >= 0 && order <= SILK_MAX_ORDER_LPC );
/* Get number of leading zeros */
lz = silk_CLZ32( c[ 0 ] );
/* Copy correlations and adjust level to Q30 */
+ k = 0;
if( lz < 2 ) {
/* lz must be 1, so shift one to the right */
- for( k = 0; k < order + 1; k++ ) {
+ do {
C[ k ][ 0 ] = C[ k ][ 1 ] = silk_RSHIFT( c[ k ], 1 );
- }
+ } while( ++k <= order );
} else if( lz > 2 ) {
/* Shift to the left */
lz -= 2;
- for( k = 0; k < order + 1; k++ ) {
+ do {
C[ k ][ 0 ] = C[ k ][ 1 ] = silk_LSHIFT( c[ k ], lz );
- }
+ } while( ++k <= order );
} else {
/* No need to shift */
- for( k = 0; k < order + 1; k++ ) {
+ do {
C[ k ][ 0 ] = C[ k ][ 1 ] = c[ k ];
- }
+ } while( ++k <= order );
}
for( k = 0; k < order; k++ ) {