Skip to content
Snippets Groups Projects
Commit 74de3a58 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Saturates the last RC to 0.99 when Schur blows up

This is a follow-up on ac76b150. When Schur blows up, we set the last RC to
+/- 0.99 instead of eliminating it.
parent 6862b44e
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,12 @@ opus_int32 silk_schur64( /* O returns residual ene
for( k = 0; k < order; k++ ) {
/* Check that we won't be getting an unstable rc, otherwise stop here. */
if (silk_abs_int32(C[ k + 1 ][ 0 ]) >= C[ 0 ][ 1 ]) {
if ( C[ k + 1 ][ 0 ] > 0 ) {
rc_Q16[ k ] = -SILK_FIX_CONST( .99f, 16 );
} else {
rc_Q16[ k ] = SILK_FIX_CONST( .99f, 16 );
}
k++;
break;
}
......
......@@ -70,6 +70,12 @@ opus_int32 silk_schur( /* O Returns residual ene
for( k = 0; k < order; k++ ) {
/* Check that we won't be getting an unstable rc, otherwise stop here. */
if (silk_abs_int32(C[ k + 1 ][ 0 ]) >= C[ 0 ][ 1 ]) {
if ( C[ k + 1 ][ 0 ] > 0 ) {
rc_Q15[ k ] = -SILK_FIX_CONST( .99f, 15 );
} else {
rc_Q15[ k ] = SILK_FIX_CONST( .99f, 15 );
}
k++;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment