Check for underflow in the debug USUB32.
[opus.git] / silk / LPC_analysis_filter.c
index 5fc4349..e1a9d91 100644 (file)
@@ -39,11 +39,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 /*******************************************/
 
 void silk_LPC_analysis_filter(
-    opus_int16            *out,           /* O:   Output signal                               */
-    const opus_int16      *in,            /* I:   Input signal                                */
-    const opus_int16      *B,             /* I:   MA prediction coefficients, Q12 [order]     */
-    const opus_int32      len,            /* I:   Signal length                               */
-    const opus_int32      d               /* I:   Filter order                                */
+    opus_int16                  *out,               /* O    Output signal                                               */
+    const opus_int16            *in,                /* I    Input signal                                                */
+    const opus_int16            *B,                 /* I    MA prediction coefficients, Q12 [order]                     */
+    const opus_int32            len,                /* I    Signal length                                               */
+    const opus_int32            d                   /* I    Filter order                                                */
 )
 {
     opus_int         ix, j;
@@ -54,10 +54,10 @@ void silk_LPC_analysis_filter(
     silk_assert( (d & 1) == 0 );
     silk_assert( d <= len );
 
-    for ( ix = d; ix < len; ix++) {
+    for( ix = d; ix < len; ix++ ) {
         in_ptr = &in[ ix - 1 ];
 
-        out32_Q12 = silk_SMULBB(            in_ptr[  0 ], B[ 0 ] );
+        out32_Q12 = silk_SMULBB( in_ptr[  0 ], B[ 0 ] );
         /* Allowing wrap around so that two wraps can cancel each other. The rare
            cases where the result wraps around can only be triggered by invalid streams*/
         out32_Q12 = silk_SMLABB_ovflw( out32_Q12, in_ptr[ -1 ], B[ 1 ] );
@@ -77,7 +77,7 @@ void silk_LPC_analysis_filter(
         out32 = silk_RSHIFT_ROUND( out32_Q12, 12 );
 
         /* Saturate output */
-        out[ ix ] = ( opus_int16 )silk_SAT16( out32 );
+        out[ ix ] = (opus_int16)silk_SAT16( out32 );
     }
 
     /* Set first d output samples to zero */