Lines Matching refs:frame_size

369         int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs)
390 for (;i<frame_size;i++)
430 static opus_int32 user_bitrate_to_bitrate(OpusEncoder *st, int frame_size, int max_data_bytes)
432 if(!frame_size)frame_size=st->Fs/400;
434 return 60*st->Fs/frame_size + st->Fs*st->channels;
436 return max_data_bytes*8*st->Fs/frame_size;
443 opus_int32 opus_encode(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
447 opus_int32 opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
482 if (400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs &&
483 50*frame_size != st->Fs && 25*frame_size != st->Fs && 50*frame_size != 3*st->Fs)
501 st->bitrate_bps = user_bitrate_to_bitrate(st, frame_size, max_data_bytes);
503 frame_rate = st->Fs/frame_size;
536 equiv_rate = st->bitrate_bps - 60*(st->Fs/frame_size - 50);
624 if (st->mode != MODE_CELT_ONLY && frame_size < st->Fs/100)
646 if (frame_size >= st->Fs/100)
666 redundancy_bytes = IMIN(257, max_data_bytes*(opus_int32)(st->Fs/200)/(frame_size+st->Fs/200));
755 if (max_data_bytes < (frame_rate > 50 ? 12000 : 8000)*frame_size / (st->Fs * 8))
763 if (frame_size > st->Fs/50 && (st->mode == MODE_CELT_ONLY || st->bandwidth > OPUS_BANDWIDTH_WIDEBAND))
772 nb_frames = frame_size > st->Fs/25 ? 3 : 2;
836 bytes_target = IMIN(max_data_bytes-redundancy_bytes, st->bitrate_bps * frame_size / (st->Fs * 8)) - 1;
842 ALLOC(pcm_buf, (delay_compensation+frame_size)*st->channels, opus_val16);
859 hp_cutoff(pcm, cutoff_Hz, &pcm_buf[delay_compensation*st->channels], st->hp_mem, frame_size, st->channels, st->Fs);
861 for (i=0;i<frame_size*st->channels;i++)
872 ALLOC(pcm_silk, st->channels*frame_size, opus_int16);
878 if( st->Fs == 100 * frame_size ) {
886 if( st->Fs == 100 * frame_size ) {
896 if( st->silk_mode.bitRate > ( st->bitrate_bps - 8*st->Fs/frame_size ) * 4/5 ) {
897 st->silk_mode.bitRate = ( st->bitrate_bps - 8*st->Fs/frame_size ) * 4/5;
901 st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs;
950 st->silk_mode.maxBits = (st->silk_mode.bitRate * frame_size / (st->Fs * 8))*8;
970 for (i=0;i<frame_size*st->channels;i++)
973 ret = silk_Encode( silk_enc, &st->silk_mode, pcm_silk, frame_size, &enc, &nBytes, 0 );
983 data[-1] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);
1048 nb_compr_bytes = len + bytes_target - (st->silk_mode.bitRate * frame_size) / (8 * st->Fs);
1076 for (i=0;i<st->channels*(st->encoder_buffer-(frame_size+delay_compensation));i++)
1077 st->delay_buffer[i] = st->delay_buffer[i+st->channels*frame_size];
1079 st->delay_buffer[i] = pcm_buf[(frame_size+delay_compensation-st->encoder_buffer)*st->channels+i];
1101 frame_size, st->channels, celt_mode->window, st->Fs);
1180 ret = celt_encode_with_ec(celt_enc, pcm_buf, frame_size, NULL, nb_compr_bytes, &enc);
1203 celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, dummy, 2, NULL);
1205 err = celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes, redundancy_bytes, NULL);
1218 data[0] = gen_toc(st->mode, st->Fs/frame_size, curr_bandwidth, st->stream_channels);
1227 st->prev_framesize = frame_size;
1271 opus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int frame_size,
1278 if(frame_size<0)
1284 ALLOC(in, frame_size*st->channels, opus_int16);
1286 for (i=0;i<frame_size*st->channels;i++)
1288 ret = opus_encode(st, in, frame_size, data, max_data_bytes);
1295 opus_int32 opus_encode(OpusEncoder *st, const opus_int16 *pcm, int frame_size,
1302 ALLOC(in, frame_size*st->channels, float);
1304 for (i=0;i<frame_size*st->channels;i++)
1306 ret = opus_encode_float(st, in, frame_size, data, max_data_bytes);