Lines Matching full:channels
71 int channels; member
168 int opus_encoder_get_size(int channels) in opus_encoder_get_size() argument
172 if (channels<1 || channels > 2) in opus_encoder_get_size()
178 celtEncSizeBytes = celt_encoder_get_size(channels); in opus_encoder_get_size()
182 int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int application) in opus_encoder_init() argument
189 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)|| in opus_encoder_init()
194 OPUS_CLEAR((char*)st, opus_encoder_get_size(channels)); in opus_encoder_init()
205 st->stream_channels = st->channels = channels; in opus_encoder_init()
215 st->silk_mode.nChannelsAPI = channels; in opus_encoder_init()
216 st->silk_mode.nChannelsInternal = channels; in opus_encoder_init()
232 err = celt_encoder_init(celt_enc, Fs, channels, st->arch); in opus_encoder_init()
242 st->bitrate_bps = 3000+Fs*channels; in opus_encoder_init()
273 static unsigned char gen_toc(int mode, int framerate, int bandwidth, int channels) in gen_toc() argument
301 toc |= (channels==2)<<2; in gen_toc()
345 …opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs, i… in hp_cutoff() argument
369 if( channels == 1 ) { in hp_cutoff()
375 silk_biquad_float( in, B_Q28, A_Q28, hp_mem, out, len, channels ); in hp_cutoff()
376 if( channels == 2 ) { in hp_cutoff()
377 silk_biquad_float( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels ); in hp_cutoff()
383 …n, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) in dc_reject() argument
390 for (c=0;c<channels;c++) in dc_reject()
395 x = SHL32(EXTEND32(in[channels*i+c]), 14); in dc_reject()
398 out[channels*i+c] = EXTRACT16(SATURATE(PSHR32(y, 14), 32767)); in dc_reject()
404 …n, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) in dc_reject() argument
410 if (channels==2) in dc_reject()
446 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs) in stereo_fade() argument
462 diff = EXTRACT16(HALF32((opus_val32)in[i*channels] - (opus_val32)in[i*channels+1])); in stereo_fade()
464 out[i*channels] = out[i*channels] - diff; in stereo_fade()
465 out[i*channels+1] = out[i*channels+1] + diff; in stereo_fade()
470 diff = EXTRACT16(HALF32((opus_val32)in[i*channels] - (opus_val32)in[i*channels+1])); in stereo_fade()
472 out[i*channels] = out[i*channels] - diff; in stereo_fade()
473 out[i*channels+1] = out[i*channels+1] + diff; in stereo_fade()
478 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs) in gain_fade() argument
486 if (channels==1) in gain_fade()
510 out[i*channels+c] = MULT16_16_Q15(g2, in[i*channels+c]); in gain_fade()
513 while (++c<channels); in gain_fade()
516 OpusEncoder *opus_encoder_create(opus_int32 Fs, int channels, int application, int *error) in opus_encoder_create() argument
520 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)|| in opus_encoder_create()
528 st = (OpusEncoder *)opus_alloc(opus_encoder_get_size(channels)); in opus_encoder_create()
535 ret = opus_encoder_init(st, Fs, channels, application); in opus_encoder_create()
550 return 60*st->Fs/frame_size + st->Fs*st->channels; in user_bitrate_to_bitrate()
751 …pute_silk_rate_for_hybrid(int rate, int bandwidth, int frame20ms, int vbr, int fec, int channels) { in compute_silk_rate_for_hybrid() argument
769 rate /= channels; in compute_silk_rate_for_hybrid()
796 silk_rate *= channels; in compute_silk_rate_for_hybrid()
798 if (channels == 2 && rate >= 12000) in compute_silk_rate_for_hybrid()
805 static opus_int32 compute_equiv_rate(opus_int32 bitrate, int channels, in compute_equiv_rate() argument
812 equiv -= (40*channels+20)*(frame_rate - 50); in compute_equiv_rate()
840 static int is_digital_silence(const opus_val16* pcm, int frame_size, int channels, int lsb_depth) in is_digital_silence() argument
847 sample_max = celt_maxabs16(pcm, frame_size*channels); in is_digital_silence()
860 static opus_val32 compute_frame_energy(const opus_val16 *pcm, int frame_size, int channels, int arc… in compute_frame_energy() argument
867 int len = frame_size*channels; in compute_frame_energy()
887 static opus_val32 compute_frame_energy(const opus_val16 *pcm, int frame_size, int channels, int arc… in compute_frame_energy() argument
889 int len = frame_size*channels; in compute_frame_energy()
900 int channels, in decide_dtx_mode() argument
911 noise_energy = compute_frame_energy(pcm, frame_size, channels, arch); in decide_dtx_mode()
1001 tmp_len = opus_encode_native(st, pcm+i*(st->channels*frame_size), frame_size, in encode_multiframe_packet()
1038 …e_redundancy_bytes(opus_int32 max_data_bytes, opus_int32 bitrate_bps, int frame_rate, int channels) in compute_redundancy_bytes() argument
1045 base_bits = (40*channels+20); in compute_redundancy_bytes()
1059 if (redundancy_bytes > 4 + 8*channels) in compute_redundancy_bytes()
1143 if (is_digital_silence(pcm, frame_size, st->channels, lsb_depth)) in opus_encode_native()
1157 compute_frame_energy(pcm, frame_size, st->channels, st->arch)); in opus_encode_native()
1206 if (st->channels==2 && st->force_channels!=1) in opus_encode_native()
1295 equiv_rate = compute_equiv_rate(st->bitrate_bps, st->channels, st->Fs/frame_size, in opus_encode_native()
1313 if (st->force_channels!=OPUS_AUTO && st->channels == 2) in opus_encode_native()
1319 if (st->channels == 2 && (rand()&0x1F)==0) in opus_encode_native()
1323 if (st->channels == 2) in opus_encode_native()
1333 st->stream_channels = st->channels; in opus_encode_native()
1337 /* Update equivalent rate for channels decision. */ in opus_encode_native()
1462 if (st->channels==2 && st->force_channels!=1) in opus_encode_native()
1630 ALLOC(pcm_buf, (total_buffer+frame_size)*st->channels, opus_val16); in opus_encode_native()
1631 …buf, &st->delay_buffer[(st->encoder_buffer-total_buffer)*st->channels], total_buffer*st->channels); in opus_encode_native()
1646 …hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channel… in opus_encode_native()
1648 …dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->F… in opus_encode_native()
1654 …elt_inner_prod(&pcm_buf[total_buffer*st->channels], &pcm_buf[total_buffer*st->channels], frame_siz… in opus_encode_native()
1659 OPUS_CLEAR(&pcm_buf[total_buffer*st->channels], frame_size*st->channels); in opus_encode_native()
1676 ALLOC(pcm_silk, st->channels*frame_size, opus_int16); in opus_encode_native()
1723 for (c=0;c<st->channels;c++) in opus_encode_native()
1736 masking_depth = mask_sum / end*st->channels; in opus_encode_native()
1748 st->silk_mode.nChannelsAPI = st->channels; in opus_encode_native()
1824 prefill_offset = st->channels*(st->encoder_buffer-st->delay_compensation-st->Fs/400); in opus_encode_native()
1826 … 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs); in opus_encode_native()
1831 for (i=0;i<st->encoder_buffer*st->channels;i++) in opus_encode_native()
1840 pcm_silk = pcm_buf+total_buffer*st->channels; in opus_encode_native()
1842 for (i=0;i<frame_size*st->channels;i++) in opus_encode_native()
1843 pcm_silk[i] = FLOAT2INT16(pcm_buf[total_buffer*st->channels + i]); in opus_encode_native()
1935 ALLOC(tmp_prefill, st->channels*st->Fs/400, opus_val16); in opus_encode_native()
1938 …t->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels], st->channels*st->Fs/40… in opus_encode_native()
1941 if (st->channels*(st->encoder_buffer-(frame_size+total_buffer)) > 0) in opus_encode_native()
1943 …OPUS_MOVE(st->delay_buffer, &st->delay_buffer[st->channels*frame_size], st->channels*(st->encoder_… in opus_encode_native()
1944 OPUS_COPY(&st->delay_buffer[st->channels*(st->encoder_buffer-frame_size-total_buffer)], in opus_encode_native()
1946 (frame_size+total_buffer)*st->channels); in opus_encode_native()
1948 …m_buf[(frame_size+total_buffer-st->encoder_buffer)*st->channels], st->encoder_buffer*st->channels); in opus_encode_native()
1954 …st->prev_HB_gain, HB_gain, celt_mode->overlap, frame_size, st->channels, celt_mode->window, st->Fs… in opus_encode_native()
1966 if( !st->energy_masking && st->channels == 2 ) { in opus_encode_native()
1980 frame_size, st->channels, celt_mode->window, st->Fs); in opus_encode_native()
2115 celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, dummy, 2, NULL); in opus_encode_native()
2117 …err = celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes,… in opus_encode_native()
2148 st->peak_signal_energy, pcm, frame_size, st->channels, is_silence, st->arch)) in opus_encode_native()
2212 ALLOC(in, frame_size*st->channels, opus_int16); in opus_encode_float()
2214 for (i=0;i<frame_size*st->channels;i++) in opus_encode_float()
2217 pcm, analysis_frame_size, 0, -2, st->channels, downmix_float, 1); in opus_encode_float()
2229 pcm, analysis_frame_size, 0, -2, st->channels, downmix_int, 0); in opus_encode()
2247 ALLOC(in, frame_size*st->channels, float); in opus_encode()
2249 for (i=0;i<frame_size*st->channels;i++) in opus_encode()
2252 pcm, analysis_frame_size, 0, -2, st->channels, downmix_int, 0); in opus_encode()
2262 pcm, analysis_frame_size, 0, -2, st->channels, downmix_float, 1); in opus_encode_float()
2315 else if (value > (opus_int32)300000*st->channels) in opus_encoder_ctl()
2316 value = (opus_int32)300000*st->channels; in opus_encoder_ctl()
2334 if((value<1 || value>st->channels) && value != OPUS_AUTO) in opus_encoder_ctl()
2696 st->stream_channels = st->channels; in opus_encoder_ctl()