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

Side by Side Diff: third_party/opus/src/silk/fixed/burg_modified_FIX.c

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Include minor updates including fix for win_clang Created 3 years, 5 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 unified diff | Download patch
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 19 matching lines...) Expand all
30 #endif 30 #endif
31 31
32 #include "SigProc_FIX.h" 32 #include "SigProc_FIX.h"
33 #include "define.h" 33 #include "define.h"
34 #include "tuning_parameters.h" 34 #include "tuning_parameters.h"
35 #include "pitch.h" 35 #include "pitch.h"
36 36
37 #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */ 37 #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */
38 38
39 #define QA 25 39 #define QA 25
40 #define N_BITS_HEAD_ROOM 2 40 #define N_BITS_HEAD_ROOM 3
41 #define MIN_RSHIFTS -16 41 #define MIN_RSHIFTS -16
42 #define MAX_RSHIFTS (32 - QA) 42 #define MAX_RSHIFTS (32 - QA)
43 43
44 /* Compute reflection coefficients from input signal */ 44 /* Compute reflection coefficients from input signal */
45 void silk_burg_modified_c( 45 void silk_burg_modified_c(
46 opus_int32 *res_nrg, /* O Residual energy */ 46 opus_int32 *res_nrg, /* O Residual energy */
47 opus_int *res_nrg_Q, /* O Residual energy Q va lue */ 47 opus_int *res_nrg_Q, /* O Residual energy Q va lue */
48 opus_int32 A_Q16[], /* O Prediction coefficie nts (length order) */ 48 opus_int32 A_Q16[], /* O Prediction coefficie nts (length order) */
49 const opus_int16 x[], /* I Input signal, length : nb_subfr * ( D + subfr_length ) */ 49 const opus_int16 x[], /* I Input signal, length : nb_subfr * ( D + subfr_length ) */
50 const opus_int32 minInvGain_Q30, /* I Inverse of max predi ction gain */ 50 const opus_int32 minInvGain_Q30, /* I Inverse of max predi ction gain */
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 for( k = 0; k < D; k++ ) { 271 for( k = 0; k < D; k++ ) {
272 Atmp1 = silk_RSHIFT_ROUND( Af_QA[ k ], QA - 16 ); /* Q16 */ 272 Atmp1 = silk_RSHIFT_ROUND( Af_QA[ k ], QA - 16 ); /* Q16 */
273 nrg = silk_SMLAWW( nrg, CAf[ k + 1 ], Atmp1 ); /* Q( -rshifts ) */ 273 nrg = silk_SMLAWW( nrg, CAf[ k + 1 ], Atmp1 ); /* Q( -rshifts ) */
274 tmp1 = silk_SMLAWW( tmp1, Atmp1, Atmp1 ); /* Q16 */ 274 tmp1 = silk_SMLAWW( tmp1, Atmp1, Atmp1 ); /* Q16 */
275 A_Q16[ k ] = -Atmp1; 275 A_Q16[ k ] = -Atmp1;
276 } 276 }
277 *res_nrg = silk_SMLAWW( nrg, silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_F AC, 32 ), C0 ), -tmp1 );/* Q( -rshifts ) */ 277 *res_nrg = silk_SMLAWW( nrg, silk_SMMUL( SILK_FIX_CONST( FIND_LPC_COND_F AC, 32 ), C0 ), -tmp1 );/* Q( -rshifts ) */
278 *res_nrg_Q = -rshifts; 278 *res_nrg_Q = -rshifts;
279 } 279 }
280 } 280 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698