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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 for( i = 0; i < psEnc->sCmn.pitchEstimationLPCOrder; i++ ) { | 105 for( i = 0; i < psEnc->sCmn.pitchEstimationLPCOrder; i++ ) { |
106 A_Q12[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT( A_Q24[ i ], 12 ) ); | 106 A_Q12[ i ] = (opus_int16)silk_SAT16( silk_RSHIFT( A_Q24[ i ], 12 ) ); |
107 } | 107 } |
108 | 108 |
109 /* Do BWE */ | 109 /* Do BWE */ |
110 silk_bwexpander( A_Q12, psEnc->sCmn.pitchEstimationLPCOrder, SILK_FIX_CONST(
FIND_PITCH_BANDWIDTH_EXPANSION, 16 ) ); | 110 silk_bwexpander( A_Q12, psEnc->sCmn.pitchEstimationLPCOrder, SILK_FIX_CONST(
FIND_PITCH_BANDWIDTH_EXPANSION, 16 ) ); |
111 | 111 |
112 /*****************************************/ | 112 /*****************************************/ |
113 /* LPC analysis filtering */ | 113 /* LPC analysis filtering */ |
114 /*****************************************/ | 114 /*****************************************/ |
115 silk_LPC_analysis_filter( res, x_buf, A_Q12, buf_len, psEnc->sCmn.pitchEstim
ationLPCOrder ); | 115 silk_LPC_analysis_filter( res, x_buf, A_Q12, buf_len, psEnc->sCmn.pitchEstim
ationLPCOrder, psEnc->sCmn.arch ); |
116 | 116 |
117 if( psEnc->sCmn.indices.signalType != TYPE_NO_VOICE_ACTIVITY && psEnc->sCmn.
first_frame_after_reset == 0 ) { | 117 if( psEnc->sCmn.indices.signalType != TYPE_NO_VOICE_ACTIVITY && psEnc->sCmn.
first_frame_after_reset == 0 ) { |
118 /* Threshold for pitch estimator */ | 118 /* Threshold for pitch estimator */ |
119 thrhld_Q13 = SILK_FIX_CONST( 0.6, 13 ); | 119 thrhld_Q13 = SILK_FIX_CONST( 0.6, 13 ); |
120 thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.004, 13 ), psEn
c->sCmn.pitchEstimationLPCOrder ); | 120 thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.004, 13 ), psEn
c->sCmn.pitchEstimationLPCOrder ); |
121 thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1, 21 ), psE
nc->sCmn.speech_activity_Q8 ); | 121 thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1, 21 ), psE
nc->sCmn.speech_activity_Q8 ); |
122 thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.15, 13 ), silk
_RSHIFT( psEnc->sCmn.prevSignalType, 1 ) ); | 122 thrhld_Q13 = silk_SMLABB( thrhld_Q13, SILK_FIX_CONST( -0.15, 13 ), silk
_RSHIFT( psEnc->sCmn.prevSignalType, 1 ) ); |
123 thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1, 14 ), psEn
c->sCmn.input_tilt_Q15 ); | 123 thrhld_Q13 = silk_SMLAWB( thrhld_Q13, SILK_FIX_CONST( -0.1, 14 ), psEn
c->sCmn.input_tilt_Q15 ); |
124 thrhld_Q13 = silk_SAT16( thrhld_Q13 ); | 124 thrhld_Q13 = silk_SAT16( thrhld_Q13 ); |
125 | 125 |
(...skipping 10 matching lines...) Expand all Loading... |
136 psEnc->sCmn.indices.signalType = TYPE_UNVOICED; | 136 psEnc->sCmn.indices.signalType = TYPE_UNVOICED; |
137 } | 137 } |
138 } else { | 138 } else { |
139 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) ); | 139 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) ); |
140 psEnc->sCmn.indices.lagIndex = 0; | 140 psEnc->sCmn.indices.lagIndex = 0; |
141 psEnc->sCmn.indices.contourIndex = 0; | 141 psEnc->sCmn.indices.contourIndex = 0; |
142 psEnc->LTPCorr_Q15 = 0; | 142 psEnc->LTPCorr_Q15 = 0; |
143 } | 143 } |
144 RESTORE_STACK; | 144 RESTORE_STACK; |
145 } | 145 } |
OLD | NEW |