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

Side by Side Diff: silk/CNG.c

Issue 107243004: Updating Opus to release 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « silk/API.h ('k') | silk/Inlines.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*********************************************************************** 1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without 3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions 4 modification, are permitted provided that the following conditions
5 are met: 5 are met:
6 - Redistributions of source code must retain the above copyright notice, 6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer. 7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright 8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the 9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution. 10 documentation and/or other materials provided with the distribution.
(...skipping 15 matching lines...) Expand all
26 ***********************************************************************/ 26 ***********************************************************************/
27 27
28 #ifdef HAVE_CONFIG_H 28 #ifdef HAVE_CONFIG_H
29 #include "config.h" 29 #include "config.h"
30 #endif 30 #endif
31 31
32 #include "main.h" 32 #include "main.h"
33 #include "stack_alloc.h" 33 #include "stack_alloc.h"
34 34
35 /* Generates excitation for CNG LPC synthesis */ 35 /* Generates excitation for CNG LPC synthesis */
36 static inline void silk_CNG_exc( 36 static OPUS_INLINE void silk_CNG_exc(
37 opus_int32 residual_Q10[], /* O CNG residual si gnal Q10 */ 37 opus_int32 residual_Q10[], /* O CNG residual si gnal Q10 */
38 opus_int32 exc_buf_Q14[], /* I Random samples buffer Q10 */ 38 opus_int32 exc_buf_Q14[], /* I Random samples buffer Q10 */
39 opus_int32 Gain_Q16, /* I Gain to apply */ 39 opus_int32 Gain_Q16, /* I Gain to apply */
40 opus_int length, /* I Length */ 40 opus_int length, /* I Length */
41 opus_int32 *rand_seed /* I/O Seed to random index generator */ 41 opus_int32 *rand_seed /* I/O Seed to random index generator */
42 ) 42 )
43 { 43 {
44 opus_int32 seed; 44 opus_int32 seed;
45 opus_int i, idx, exc_mask; 45 opus_int i, idx, exc_mask;
46 46
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 CNG_sig_Q10[ MAX_LPC_ORDER + i ] = silk_ADD_LSHIFT( CNG_sig_Q10[ MAX _LPC_ORDER + i ], sum_Q6, 4 ); 163 CNG_sig_Q10[ MAX_LPC_ORDER + i ] = silk_ADD_LSHIFT( CNG_sig_Q10[ MAX _LPC_ORDER + i ], sum_Q6, 4 );
164 164
165 frame[ i ] = silk_ADD_SAT16( frame[ i ], silk_RSHIFT_ROUND( sum_Q6, 6 ) ); 165 frame[ i ] = silk_ADD_SAT16( frame[ i ], silk_RSHIFT_ROUND( sum_Q6, 6 ) );
166 } 166 }
167 silk_memcpy( psCNG->CNG_synth_state, &CNG_sig_Q10[ length ], MAX_LPC_ORD ER * sizeof( opus_int32 ) ); 167 silk_memcpy( psCNG->CNG_synth_state, &CNG_sig_Q10[ length ], MAX_LPC_ORD ER * sizeof( opus_int32 ) );
168 } else { 168 } else {
169 silk_memset( psCNG->CNG_synth_state, 0, psDec->LPC_order * sizeof( opus _int32 ) ); 169 silk_memset( psCNG->CNG_synth_state, 0, psDec->LPC_order * sizeof( opus _int32 ) );
170 } 170 }
171 RESTORE_STACK; 171 RESTORE_STACK;
172 } 172 }
OLDNEW
« no previous file with comments | « silk/API.h ('k') | silk/Inlines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698