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

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

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 silk_A2NLSF( NLSF_Q15, a_tmp_Q16, psEncC->predictLPCOrder ); 85 silk_A2NLSF( NLSF_Q15, a_tmp_Q16, psEncC->predictLPCOrder );
86 86
87 ALLOC( LPC_res, 2 * subfr_length, opus_int16 ); 87 ALLOC( LPC_res, 2 * subfr_length, opus_int16 );
88 88
89 /* Search over interpolation indices to find the one with lowest residua l energy */ 89 /* Search over interpolation indices to find the one with lowest residua l energy */
90 for( k = 3; k >= 0; k-- ) { 90 for( k = 3; k >= 0; k-- ) {
91 /* Interpolate NLSFs for first half */ 91 /* Interpolate NLSFs for first half */
92 silk_interpolate( NLSF0_Q15, psEncC->prev_NLSFq_Q15, NLSF_Q15, k, ps EncC->predictLPCOrder ); 92 silk_interpolate( NLSF0_Q15, psEncC->prev_NLSFq_Q15, NLSF_Q15, k, ps EncC->predictLPCOrder );
93 93
94 /* Convert to LPC for residual energy evaluation */ 94 /* Convert to LPC for residual energy evaluation */
95 silk_NLSF2A( a_tmp_Q12, NLSF0_Q15, psEncC->predictLPCOrder ); 95 silk_NLSF2A( a_tmp_Q12, NLSF0_Q15, psEncC->predictLPCOrder, psEncC-> arch );
96 96
97 /* Calculate residual energy with NLSF interpolation */ 97 /* Calculate residual energy with NLSF interpolation */
98 silk_LPC_analysis_filter( LPC_res, x, a_tmp_Q12, 2 * subfr_length, p sEncC->predictLPCOrder, psEncC->arch ); 98 silk_LPC_analysis_filter( LPC_res, x, a_tmp_Q12, 2 * subfr_length, p sEncC->predictLPCOrder, psEncC->arch );
99 99
100 silk_sum_sqr_shift( &res_nrg0, &rshift0, LPC_res + psEncC->predictLP COrder, subfr_length - psEncC->predictLPCOrder ); 100 silk_sum_sqr_shift( &res_nrg0, &rshift0, LPC_res + psEncC->predictLP COrder, subfr_length - psEncC->predictLPCOrder );
101 silk_sum_sqr_shift( &res_nrg1, &rshift1, LPC_res + psEncC->predictLP COrder + subfr_length, subfr_length - psEncC->predictLPCOrder ); 101 silk_sum_sqr_shift( &res_nrg1, &rshift1, LPC_res + psEncC->predictLP COrder + subfr_length, subfr_length - psEncC->predictLPCOrder );
102 102
103 /* Add subframe energies from first half frame */ 103 /* Add subframe energies from first half frame */
104 shift = rshift0 - rshift1; 104 shift = rshift0 - rshift1;
105 if( shift >= 0 ) { 105 if( shift >= 0 ) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 if( psEncC->indices.NLSFInterpCoef_Q2 == 4 ) { 144 if( psEncC->indices.NLSFInterpCoef_Q2 == 4 ) {
145 /* NLSF interpolation is currently inactive, calculate NLSFs from full f rame AR coefficients */ 145 /* NLSF interpolation is currently inactive, calculate NLSFs from full f rame AR coefficients */
146 silk_A2NLSF( NLSF_Q15, a_Q16, psEncC->predictLPCOrder ); 146 silk_A2NLSF( NLSF_Q15, a_Q16, psEncC->predictLPCOrder );
147 } 147 }
148 148
149 silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 || ( psEncC->useInterpol atedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBF R ) ); 149 silk_assert( psEncC->indices.NLSFInterpCoef_Q2 == 4 || ( psEncC->useInterpol atedNLSFs && !psEncC->first_frame_after_reset && psEncC->nb_subfr == MAX_NB_SUBF R ) );
150 RESTORE_STACK; 150 RESTORE_STACK;
151 } 151 }
OLDNEW
« no previous file with comments | « third_party/opus/src/silk/fixed/encode_frame_FIX.c ('k') | third_party/opus/src/silk/fixed/find_LTP_FIX.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698