OLD | NEW |
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 opus_int16 a_tmp_Q12[ MAX_LPC_ORDER ]; | 53 opus_int16 a_tmp_Q12[ MAX_LPC_ORDER ]; |
54 opus_int16 NLSF0_Q15[ MAX_LPC_ORDER ]; | 54 opus_int16 NLSF0_Q15[ MAX_LPC_ORDER ]; |
55 SAVE_STACK; | 55 SAVE_STACK; |
56 | 56 |
57 subfr_length = psEncC->subfr_length + psEncC->predictLPCOrder; | 57 subfr_length = psEncC->subfr_length + psEncC->predictLPCOrder; |
58 | 58 |
59 /* Default: no interpolation */ | 59 /* Default: no interpolation */ |
60 psEncC->indices.NLSFInterpCoef_Q2 = 4; | 60 psEncC->indices.NLSFInterpCoef_Q2 = 4; |
61 | 61 |
62 /* Burg AR analysis for the full frame */ | 62 /* Burg AR analysis for the full frame */ |
63 silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, minInvGain_Q30, subfr_le
ngth, psEncC->nb_subfr, psEncC->predictLPCOrder ); | 63 silk_burg_modified( &res_nrg, &res_nrg_Q, a_Q16, x, minInvGain_Q30, subfr_le
ngth, psEncC->nb_subfr, psEncC->predictLPCOrder, psEncC->arch ); |
64 | 64 |
65 if( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEn
cC->nb_subfr == MAX_NB_SUBFR ) { | 65 if( psEncC->useInterpolatedNLSFs && !psEncC->first_frame_after_reset && psEn
cC->nb_subfr == MAX_NB_SUBFR ) { |
66 VARDECL( opus_int16, LPC_res ); | 66 VARDECL( opus_int16, LPC_res ); |
67 | 67 |
68 /* Optimal solution for last 10 ms */ | 68 /* Optimal solution for last 10 ms */ |
69 silk_burg_modified( &res_tmp_nrg, &res_tmp_nrg_Q, a_tmp_Q16, x + 2 * sub
fr_length, minInvGain_Q30, subfr_length, 2, psEncC->predictLPCOrder ); | 69 silk_burg_modified( &res_tmp_nrg, &res_tmp_nrg_Q, a_tmp_Q16, x + 2 * sub
fr_length, minInvGain_Q30, subfr_length, 2, psEncC->predictLPCOrder, psEncC->arc
h ); |
70 | 70 |
71 /* subtract residual energy here, as that's easier than adding it to the
*/ | 71 /* subtract residual energy here, as that's easier than adding it to the
*/ |
72 /* residual energy of the first 10 ms in each iteration of the search be
low */ | 72 /* residual energy of the first 10 ms in each iteration of the search be
low */ |
73 shift = res_tmp_nrg_Q - res_nrg_Q; | 73 shift = res_tmp_nrg_Q - res_nrg_Q; |
74 if( shift >= 0 ) { | 74 if( shift >= 0 ) { |
75 if( shift < 32 ) { | 75 if( shift < 32 ) { |
76 res_nrg = res_nrg - silk_RSHIFT( res_tmp_nrg, shift ); | 76 res_nrg = res_nrg - silk_RSHIFT( res_tmp_nrg, shift ); |
77 } | 77 } |
78 } else { | 78 } else { |
79 silk_assert( shift > -32 ); | 79 silk_assert( shift > -32 ); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |