Debian Codegraph @

external/opusfile/opus/silk/control_codec.c

raw symbols SCIP
1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions
5 are met:
6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution.
11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
12 names of specific contributors, may be used to endorse or promote
13 products derived from this software without specific prior written
14 permission.
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE.
26 ***********************************************************************/
27
28 //#ifdef HAVE_CONFIG_H
29 #include "opus__config.h"cxx . . $ `<file>/external/opusfile/opus/opus__config.h`/
30 //#endif
31 #ifdef FIXED_POINT
32 #include "main_FIX.h"
33 #define silk_encoder_state_Fxx silk_encoder_state_FIX
34 #else
35 #include "main_FLP.h"cxx . . $ `<file>/external/opusfile/opus/silk/float/main_FLP.h`/
36 #define silk_encoder_state_Fxxcxx . . $ `external/opusfile/opus/silk/control_codec.c:36:9`! silk_encoder_state_FLP
37 #endif
38 #include "stack_alloc.h"cxx . . $ `<file>/external/opusfile/opus/celt/stack_alloc.h`/
39 #include "tuning_parameters.h"cxx . . $ `<file>/external/opusfile/opus/silk/tuning_parameters.h`/
40 #include "pitch_est_defines.h"cxx . . $ `<file>/external/opusfile/opus/silk/pitch_est_defines.h`/
41
42 static opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_resamplerscxx . . $ silk_setup_resamplers(c9c7e39f6113ca69).(
43 silk_encoder_state_Fxxcxx . . $ `external/opusfile/opus/silk/control_codec.c:36:9`! *psEnc, /* I/O */
44 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz /* I */
45 );
46
47 static opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_fscxx . . $ silk_setup_fs(380142a50498b17a).(
48 silk_encoder_state_Fxxcxx . . $ `external/opusfile/opus/silk/control_codec.c:36:9`! *psEnc, /* I/O */
49 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz, /* I */
50 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! PacketSize_ms /* I */
51 );
52
53 static opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_complexitycxx . . $ silk_setup_complexity(99ece60f02e4a8bb).(
54 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O */
55 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Complexity /* I */
56 );
57
58 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_LBRRcxx . . $ silk_setup_LBRR(b3f2c44f127be241).(
59 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O */
60 const silk_EncControlStructcxx . . $ silk_EncControlStruct# *encControl /* I */
61 );
62
63
64 /* Control encoder */
65 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_control_encodercxx . . $ silk_control_encoder(b5a802d14a76463b).(
66 silk_encoder_state_Fxxcxx . . $ `external/opusfile/opus/silk/control_codec.c:36:9`! *psEnc, /* I/O Pointer to Silk encoder state */
67 silk_EncControlStructcxx . . $ silk_EncControlStruct# *encControl, /* I Control structure */
68 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! allow_bw_switch, /* I Flag to allow switching audio bandwidth */
69 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! channelNb, /* I Channel number */
70 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! force_fs_kHz
71 )
72 {
73 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz, ret = 0;
74
75 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..useDTXcxx . . $ $anonymous_type_c9846ade8c67dd67_7#useDTX. = encControl->useDTXcxx . . $ $anonymous_type_1138ce94d7cabe34_0#useDTX.;
76 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..useCBRcxx . . $ $anonymous_type_c9846ade8c67dd67_7#useCBR. = encControl->useCBRcxx . . $ $anonymous_type_1138ce94d7cabe34_0#useCBR.;
77 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz. = encControl->API_sampleRatecxx . . $ $anonymous_type_1138ce94d7cabe34_0#API_sampleRate.;
78 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..maxInternal_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#maxInternal_fs_Hz. = encControl->maxInternalSampleRatecxx . . $ $anonymous_type_1138ce94d7cabe34_0#maxInternalSampleRate.;
79 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..minInternal_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#minInternal_fs_Hz. = encControl->minInternalSampleRatecxx . . $ $anonymous_type_1138ce94d7cabe34_0#minInternalSampleRate.;
80 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..desiredInternal_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#desiredInternal_fs_Hz. = encControl->desiredInternalSampleRatecxx . . $ $anonymous_type_1138ce94d7cabe34_0#desiredInternalSampleRate.;
81 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..useInBandFECcxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInBandFEC. = encControl->useInBandFECcxx . . $ $anonymous_type_1138ce94d7cabe34_0#useInBandFEC.;
82 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nChannelsAPIcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nChannelsAPI. = encControl->nChannelsAPIcxx . . $ $anonymous_type_1138ce94d7cabe34_0#nChannelsAPI.;
83 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nChannelsInternalcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nChannelsInternal. = encControl->nChannelsInternalcxx . . $ $anonymous_type_1138ce94d7cabe34_0#nChannelsInternal.;
84 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..allow_bandwidth_switchcxx . . $ $anonymous_type_c9846ade8c67dd67_7#allow_bandwidth_switch. = allow_bw_switch;
85 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..channelNbcxx . . $ $anonymous_type_c9846ade8c67dd67_7#channelNb. = channelNb;
86
87 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..controlled_since_last_payloadcxx . . $ $anonymous_type_c9846ade8c67dd67_7#controlled_since_last_payload. != 0 && psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..prefillFlagcxx . . $ $anonymous_type_c9846ade8c67dd67_7#prefillFlag. == 0 ) {
88 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz. != psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..prev_API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#prev_API_fs_Hz. && psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. > 0 ) {
89 /* Change in API sampling rate in the middle of encoding a packet */
90 ret += silk_setup_resamplerscxx . . $ silk_setup_resamplers(c9c7e39f6113ca69).( psEnc, psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. );
91 }
92 return ret;
93 }
94
95 /* Beyond this point we know that there are no previously coded frames in the payload buffer */
96
97 /********************************************/
98 /* Determine internal sampling rate */
99 /********************************************/
100 fs_kHz = silk_control_audio_bandwidthcxx . . $ silk_control_audio_bandwidth(b0d771aca2d848f1).( &psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn., encControl );
101 if( force_fs_kHz ) {
102 fs_kHz = force_fs_kHz;
103 }
104 /********************************************/
105 /* Prepare resampler and buffered data */
106 /********************************************/
107 ret += silk_setup_resamplerscxx . . $ silk_setup_resamplers(c9c7e39f6113ca69).( psEnc, fs_kHz );
108
109 /********************************************/
110 /* Set internal sampling frequency */
111 /********************************************/
112 ret += silk_setup_fscxx . . $ silk_setup_fs(380142a50498b17a).( psEnc, fs_kHz, encControl->payloadSize_mscxx . . $ $anonymous_type_1138ce94d7cabe34_0#payloadSize_ms. );
113
114 /********************************************/
115 /* Set encoding complexity */
116 /********************************************/
117 ret += silk_setup_complexitycxx . . $ silk_setup_complexity(99ece60f02e4a8bb).( &psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn., encControl->complexitycxx . . $ $anonymous_type_1138ce94d7cabe34_0#complexity. );
118
119 /********************************************/
120 /* Set packet loss rate measured by farend */
121 /********************************************/
122 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..PacketLoss_perccxx . . $ $anonymous_type_c9846ade8c67dd67_7#PacketLoss_perc. = encControl->packetLossPercentagecxx . . $ $anonymous_type_1138ce94d7cabe34_0#packetLossPercentage.;
123
124 /********************************************/
125 /* Set LBRR usage */
126 /********************************************/
127 ret += silk_setup_LBRRcxx . . $ silk_setup_LBRR(b3f2c44f127be241).( &psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn., encControl );
128
129 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..controlled_since_last_payloadcxx . . $ $anonymous_type_c9846ade8c67dd67_7#controlled_since_last_payload. = 1;
130
131 return ret;
132 }
133
134 static opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_resamplerscxx . . $ silk_setup_resamplers(c9c7e39f6113ca69).(
135 silk_encoder_state_Fxxcxx . . $ `external/opusfile/opus/silk/control_codec.c:36:9`! *psEnc, /* I/O */
136 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz /* I */
137 )
138 {
139 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! ret = SILK_NO_ERRORcxx . . $ `external/opusfile/opus/silk/errors.h:39:9`!;
140 SAVE_STACKcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:96:9`!;
141
142 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. != fs_kHz || psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..prev_API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#prev_API_fs_Hz. != psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz. )
143 {
144 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 0 ) {
145 /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
146 ret += silk_resampler_initcxx . . $ silk_resampler_init(68d7c96219bffefa).( &psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..resampler_statecxx . . $ $anonymous_type_c9846ade8c67dd67_7#resampler_state., psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz., fs_kHz * 1000, 1 );
147 } else {
148 VARDECLcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:94:9`!( opus_int16, x_buf_API_fs_Hz );
149 VARDECLcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:94:9`!( silk_resampler_state_struct, temp_resampler_state );
150 #ifdef FIXED_POINT
151 opus_int16 *x_bufFIX = psEnc->x_buf;
152 #else
153 VARDECLcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:94:9`!( opus_int16, x_bufFIX );
154 opus_int32cxx . . $ opus_int32# new_buf_samples;
155 #endif
156 opus_int32cxx . . $ opus_int32# api_buf_samples;
157 opus_int32cxx . . $ opus_int32# old_buf_samples;
158 opus_int32cxx . . $ opus_int32# buf_length_ms;
159
160 buf_length_ms = silk_LSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:505:9`!( psEnc->sCmn.nb_subfr * 5, 1 ) + LA_SHAPE_MScxx . . $ `external/opusfile/opus/silk/define.h:112:9`!;
161 old_buf_samples = buf_length_ms * psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
162
163 #ifndef FIXED_POINT
164 new_buf_samples = buf_length_ms * fs_kHz;
165 ALLOCcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:95:9`!( x_bufFIX, silk_maxcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:540:9`!( old_buf_samples, new_buf_samples ),
166 opus_int16 );
167 silk_float2short_arraycxx . . $ silk_float2short_array(ed90014d4b5d0971).( x_bufFIX, psEnc->x_bufcxx . . $ $anonymous_type_f1d9da68e5821ba3_1#x_buf., old_buf_samples );
168 #endif
169
170 /* Initialize resampler for temporary resampling of x_buf data to API_fs_Hz */
171 ALLOCcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:95:9`!( temp_resampler_state, 1, silk_resampler_state_struct );
172 ret += silk_resampler_initcxx . . $ silk_resampler_init(68d7c96219bffefa).( temp_resampler_state, silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( psEnc->sCmn.fs_kHz, 1000 ), psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz., 0 );
173
174 /* Calculate number of samples to temporarily upsample */
175 api_buf_samples = buf_length_ms * silk_DIV32_16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:460:9`!( psEnc->sCmn.API_fs_Hz, 1000 );
176
177 /* Temporary resampling of x_buf data to API_fs_Hz */
178 ALLOCcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:95:9`!( x_buf_API_fs_Hz, api_buf_samples, opus_int16 );
179 ret += silk_resamplercxx . . $ silk_resampler(35bad50a08f43124).( temp_resampler_state, x_buf_API_fs_Hz, x_bufFIX, old_buf_samples );
180
181 /* Initialize the resampler for enc_API.c preparing resampling from API_fs_Hz to fs_kHz */
182 ret += silk_resampler_initcxx . . $ silk_resampler_init(68d7c96219bffefa).( &psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..resampler_statecxx . . $ $anonymous_type_c9846ade8c67dd67_7#resampler_state., psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz., silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( fs_kHz, 1000 ), 1 );
183
184 /* Correct resampler state by resampling buffered data from API_fs_Hz to fs_kHz */
185 ret += silk_resamplercxx . . $ silk_resampler(35bad50a08f43124).( &psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..resampler_statecxx . . $ $anonymous_type_c9846ade8c67dd67_7#resampler_state., x_bufFIX, x_buf_API_fs_Hz, api_buf_samples );
186
187 #ifndef FIXED_POINT
188 silk_short2float_arraycxx . . $ silk_short2float_array(18833b0d715537a5).( psEnc->x_bufcxx . . $ $anonymous_type_f1d9da68e5821ba3_1#x_buf., x_bufFIX, new_buf_samples);
189 #endif
190 }
191 }
192
193 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..prev_API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#prev_API_fs_Hz. = psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..API_fs_Hzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#API_fs_Hz.;
194
195 RESTORE_STACKcxx . . $ `external/opusfile/opus/celt/stack_alloc.h:97:9`!;
196 return ret;
197 }
198
199 static opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_fscxx . . $ silk_setup_fs(380142a50498b17a).(
200 silk_encoder_state_Fxxcxx . . $ `external/opusfile/opus/silk/control_codec.c:36:9`! *psEnc, /* I/O */
201 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz, /* I */
202 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! PacketSize_ms /* I */
203 )
204 {
205 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! ret = SILK_NO_ERRORcxx . . $ `external/opusfile/opus/silk/errors.h:39:9`!;
206
207 /* Set packet size */
208 if( PacketSize_ms != psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..PacketSize_mscxx . . $ $anonymous_type_c9846ade8c67dd67_7#PacketSize_ms. ) {
209 if( ( PacketSize_ms != 10 ) &&
210 ( PacketSize_ms != 20 ) &&
211 ( PacketSize_ms != 40 ) &&
212 ( PacketSize_ms != 60 ) ) {
213 ret = SILK_ENC_PACKET_SIZE_NOT_SUPPORTEDcxx . . $ `external/opusfile/opus/silk/errors.h:52:9`!;
214 }
215 if( PacketSize_ms <= 10 ) {
216 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nFramesPerPacketcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nFramesPerPacket. = 1;
217 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nb_subfrcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nb_subfr. = PacketSize_ms == 10 ? 2 : 1;
218 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..frame_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#frame_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( PacketSize_ms, fs_kHz );
219 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_LPC_win_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_LPC_win_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( FIND_PITCH_LPC_WIN_MS_2_SFcxx . . $ `external/opusfile/opus/silk/define.h:108:9`!, fs_kHz );
220 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 8 ) {
221 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_10_ms_NB_iCDFcxx . . $ silk_pitch_contour_10_ms_NB_iCDF.;
222 } else {
223 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_10_ms_iCDFcxx . . $ silk_pitch_contour_10_ms_iCDF.;
224 }
225 } else {
226 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nFramesPerPacketcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nFramesPerPacket. = silk_DIV32_16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:460:9`!( PacketSize_ms, MAX_FRAME_LENGTH_MScxx . . $ `external/opusfile/opus/silk/define.h:96:9`! );
227 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nb_subfrcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nb_subfr. = MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`!;
228 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..frame_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#frame_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( 20, fs_kHz );
229 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_LPC_win_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_LPC_win_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( FIND_PITCH_LPC_WIN_MScxx . . $ `external/opusfile/opus/silk/define.h:107:9`!, fs_kHz );
230 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 8 ) {
231 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_NB_iCDFcxx . . $ silk_pitch_contour_NB_iCDF.;
232 } else {
233 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_iCDFcxx . . $ silk_pitch_contour_iCDF.;
234 }
235 }
236 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..PacketSize_mscxx . . $ $anonymous_type_c9846ade8c67dd67_7#PacketSize_ms. = PacketSize_ms;
237 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..TargetRate_bpscxx . . $ $anonymous_type_c9846ade8c67dd67_7#TargetRate_bps. = 0; /* trigger new SNR computation */
238 }
239
240 /* Set internal sampling frequency */
241 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( fs_kHz == 8 || fs_kHz == 12 || fs_kHz == 16 );
242 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEnc->sCmn.nb_subfr == 2 || psEnc->sCmn.nb_subfr == 4 );
243 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. != fs_kHz ) {
244 /* reset part of the state */
245 silk_memsetcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:421:9`!( &psEnc->sShape, 0, sizeof( psEnc->sShape ) );
246 silk_memsetcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:421:9`!( &psEnc->sCmn.sNSQ, 0, sizeof( psEnc->sCmn.sNSQ ) );
247 silk_memsetcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:421:9`!( psEnc->sCmn.prev_NLSFq_Q15, 0, sizeof( psEnc->sCmn.prev_NLSFq_Q15 ) );
248 silk_memsetcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:421:9`!( &psEnc->sCmn.sLP.In_LP_State, 0, sizeof( psEnc->sCmn.sLP.In_LP_State ) );
249 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..inputBufIxcxx . . $ $anonymous_type_c9846ade8c67dd67_7#inputBufIx. = 0;
250 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nFramesEncodedcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nFramesEncoded. = 0;
251 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..TargetRate_bpscxx . . $ $anonymous_type_c9846ade8c67dd67_7#TargetRate_bps. = 0; /* trigger new SNR computation */
252
253 /* Initialize non-zero parameters */
254 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..prevLagcxx . . $ $anonymous_type_c9846ade8c67dd67_7#prevLag. = 100;
255 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..first_frame_after_resetcxx . . $ $anonymous_type_c9846ade8c67dd67_7#first_frame_after_reset. = 1;
256 psEnc->sShapecxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sShape..LastGainIndexcxx . . $ $anonymous_type_f1d9da68e5821ba3_0#LastGainIndex. = 10;
257 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..sNSQcxx . . $ $anonymous_type_c9846ade8c67dd67_7#sNSQ..lagPrevcxx . . $ $anonymous_type_c9846ade8c67dd67_0#lagPrev. = 100;
258 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..sNSQcxx . . $ $anonymous_type_c9846ade8c67dd67_7#sNSQ..prev_gain_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_0#prev_gain_Q16. = 65536;
259 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..prevSignalTypecxx . . $ $anonymous_type_c9846ade8c67dd67_7#prevSignalType. = TYPE_NO_VOICE_ACTIVITYcxx . . $ `external/opusfile/opus/silk/define.h:70:9`!;
260
261 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. = fs_kHz;
262 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 8 ) {
263 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nb_subfrcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nb_subfr. == MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ) {
264 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_NB_iCDFcxx . . $ silk_pitch_contour_NB_iCDF.;
265 } else {
266 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_10_ms_NB_iCDFcxx . . $ silk_pitch_contour_10_ms_NB_iCDF.;
267 }
268 } else {
269 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nb_subfrcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nb_subfr. == MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ) {
270 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_iCDFcxx . . $ silk_pitch_contour_iCDF.;
271 } else {
272 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_contour_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_contour_iCDF. = silk_pitch_contour_10_ms_iCDFcxx . . $ silk_pitch_contour_10_ms_iCDF.;
273 }
274 }
275 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 8 || psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 12 ) {
276 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..predictLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#predictLPCOrder. = MIN_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:143:9`!;
277 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..psNLSF_CBcxx . . $ $anonymous_type_c9846ade8c67dd67_7#psNLSF_CB. = &silk_NLSF_CB_NB_MBcxx . . $ silk_NLSF_CB_NB_MB.;
278 } else {
279 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..predictLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#predictLPCOrder. = MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`!;
280 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..psNLSF_CBcxx . . $ $anonymous_type_c9846ade8c67dd67_7#psNLSF_CB. = &silk_NLSF_CB_WBcxx . . $ silk_NLSF_CB_WB.;
281 }
282 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..subfr_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#subfr_length. = SUB_FRAME_LENGTH_MScxx . . $ `external/opusfile/opus/silk/define.h:94:9`! * fs_kHz;
283 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..frame_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#frame_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr );
284 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..ltp_mem_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#ltp_mem_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( LTP_MEM_LENGTH_MScxx . . $ `external/opusfile/opus/silk/define.h:93:9`!, fs_kHz );
285 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..la_pitchcxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_pitch. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( LA_PITCH_MScxx . . $ `external/opusfile/opus/silk/define.h:100:9`!, fs_kHz );
286 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..max_pitch_lagcxx . . $ $anonymous_type_c9846ade8c67dd67_7#max_pitch_lag. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( 18, fs_kHz );
287 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..nb_subfrcxx . . $ $anonymous_type_c9846ade8c67dd67_7#nb_subfr. == MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ) {
288 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_LPC_win_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_LPC_win_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( FIND_PITCH_LPC_WIN_MScxx . . $ `external/opusfile/opus/silk/define.h:107:9`!, fs_kHz );
289 } else {
290 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_LPC_win_lengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_LPC_win_length. = silk_SMULBBcxx . . $ `external/opusfile/opus/silk/macros.h:70:9`!( FIND_PITCH_LPC_WIN_MS_2_SFcxx . . $ `external/opusfile/opus/silk/define.h:108:9`!, fs_kHz );
291 }
292 if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 16 ) {
293 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_lag_low_bits_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_lag_low_bits_iCDF. = silk_uniform8_iCDFcxx . . $ silk_uniform8_iCDF.;
294 } else if( psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. == 12 ) {
295 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_lag_low_bits_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_lag_low_bits_iCDF. = silk_uniform6_iCDFcxx . . $ silk_uniform6_iCDF.;
296 } else {
297 psEnc->sCmncxx . . $ $anonymous_type_f1d9da68e5821ba3_1#sCmn..pitch_lag_low_bits_iCDFcxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitch_lag_low_bits_iCDF. = silk_uniform4_iCDFcxx . . $ silk_uniform4_iCDF.;
298 }
299 }
300
301 /* Check that settings are valid */
302 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length );
303
304 return ret;
305 }
306
307 static opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_complexitycxx . . $ silk_setup_complexity(99ece60f02e4a8bb).(
308 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O */
309 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Complexity /* I */
310 )
311 {
312 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! ret = 0;
313
314 /* Set encoding complexity */
315 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( Complexity >= 0 && Complexity <= 10 );
316 if( Complexity < 1 ) {
317 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MIN_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:72:9`!;
318 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.8, 16 );
319 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 6;
320 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 12;
321 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 3 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
322 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = 1;
323 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 0;
324 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 2;
325 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = 0;
326 } else if( Complexity < 2 ) {
327 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MID_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:73:9`!;
328 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.76, 16 );
329 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 8;
330 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 14;
331 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 5 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
332 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = 1;
333 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 0;
334 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 3;
335 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = 0;
336 } else if( Complexity < 3 ) {
337 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MIN_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:72:9`!;
338 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.8, 16 );
339 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 6;
340 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 12;
341 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 3 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
342 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = 2;
343 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 0;
344 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 2;
345 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = 0;
346 } else if( Complexity < 4 ) {
347 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MID_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:73:9`!;
348 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.76, 16 );
349 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 8;
350 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 14;
351 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 5 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
352 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = 2;
353 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 0;
354 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 4;
355 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = 0;
356 } else if( Complexity < 6 ) {
357 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MID_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:73:9`!;
358 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.74, 16 );
359 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 10;
360 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 16;
361 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 5 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
362 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = 2;
363 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 1;
364 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 6;
365 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. * SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( WARPING_MULTIPLIERcxx . . $ `external/opusfile/opus/silk/tuning_parameters.h:102:9`!, 16 );
366 } else if( Complexity < 8 ) {
367 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MID_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:73:9`!;
368 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.72, 16 );
369 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 12;
370 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 20;
371 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 5 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
372 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = 3;
373 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 1;
374 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 8;
375 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. * SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( WARPING_MULTIPLIERcxx . . $ `external/opusfile/opus/silk/tuning_parameters.h:102:9`!, 16 );
376 } else {
377 psEncC->pitchEstimationComplexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationComplexity. = SILK_PE_MAX_COMPLEXcxx . . $ `external/opusfile/opus/silk/pitch_est_defines.h:74:9`!;
378 psEncC->pitchEstimationThreshold_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationThreshold_Q16. = SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.7, 16 );
379 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = 16;
380 psEncC->shapingLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapingLPCOrder. = 24;
381 psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape. = 5 * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz.;
382 psEncC->nStatesDelayedDecisioncxx . . $ $anonymous_type_c9846ade8c67dd67_7#nStatesDelayedDecision. = MAX_DEL_DEC_STATEScxx . . $ `external/opusfile/opus/silk/define.h:160:9`!;
383 psEncC->useInterpolatedNLSFscxx . . $ $anonymous_type_c9846ade8c67dd67_7#useInterpolatedNLSFs. = 1;
384 psEncC->NLSF_MSVQ_Survivorscxx . . $ $anonymous_type_c9846ade8c67dd67_7#NLSF_MSVQ_Survivors. = 16;
385 psEncC->warping_Q16cxx . . $ $anonymous_type_c9846ade8c67dd67_7#warping_Q16. = psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. * SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( WARPING_MULTIPLIERcxx . . $ `external/opusfile/opus/silk/tuning_parameters.h:102:9`!, 16 );
386 }
387
388 /* Do not allow higher pitch estimation LPC order than predict LPC order */
389 psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder. = silk_min_intcxx . . $ silk_min_int(9b79fb6aee4c0440).( psEncC->pitchEstimationLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#pitchEstimationLPCOrder., psEncC->predictLPCOrdercxx . . $ $anonymous_type_c9846ade8c67dd67_7#predictLPCOrder. );
390 psEncC->shapeWinLengthcxx . . $ $anonymous_type_c9846ade8c67dd67_7#shapeWinLength. = SUB_FRAME_LENGTH_MScxx . . $ `external/opusfile/opus/silk/define.h:94:9`! * psEncC->fs_kHzcxx . . $ $anonymous_type_c9846ade8c67dd67_7#fs_kHz. + 2 * psEncC->la_shapecxx . . $ $anonymous_type_c9846ade8c67dd67_7#la_shape.;
391 psEncC->Complexitycxx . . $ $anonymous_type_c9846ade8c67dd67_7#Complexity. = Complexity;
392
393 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEncC->pitchEstimationLPCOrder <= MAX_FIND_PITCH_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:104:9`! );
394 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEncC->shapingLPCOrder <= MAX_SHAPE_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:155:9`! );
395 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEncC->nStatesDelayedDecision <= MAX_DEL_DEC_STATEScxx . . $ `external/opusfile/opus/silk/define.h:160:9`! );
396 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEncC->warping_Q16 <= 32767 );
397 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEncC->la_shape <= LA_SHAPE_MAXcxx . . $ `external/opusfile/opus/silk/define.h:113:9`! );
398 celt_assertcxx . . $ `external/opusfile/opus/celt/arch.h:80:9`!( psEncC->shapeWinLength <= SHAPE_LPC_WIN_MAXcxx . . $ `external/opusfile/opus/silk/define.h:116:9`! );
399
400 return ret;
401 }
402
403 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_setup_LBRRcxx . . $ silk_setup_LBRR(b3f2c44f127be241).(
404 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O */
405 const silk_EncControlStructcxx . . $ silk_EncControlStruct# *encControl /* I */
406 )
407 {
408 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! LBRR_in_previous_packet, ret = SILK_NO_ERRORcxx . . $ `external/opusfile/opus/silk/errors.h:39:9`!;
409
410 LBRR_in_previous_packet = psEncC->LBRR_enabledcxx . . $ $anonymous_type_c9846ade8c67dd67_7#LBRR_enabled.;
411 psEncC->LBRR_enabledcxx . . $ $anonymous_type_c9846ade8c67dd67_7#LBRR_enabled. = encControl->LBRR_codedcxx . . $ $anonymous_type_1138ce94d7cabe34_0#LBRR_coded.;
412 if( psEncC->LBRR_enabledcxx . . $ $anonymous_type_c9846ade8c67dd67_7#LBRR_enabled. ) {
413 /* Set gain increase for coding LBRR excitation */
414 if( LBRR_in_previous_packet == 0 ) {
415 /* Previous packet did not have LBRR, and was therefore coded at a higher bitrate */
416 psEncC->LBRR_GainIncreasescxx . . $ $anonymous_type_c9846ade8c67dd67_7#LBRR_GainIncreases. = 7;
417 } else {
418 psEncC->LBRR_GainIncreasescxx . . $ $anonymous_type_c9846ade8c67dd67_7#LBRR_GainIncreases. = silk_max_intcxx . . $ silk_max_int(9b79fb6aee4c0440).( 7 - silk_SMULWBcxx . . $ `external/opusfile/opus/silk/macros.h:43:9`!( (opus_int32)psEncC->PacketLoss_perc, SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( 0.4, 16 ) ), 2 );
419 }
420 }
421
422 return ret;
423 }