mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 15:44:21 +00:00
FS-3486 --resolve update silk
This commit is contained in:
1 parent
b426ec0bfa
commit
fdf74f449f
148 files changed
+2723
-7653
No files matched your search
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************
|
||||
Copyright (c) 2006-2010, Skype Limited. All rights reserved.
|
||||
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, (subject to the limitations in the disclaimer below)
|
||||
are permitted provided that the following conditions are met:
|
||||
@@ -66,30 +66,20 @@ SKP_int SKP_Silk_decode_frame(
|
||||
if( psDec->nFramesDecoded == 0 ) {
|
||||
/* Initialize range decoder state */
|
||||
SKP_Silk_range_dec_init( &psDec->sRC, pCode, nBytes );
|
||||
|
||||
if( psDec->bitstream_v == BIT_STREAM_V4 ) {
|
||||
SKP_Silk_decode_indices_v4( psDec );
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************/
|
||||
/* Decode parameters and pulse signal */
|
||||
/********************************************/
|
||||
if( psDec->bitstream_v == BIT_STREAM_V4 ) {
|
||||
SKP_Silk_decode_parameters_v4( psDec, &sDecCtrl, Pulses, 1 );
|
||||
} else {
|
||||
SKP_Silk_decode_parameters( psDec, &sDecCtrl, Pulses, 1 );
|
||||
}
|
||||
SKP_Silk_decode_parameters( psDec, &sDecCtrl, Pulses, 1 );
|
||||
|
||||
|
||||
if( psDec->sRC.error ) {
|
||||
psDec->nBytesLeft = 0;
|
||||
|
||||
action = 1; /* PLC operation */
|
||||
psDec->fs_kHz = fs_Khz_old; /* revert fs if changed in decode_parameters */
|
||||
psDec->LPC_order = LPC_order_old; /* revert lpc_order if changed in decode_parameters */
|
||||
psDec->frame_length = fs_Khz_old * FRAME_LENGTH_MS;
|
||||
psDec->subfr_length = fs_Khz_old * FRAME_LENGTH_MS / NB_SUBFR;
|
||||
/* revert fs if changed in decode_parameters */
|
||||
SKP_Silk_decoder_set_fs( psDec, fs_Khz_old );
|
||||
|
||||
/* Avoid crashing */
|
||||
*decBytes = psDec->sRC.bufferLength;
|
||||
@@ -124,13 +114,11 @@ SKP_int SKP_Silk_decode_frame(
|
||||
}
|
||||
}
|
||||
/*************************************************************/
|
||||
/* Generate Concealment Frame if packet is lost, or corrupt */
|
||||
/* Generate Concealment frame if packet is lost, or corrupt */
|
||||
/*************************************************************/
|
||||
if( action == 1 ) {
|
||||
/* Handle packet loss by extrapolation */
|
||||
SKP_Silk_PLC( psDec, &sDecCtrl, pOut, L, action );
|
||||
psDec->lossCnt++;
|
||||
|
||||
}
|
||||
|
||||
/*************************/
|
||||
@@ -163,5 +151,6 @@ SKP_int SKP_Silk_decode_frame(
|
||||
/* Update some decoder state variables */
|
||||
psDec->lagPrev = sDecCtrl.pitchL[ NB_SUBFR - 1 ];
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
Reference in new issue
Block a user