Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(781)

Unified Diff: silk/PLC.c

Issue 12388030: Update Opus to 1.0.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « silk/NLSF_stabilize.c ('k') | silk/SigProc_FIX.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: silk/PLC.c
diff --git a/silk/PLC.c b/silk/PLC.c
index 1b93d06e653e6675f4a40c0450f9f36ca31def4a..8d5472958daf6b5c27406a42eb5ed210f71cd6d7 100644
--- a/silk/PLC.c
+++ b/silk/PLC.c
@@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
#endif
#include "main.h"
+#include "stack_alloc.h"
#include "PLC.h"
#define NB_ATT 2
@@ -178,12 +179,17 @@ static inline void silk_PLC_conceal(
opus_int16 rand_scale_Q14;
opus_int16 *B_Q14, *exc_buf_ptr;
opus_int32 *sLPC_Q14_ptr;
- opus_int16 exc_buf[ 2 * MAX_SUB_FRAME_LENGTH ];
+ VARDECL( opus_int16, exc_buf );
opus_int16 A_Q12[ MAX_LPC_ORDER ];
- opus_int16 sLTP[ MAX_FRAME_LENGTH ];
- opus_int32 sLTP_Q14[ 2 * MAX_FRAME_LENGTH ];
+ VARDECL( opus_int16, sLTP );
+ VARDECL( opus_int32, sLTP_Q14 );
silk_PLC_struct *psPLC = &psDec->sPLC;
opus_int32 prevGain_Q10[2];
+ SAVE_STACK;
+
+ ALLOC( exc_buf, 2*psPLC->subfr_length, opus_int16 );
+ ALLOC( sLTP, psDec->ltp_mem_length, opus_int16 );
+ ALLOC( sLTP_Q14, psDec->ltp_mem_length + psDec->frame_length, opus_int32 );
prevGain_Q10[0] = silk_RSHIFT( psPLC->prevGain_Q16[ 0 ], 6);
prevGain_Q10[1] = silk_RSHIFT( psPLC->prevGain_Q16[ 1 ], 6);
@@ -354,9 +360,10 @@ static inline void silk_PLC_conceal(
for( i = 0; i < MAX_NB_SUBFR; i++ ) {
psDecCtrl->pitchL[ i ] = lag;
}
+ RESTORE_STACK;
}
-/* Glues concealed frames with new good recieved frames */
+/* Glues concealed frames with new good received frames */
void silk_PLC_glue_frames(
silk_decoder_state *psDec, /* I/O decoder state */
opus_int16 frame[], /* I/O signal */
« no previous file with comments | « silk/NLSF_stabilize.c ('k') | silk/SigProc_FIX.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698