• Home
  • Raw
  • Download

Lines Matching refs:psEnc

43     silk_encoder_state_Fxx          *psEnc,             /* I/O                      */
48 silk_encoder_state_Fxx *psEnc, /* I/O */
66 …silk_encoder_state_Fxx *psEnc, /* I/O Pointer to Silk en… in silk_control_encoder() argument
75 psEnc->sCmn.useDTX = encControl->useDTX; in silk_control_encoder()
76 psEnc->sCmn.useCBR = encControl->useCBR; in silk_control_encoder()
77 psEnc->sCmn.API_fs_Hz = encControl->API_sampleRate; in silk_control_encoder()
78 psEnc->sCmn.maxInternal_fs_Hz = encControl->maxInternalSampleRate; in silk_control_encoder()
79 psEnc->sCmn.minInternal_fs_Hz = encControl->minInternalSampleRate; in silk_control_encoder()
80 psEnc->sCmn.desiredInternal_fs_Hz = encControl->desiredInternalSampleRate; in silk_control_encoder()
81 psEnc->sCmn.useInBandFEC = encControl->useInBandFEC; in silk_control_encoder()
82 psEnc->sCmn.nChannelsAPI = encControl->nChannelsAPI; in silk_control_encoder()
83 psEnc->sCmn.nChannelsInternal = encControl->nChannelsInternal; in silk_control_encoder()
84 psEnc->sCmn.allow_bandwidth_switch = allow_bw_switch; in silk_control_encoder()
85 psEnc->sCmn.channelNb = channelNb; in silk_control_encoder()
87 if( psEnc->sCmn.controlled_since_last_payload != 0 && psEnc->sCmn.prefillFlag == 0 ) { in silk_control_encoder()
88 if( psEnc->sCmn.API_fs_Hz != psEnc->sCmn.prev_API_fs_Hz && psEnc->sCmn.fs_kHz > 0 ) { in silk_control_encoder()
90 ret += silk_setup_resamplers( psEnc, psEnc->sCmn.fs_kHz ); in silk_control_encoder()
100 fs_kHz = silk_control_audio_bandwidth( &psEnc->sCmn, encControl ); in silk_control_encoder()
107 ret += silk_setup_resamplers( psEnc, fs_kHz ); in silk_control_encoder()
112 ret += silk_setup_fs( psEnc, fs_kHz, encControl->payloadSize_ms ); in silk_control_encoder()
117 ret += silk_setup_complexity( &psEnc->sCmn, encControl->complexity ); in silk_control_encoder()
122 psEnc->sCmn.PacketLoss_perc = encControl->packetLossPercentage; in silk_control_encoder()
127 ret += silk_setup_LBRR( &psEnc->sCmn, encControl ); in silk_control_encoder()
129 psEnc->sCmn.controlled_since_last_payload = 1; in silk_control_encoder()
135 silk_encoder_state_Fxx *psEnc, /* I/O */ in silk_setup_resamplers() argument
142 if( psEnc->sCmn.fs_kHz != fs_kHz || psEnc->sCmn.prev_API_fs_Hz != psEnc->sCmn.API_fs_Hz ) in silk_setup_resamplers()
144 if( psEnc->sCmn.fs_kHz == 0 ) { in silk_setup_resamplers()
146 …ret += silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, fs_kHz * 1000, 1 … in silk_setup_resamplers()
151 opus_int16 *x_bufFIX = psEnc->x_buf; in silk_setup_resamplers()
160 buf_length_ms = silk_LSHIFT( psEnc->sCmn.nb_subfr * 5, 1 ) + LA_SHAPE_MS; in silk_setup_resamplers()
161 old_buf_samples = buf_length_ms * psEnc->sCmn.fs_kHz; in silk_setup_resamplers()
167 silk_float2short_array( x_bufFIX, psEnc->x_buf, old_buf_samples ); in silk_setup_resamplers()
172 … += silk_resampler_init( temp_resampler_state, silk_SMULBB( psEnc->sCmn.fs_kHz, 1000 ), psEnc->sCm… in silk_setup_resamplers()
175 api_buf_samples = buf_length_ms * silk_DIV32_16( psEnc->sCmn.API_fs_Hz, 1000 ); in silk_setup_resamplers()
182 …ret += silk_resampler_init( &psEnc->sCmn.resampler_state, psEnc->sCmn.API_fs_Hz, silk_SMULBB( fs_k… in silk_setup_resamplers()
185 … ret += silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, api_buf_samples ); in silk_setup_resamplers()
188 silk_short2float_array( psEnc->x_buf, x_bufFIX, new_buf_samples); in silk_setup_resamplers()
193 psEnc->sCmn.prev_API_fs_Hz = psEnc->sCmn.API_fs_Hz; in silk_setup_resamplers()
200 silk_encoder_state_Fxx *psEnc, /* I/O */ in silk_setup_fs() argument
208 if( PacketSize_ms != psEnc->sCmn.PacketSize_ms ) { in silk_setup_fs()
216 psEnc->sCmn.nFramesPerPacket = 1; in silk_setup_fs()
217 psEnc->sCmn.nb_subfr = PacketSize_ms == 10 ? 2 : 1; in silk_setup_fs()
218 psEnc->sCmn.frame_length = silk_SMULBB( PacketSize_ms, fs_kHz ); in silk_setup_fs()
219 psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz ); in silk_setup_fs()
220 if( psEnc->sCmn.fs_kHz == 8 ) { in silk_setup_fs()
221 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_NB_iCDF; in silk_setup_fs()
223 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_iCDF; in silk_setup_fs()
226 psEnc->sCmn.nFramesPerPacket = silk_DIV32_16( PacketSize_ms, MAX_FRAME_LENGTH_MS ); in silk_setup_fs()
227 psEnc->sCmn.nb_subfr = MAX_NB_SUBFR; in silk_setup_fs()
228 psEnc->sCmn.frame_length = silk_SMULBB( 20, fs_kHz ); in silk_setup_fs()
229 psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz ); in silk_setup_fs()
230 if( psEnc->sCmn.fs_kHz == 8 ) { in silk_setup_fs()
231 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_NB_iCDF; in silk_setup_fs()
233 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_iCDF; in silk_setup_fs()
236 psEnc->sCmn.PacketSize_ms = PacketSize_ms; in silk_setup_fs()
237 psEnc->sCmn.TargetRate_bps = 0; /* trigger new SNR computation */ in silk_setup_fs()
242 celt_assert( psEnc->sCmn.nb_subfr == 2 || psEnc->sCmn.nb_subfr == 4 ); in silk_setup_fs()
243 if( psEnc->sCmn.fs_kHz != fs_kHz ) { in silk_setup_fs()
245 silk_memset( &psEnc->sShape, 0, sizeof( psEnc->sShape ) ); in silk_setup_fs()
246 silk_memset( &psEnc->sCmn.sNSQ, 0, sizeof( psEnc->sCmn.sNSQ ) ); in silk_setup_fs()
247 silk_memset( psEnc->sCmn.prev_NLSFq_Q15, 0, sizeof( psEnc->sCmn.prev_NLSFq_Q15 ) ); in silk_setup_fs()
248 silk_memset( &psEnc->sCmn.sLP.In_LP_State, 0, sizeof( psEnc->sCmn.sLP.In_LP_State ) ); in silk_setup_fs()
249 psEnc->sCmn.inputBufIx = 0; in silk_setup_fs()
250 psEnc->sCmn.nFramesEncoded = 0; in silk_setup_fs()
251 psEnc->sCmn.TargetRate_bps = 0; /* trigger new SNR computation */ in silk_setup_fs()
254 psEnc->sCmn.prevLag = 100; in silk_setup_fs()
255 psEnc->sCmn.first_frame_after_reset = 1; in silk_setup_fs()
256 psEnc->sShape.LastGainIndex = 10; in silk_setup_fs()
257 psEnc->sCmn.sNSQ.lagPrev = 100; in silk_setup_fs()
258 psEnc->sCmn.sNSQ.prev_gain_Q16 = 65536; in silk_setup_fs()
259 psEnc->sCmn.prevSignalType = TYPE_NO_VOICE_ACTIVITY; in silk_setup_fs()
261 psEnc->sCmn.fs_kHz = fs_kHz; in silk_setup_fs()
262 if( psEnc->sCmn.fs_kHz == 8 ) { in silk_setup_fs()
263 if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ) { in silk_setup_fs()
264 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_NB_iCDF; in silk_setup_fs()
266 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_NB_iCDF; in silk_setup_fs()
269 if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ) { in silk_setup_fs()
270 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_iCDF; in silk_setup_fs()
272 psEnc->sCmn.pitch_contour_iCDF = silk_pitch_contour_10_ms_iCDF; in silk_setup_fs()
275 if( psEnc->sCmn.fs_kHz == 8 || psEnc->sCmn.fs_kHz == 12 ) { in silk_setup_fs()
276 psEnc->sCmn.predictLPCOrder = MIN_LPC_ORDER; in silk_setup_fs()
277 psEnc->sCmn.psNLSF_CB = &silk_NLSF_CB_NB_MB; in silk_setup_fs()
279 psEnc->sCmn.predictLPCOrder = MAX_LPC_ORDER; in silk_setup_fs()
280 psEnc->sCmn.psNLSF_CB = &silk_NLSF_CB_WB; in silk_setup_fs()
282 psEnc->sCmn.subfr_length = SUB_FRAME_LENGTH_MS * fs_kHz; in silk_setup_fs()
283 psEnc->sCmn.frame_length = silk_SMULBB( psEnc->sCmn.subfr_length, psEnc->sCmn.nb_subfr ); in silk_setup_fs()
284 psEnc->sCmn.ltp_mem_length = silk_SMULBB( LTP_MEM_LENGTH_MS, fs_kHz ); in silk_setup_fs()
285 psEnc->sCmn.la_pitch = silk_SMULBB( LA_PITCH_MS, fs_kHz ); in silk_setup_fs()
286 psEnc->sCmn.max_pitch_lag = silk_SMULBB( 18, fs_kHz ); in silk_setup_fs()
287 if( psEnc->sCmn.nb_subfr == MAX_NB_SUBFR ) { in silk_setup_fs()
288 psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS, fs_kHz ); in silk_setup_fs()
290 psEnc->sCmn.pitch_LPC_win_length = silk_SMULBB( FIND_PITCH_LPC_WIN_MS_2_SF, fs_kHz ); in silk_setup_fs()
292 if( psEnc->sCmn.fs_kHz == 16 ) { in silk_setup_fs()
293 psEnc->sCmn.pitch_lag_low_bits_iCDF = silk_uniform8_iCDF; in silk_setup_fs()
294 } else if( psEnc->sCmn.fs_kHz == 12 ) { in silk_setup_fs()
295 psEnc->sCmn.pitch_lag_low_bits_iCDF = silk_uniform6_iCDF; in silk_setup_fs()
297 psEnc->sCmn.pitch_lag_low_bits_iCDF = silk_uniform4_iCDF; in silk_setup_fs()
302 celt_assert( ( psEnc->sCmn.subfr_length * psEnc->sCmn.nb_subfr ) == psEnc->sCmn.frame_length ); in silk_setup_fs()