Home | History | Annotate | Download | only in src

Lines Matching defs:Fs

74     opus_int32   Fs;
162 int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int application)
169 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||
187 st->Fs = Fs;
197 st->silk_mode.API_sampleRate = st->Fs;
212 err = celt_encoder_init(celt_enc, Fs, channels, st->arch);
222 st->bitrate_bps = 3000+Fs*channels;
230 st->encoder_buffer = st->Fs/100;
236 st->delay_compensation = st->Fs/250;
320 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)
326 Fc_Q19 = silk_DIV32_16( silk_SMULBB( SILK_FIX_CONST( 1.5 * 3.14159 / 1000, 19 ), cutoff_Hz ), Fs/1000 );
356 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)
361 /* Approximates -round(log2(4.*cutoff_Hz/Fs)) */
362 shift=celt_ilog2(Fs/(cutoff_Hz*3));
381 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)
386 coef = 4.0f*cutoff_Hz/Fs;
406 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
411 inc = 48000/Fs;
438 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
444 inc = 48000/Fs;
476 OpusEncoder *opus_encoder_create(opus_int32 Fs, int channels, int application, int *error)
480 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)||
495 ret = opus_encoder_init(st, Fs, channels, application);
508 if(!frame_size)frame_size=st->Fs/400;
510 return 60*st->Fs/frame_size + st->Fs*st->channels;
512 return max_data_bytes*8*st->Fs/frame_size;
651 int optimize_framesize(const opus_val16 *x, int len, int C, opus_int32 Fs,
665 subframe = Fs/400;
800 opus_int32 frame_size_select(opus_int32 frame_size, int variable_duration, opus_int32 Fs)
803 if (frame_size<Fs/400)
808 new_size = Fs/50;
810 new_size = IMIN(3*Fs/50, (Fs/400)<<(variable_duration-OPUS_FRAMESIZE_2_5_MS));
815 if (400*new_size!=Fs && 200*new_size!=Fs && 100*new_size!=Fs &&
816 50*new_size!=Fs && 25*new_size!=Fs && 50*new_size!=3*Fs)
822 int variable_duration, int C, opus_int32 Fs, int bitrate_bps,
830 if (variable_duration == OPUS_FRAMESIZE_VARIABLE && frame_size >= Fs/200)
833 LM = optimize_framesize(analysis_pcm, frame_size, C, Fs, bitrate_bps,
835 while ((Fs/400<<LM)>frame_size)
837 frame_size = (Fs/400<<LM);
841 frame_size = frame_size_select(frame_size, variable_duration, Fs);
848 opus_val16 compute_stereo_width(const opus_val16 *pcm, int frame_size, opus_int32 Fs, StereoWidthState *mem)
860 frame_rate = Fs/frame_size;
967 if ((!st->variable_duration && 400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs &&
968 50*frame_size != st->Fs && 25*frame_size != st->Fs && 50*frame_size != 3*st->Fs)
969 || (400*frame_size < st->Fs)
989 if (st->silk_mode.complexity >= 10 && st->Fs==48000)
991 if (st->silk_mode.complexity >= 7 && st->Fs==48000)
997 c1, c2, analysis_channels, st->Fs,
1027 stereo_width = compute_stereo_width(pcm, frame_size, st->Fs, &st->width_mem);
1033 frame_rate = st->Fs/frame_size;
1066 equiv_rate = st->bitrate_bps - (40*st->channels+20)*(st->Fs/frame_size - 50);
1107 equiv_rate = st->bitrate_bps - (40*st->stream_channels+20)*(st->Fs/frame_size - 50);
1165 if (st->mode != MODE_CELT_ONLY && frame_size < st->Fs/100)
1170 if (max_data_bytes < (frame_rate > 50 ? 12000 : 8000)*frame_size / (st->Fs * 8))
1192 if (frame_size >= st->Fs/100)
1213 redundancy_bytes = IMIN(257, max_data_bytes*(opus_int32)(st->Fs/200)/(frame_size+st->Fs/200));
1292 if (st->Fs <= 24000 && st->bandwidth > OPUS_BANDWIDTH_SUPERWIDEBAND)
1294 if (st->Fs <= 16000 && st->bandwidth > OPUS_BANDWIDTH_WIDEBAND)
1296 if (st->Fs <= 12000 && st->bandwidth > OPUS_BANDWIDTH_MEDIUMBAND)
1298 if (st->Fs <= 8000 && st->bandwidth > OPUS_BANDWIDTH_NARROWBAND)
1333 if (frame_size > st->Fs/50 && (st->mode == MODE_CELT_ONLY || st->bandwidth > OPUS_BANDWIDTH_WIDEBAND))
1350 nb_frames = frame_size > st->Fs/25 ? 3 : 2;
1378 tmp_len = opus_encode_native(st, pcm+i*(st->channels*st->Fs/50), st->Fs/50,
1420 bytes_target = IMIN(max_data_bytes-redundancy_bytes, st->bitrate_bps * frame_size / (st->Fs * 8)) - 1;
1443 hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);
1445 dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);
1467 st->silk_mode.bitRate = st->stream_channels * ( 5000 + 1000 * ( st->Fs == 100 * frame_size ) );
1532 bytes_target += rate_offset * frame_size / (8 * st->Fs);
1535 st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs;
1584 st->silk_mode.maxBits = (st->silk_mode.bitRate * frame_size / (st->Fs * 8))*8;
1599 prefill_offset = st->channels*(st->encoder_buffer-st->delay_compensation-st->Fs/400);
1601 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs);
1629 data[-1] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);
1697 nb_compr_bytes = len + bytes_target - (st->silk_mode.bitRate * frame_size) / (8 * st->Fs);
1707 if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != st->Fs/50)
1709 bonus = (60*st->stream_channels+40)*(st->Fs/frame_size-50);
1727 ALLOC(tmp_prefill, st->channels*st->Fs/400, opus_val16);
1730 for (i=0;i<st->channels*st->Fs/400;i++)
1731 tmp_prefill[i] = st->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels + i];
1743 st->prev_HB_gain, HB_gain, celt_mode->overlap, frame_size, st->channels, celt_mode->window, st->Fs);
1762 frame_size, st->channels, celt_mode->window, st->Fs);
1819 err = celt_encode_with_ec(celt_enc, pcm_buf, st->Fs/200, data+nb_compr_bytes, redundancy_bytes, NULL);
1839 celt_encode_with_ec(celt_enc, tmp_prefill, st->Fs/400, dummy, 2, NULL);
1860 N2 = st->Fs/200;
1861 N4 = st->Fs/400;
1883 data[0] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);
1951 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
1974 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
1998 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
2019 st->variable_duration, st->channels, st->Fs, st->bitrate_bps,
2332 *value = st->Fs/400;
2344 *value = st->Fs;