Fixes two SILK PLC issues
[opus.git] / silk / decode_pitch.c
index bb21bc7..8fc6f07 100644 (file)
@@ -36,11 +36,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "pitch_est_defines.h"
 
 void silk_decode_pitch(
 #include "pitch_est_defines.h"
 
 void silk_decode_pitch(
-    opus_int16       lagIndex,                        /* I                             */
-    opus_int8        contourIndex,                    /* O                             */
-    opus_int         pitch_lags[],                    /* O pitch values                */
-    const opus_int   Fs_kHz,                          /* I sampling frequency (kHz)    */
-    const opus_int   nb_subfr                         /* I number of sub frames        */
+    opus_int16                  lagIndex,           /* I                                                                */
+    opus_int8                   contourIndex,       /* O                                                                */
+    opus_int                    pitch_lags[],       /* O    4 pitch values                                              */
+    const opus_int              Fs_kHz,             /* I    sampling frequency (kHz)                                    */
+    const opus_int              nb_subfr            /* I    number of sub frames                                        */
 )
 {
     opus_int   lag, k, min_lag, max_lag, cbk_size;
 )
 {
     opus_int   lag, k, min_lag, max_lag, cbk_size;
@@ -67,7 +67,7 @@ void silk_decode_pitch(
     }
 
     min_lag = silk_SMULBB( PE_MIN_LAG_MS, Fs_kHz );
     }
 
     min_lag = silk_SMULBB( PE_MIN_LAG_MS, Fs_kHz );
-    max_lag = silk_SMULBB( PE_MAX_LAG_MS, Fs_kHz ) - 1;
+    max_lag = silk_SMULBB( PE_MAX_LAG_MS, Fs_kHz );
     lag = min_lag + lagIndex;
 
     for( k = 0; k < nb_subfr; k++ ) {
     lag = min_lag + lagIndex;
 
     for( k = 0; k < nb_subfr; k++ ) {