| Index: silk/decode_frame.c
|
| diff --git a/silk/decode_frame.c b/silk/decode_frame.c
|
| index abc00a3d545cf8c9a1f9b33e735087fb9bab0baf..a605d95ac6ab10a7acef7a5fa57e33e040bb0f86 100644
|
| --- a/silk/decode_frame.c
|
| +++ b/silk/decode_frame.c
|
| @@ -42,18 +42,16 @@ opus_int silk_decode_frame(
|
| opus_int16 pOut[], /* O Pointer to output speech frame */
|
| opus_int32 *pN, /* O Pointer to size of output frame */
|
| opus_int lostFlag, /* I 0: no loss, 1 loss, 2 decode fec */
|
| - opus_int condCoding /* I The type of conditional coding to use */
|
| + opus_int condCoding, /* I The type of conditional coding to use */
|
| + int arch /* I Run-time architecture */
|
| )
|
| {
|
| VARDECL( silk_decoder_control, psDecCtrl );
|
| opus_int L, mv_len, ret = 0;
|
| - VARDECL( opus_int, pulses );
|
| SAVE_STACK;
|
|
|
| L = psDec->frame_length;
|
| ALLOC( psDecCtrl, 1, silk_decoder_control );
|
| - ALLOC( pulses, (L + SHELL_CODEC_FRAME_LENGTH - 1) &
|
| - ~(SHELL_CODEC_FRAME_LENGTH - 1), opus_int );
|
| psDecCtrl->LTP_scale_Q14 = 0;
|
|
|
| /* Safety checks */
|
| @@ -62,6 +60,9 @@ opus_int silk_decode_frame(
|
| if( lostFlag == FLAG_DECODE_NORMAL ||
|
| ( lostFlag == FLAG_DECODE_LBRR && psDec->LBRR_flags[ psDec->nFramesDecoded ] == 1 ) )
|
| {
|
| + VARDECL( opus_int16, pulses );
|
| + ALLOC( pulses, (L + SHELL_CODEC_FRAME_LENGTH - 1) &
|
| + ~(SHELL_CODEC_FRAME_LENGTH - 1), opus_int16 );
|
| /*********************************************/
|
| /* Decode quantization indices of side info */
|
| /*********************************************/
|
| @@ -81,12 +82,12 @@ opus_int silk_decode_frame(
|
| /********************************************************/
|
| /* Run inverse NSQ */
|
| /********************************************************/
|
| - silk_decode_core( psDec, psDecCtrl, pOut, pulses );
|
| + silk_decode_core( psDec, psDecCtrl, pOut, pulses, arch );
|
|
|
| /********************************************************/
|
| /* Update PLC state */
|
| /********************************************************/
|
| - silk_PLC( psDec, psDecCtrl, pOut, 0 );
|
| + silk_PLC( psDec, psDecCtrl, pOut, 0, arch );
|
|
|
| psDec->lossCnt = 0;
|
| psDec->prevSignalType = psDec->indices.signalType;
|
| @@ -96,7 +97,7 @@ opus_int silk_decode_frame(
|
| psDec->first_frame_after_reset = 0;
|
| } else {
|
| /* Handle packet loss by extrapolation */
|
| - silk_PLC( psDec, psDecCtrl, pOut, 1 );
|
| + silk_PLC( psDec, psDecCtrl, pOut, 1, arch );
|
| }
|
|
|
| /*************************/
|
| @@ -107,16 +108,16 @@ opus_int silk_decode_frame(
|
| silk_memmove( psDec->outBuf, &psDec->outBuf[ psDec->frame_length ], mv_len * sizeof(opus_int16) );
|
| silk_memcpy( &psDec->outBuf[ mv_len ], pOut, psDec->frame_length * sizeof( opus_int16 ) );
|
|
|
| - /****************************************************************/
|
| - /* Ensure smooth connection of extrapolated and good frames */
|
| - /****************************************************************/
|
| - silk_PLC_glue_frames( psDec, pOut, L );
|
| -
|
| /************************************************/
|
| /* Comfort noise generation / estimation */
|
| /************************************************/
|
| silk_CNG( psDec, psDecCtrl, pOut, L );
|
|
|
| + /****************************************************************/
|
| + /* Ensure smooth connection of extrapolated and good frames */
|
| + /****************************************************************/
|
| + silk_PLC_glue_frames( psDec, pOut, L );
|
| +
|
| /* Update some decoder state variables */
|
| psDec->lagPrev = psDecCtrl->pitchL[ psDec->nb_subfr - 1 ];
|
|
|
|
|