Home | History | Annotate | Download | only in src

Lines Matching refs:Fs

75     opus_int32   Fs;
164 int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int application)
171 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||
189 st->Fs = Fs;
199 st->silk_mode.API_sampleRate = st->Fs;
214 err = celt_encoder_init(celt_enc, Fs, channels, st->arch);
224 st->bitrate_bps = 3000+Fs*channels;
232 st->encoder_buffer = st->Fs/100;
238 st->delay_compensation = st->Fs/250;
326 static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs)
332 Fc_Q19 = silk_DIV32_16( silk_SMULBB( SILK_FIX_CONST( 1.5 * 3.14159 / 1000, 19 ), cutoff_Hz ), Fs/1000 );
362 static void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs)
367 /* Approximates -round(log2(4.*cutoff_Hz/Fs)) */
368 shift=celt_ilog2(Fs/(cutoff_Hz*3));
387 static void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs)
392 coef = 4.0f*cutoff_Hz/Fs;
412 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
417 inc = 48000/Fs;
444 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
450 inc = 48000/Fs;
482 OpusEncoder *opus_encoder_create(opus_int32 Fs, int channels, int application, int *error)
486 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||
501 ret = opus_encoder_init(st, Fs
514 if(!frame_size)frame_size=st->Fs/400;
516 return 60*st->Fs/frame_size + st->Fs*st->channels;
518 return max_data_bytes*8*st->Fs/frame_size;
657 static int optimize_framesize(const void *x, int len, int C, opus_int32 Fs,
672 subframe = Fs/400;
807 opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs)
810 if (frame_size<Fs/400)
815 new_size = Fs/50;
817 new_size = IMIN(3*Fs/50, (Fs/400)<<(variable_duration-OPUS_FRAMESIZE_2_5_MS));
822 if (400*new_size!=Fs && 200*new_size!=Fs && 100*new_size!=Fs &&
823 50*new_size!=Fs && 25*new_size!=Fs && 50*new_size!=3*Fs)
829 int variable_duration, int C, opus_int32 Fs, int bitrate_bps,
837 if (variable_duration == OPUS_FRAMESIZE_VARIABLE && frame_size >= Fs/200)
840 LM = optimize_framesize(analysis_pcm, frame_size, C, Fs, bitrate_bps,
842 while ((Fs/400<<LM)>frame_size)
844 frame_size = (Fs/400<<LM);
854 frame_size = frame_size_select(frame_size, variable_duration, Fs);
861 opus_val16 compute_stereo_width(const opus_val16 *pcm, int frame_size, opus_int32 Fs, StereoWidthState *mem)
870 frame_rate = Fs/frame_size;
982 if ((!st->variable_duration && 400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs &&
983 50*frame_size != st->Fs && 25*frame_size != st->Fs && 50*frame_size != 3*st->Fs)
984 || (400*frame_size < st->Fs)
1004 if (st->silk_mode.complexity >= 10 && st->Fs==48000)
1006 if (st->silk_mode.complexity >= 7 && st->Fs==48000)
1012 c1, c2, analysis_channels, st->Fs,
1045 stereo_width = compute_stereo_width(pcm, frame_size, st->Fs, &st->width_mem);
1051 frame_rate = st->Fs/frame_size;
1056 int frame_rate3 = 3*st->Fs/frame_size;
1094 equiv_rate = st->bitrate_bps - (40*st->channels+20)*(st->Fs/frame_size - 50);
1135 equiv_rate = st->bitrate_bps - (40*st->stream_channels+20)*(st->Fs/frame_size - 50);
1193 if (st->mode != MODE_CELT_ONLY && frame_size < st->Fs/100)
1198 if (max_data_bytes < (frame_rate > 50 ? 12000 : 8000)*frame_size / (st->Fs * 8))
1220 if (frame_size >= st->Fs/100)
1241 redundancy_bytes = IMIN(257, max_data_bytes*(opus_int32)(st->Fs/200)/(frame_size+st->Fs/200));
1320 if (st->Fs <= 24000 && st->bandwidth > OPUS_BANDWIDTH_SUPERWIDEBAND)
1322 if (st->Fs <= 16000 && st->bandwidth > OPUS_BANDWIDTH_WIDEBAND)
1324 if (st->Fs <= 12000 && st->bandwidth > OPUS_BANDWIDTH_MEDIUMBAND)
1326 if (st->Fs <= 8000 && st->bandwidth > OPUS_BANDWIDTH_NARROWBAND)
1361 if (frame_size > st->Fs/50 && (st->mode == MODE_CELT_ONLY || st->bandwidth > OPUS_BANDWIDTH_WIDEBAND))
1378 nb_frames = frame_size > st->Fs/25 ? 3 : 2;
1406 tmp_len = opus_encode_native(st, pcm+i*(st->channels*st->Fs/50), st->Fs/50,
1448 bytes_target = IMIN(max_data_bytes-redundancy_bytes, st->bitrate_bps * frame_size / (st->Fs * 8)) - 1;
1470 hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);
1472 dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);
1507 st->silk_mode.bitRate = st->stream_channels * ( 5000 + 1000 * ( st->Fs == 100 * frame_size ) );
1572 bytes_target += rate_offset * frame_size / (8 * st->Fs);
1575 st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs;
1624 st->silk_mode.maxBits = (st->silk_mode.bitRate * frame_size / (st->Fs * 8))*8;
1639 prefill_offset = st->channels*(st->encoder_buffer-st->delay_compensation-st->Fs/400);
1641 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs);
1668 data[-1] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);
1736 nb_compr_bytes = len + bytes_target - (st->silk_mode.bitRate * frame_size) / (8 * st->Fs);
1746 if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != st->Fs/50)
1748 bonus = (60*st->stream_channels+40)*(st->Fs/frame_size-50);
1766 ALLOC(tmp_prefill, st->channels*st->Fs/400, opus_val16);
1769 OPUS_COPY(tmp_prefill, &st->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels], st->channels*st->Fs/400);
1785 st->prev_HB_gain, HB_gain, celt_mode->overlap, frame_size, st->channels, celt_mode->window, st->Fs);
1804 frame_size, st->channels, celt_mode->window, st->Fs);
1861 err = celt_encode_with_ec(celt_enc, pcm_buf, st->Fs/200, data+nb_compr_bytes, redundancy_bytes, NULL);
1881 Fs/400, dummy, 2, NULL);
1902 N2 = st->Fs/200;
1903 N4 = st->Fs/400;
1925 data[0] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);
1993 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
2017 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
2042 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
2064 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
2377 *value = st->Fs/400;
2389 *value = st->Fs;