Lines Matching refs:channels

66     int          channels;  member
148 int opus_encoder_get_size(int channels) in opus_encoder_get_size() argument
152 if (channels<1 || channels > 2) in opus_encoder_get_size()
158 celtEncSizeBytes = celt_encoder_get_size(channels); in opus_encoder_get_size()
162 int opus_encoder_init(OpusEncoder* st, opus_int32 Fs, int channels, int application) in opus_encoder_init() argument
169 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)|| in opus_encoder_init()
174 OPUS_CLEAR((char*)st, opus_encoder_get_size(channels)); in opus_encoder_init()
185 st->stream_channels = st->channels = channels; in opus_encoder_init()
195 st->silk_mode.nChannelsAPI = channels; in opus_encoder_init()
196 st->silk_mode.nChannelsInternal = channels; in opus_encoder_init()
212 err = celt_encoder_init(celt_enc, Fs, channels, st->arch); in opus_encoder_init()
222 st->bitrate_bps = 3000+Fs*channels; in opus_encoder_init()
248 static unsigned char gen_toc(int mode, int framerate, int bandwidth, int channels) in gen_toc() argument
276 toc |= (channels==2)<<2; in gen_toc()
320 …n, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) in hp_cutoff() argument
343 silk_biquad_alt( in, B_Q28, A_Q28, hp_mem, out, len, channels ); in hp_cutoff()
344 if( channels == 2 ) { in hp_cutoff()
345 silk_biquad_alt( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels ); in hp_cutoff()
348 silk_biquad_float( in, B_Q28, A_Q28, hp_mem, out, len, channels ); in hp_cutoff()
349 if( channels == 2 ) { in hp_cutoff()
350 silk_biquad_float( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels ); in hp_cutoff()
356 …n, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) in dc_reject() argument
363 for (c=0;c<channels;c++) in dc_reject()
368 x = SHL32(EXTEND32(in[channels*i+c]), 15); in dc_reject()
375 out[channels*i+c] = EXTRACT16(SATURATE(PSHR32(y, 15), 32767)); in dc_reject()
381 …n, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) in dc_reject() argument
387 for (c=0;c<channels;c++) in dc_reject()
392 x = in[channels*i+c]; in dc_reject()
399 out[channels*i+c] = y; in dc_reject()
406 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs) in stereo_fade() argument
422 diff = EXTRACT16(HALF32((opus_val32)in[i*channels] - (opus_val32)in[i*channels+1])); in stereo_fade()
424 out[i*channels] = out[i*channels] - diff; in stereo_fade()
425 out[i*channels+1] = out[i*channels+1] + diff; in stereo_fade()
430 diff = EXTRACT16(HALF32((opus_val32)in[i*channels] - (opus_val32)in[i*channels+1])); in stereo_fade()
432 out[i*channels] = out[i*channels] - diff; in stereo_fade()
433 out[i*channels+1] = out[i*channels+1] + diff; in stereo_fade()
438 int overlap48, int frame_size, int channels, const opus_val16 *window, opus_int32 Fs) in gain_fade() argument
446 if (channels==1) in gain_fade()
470 out[i*channels+c] = MULT16_16_Q15(g2, in[i*channels+c]); in gain_fade()
473 while (++c<channels); in gain_fade()
476 OpusEncoder *opus_encoder_create(opus_int32 Fs, int channels, int application, int *error) in opus_encoder_create() argument
480 if((Fs!=48000&&Fs!=24000&&Fs!=16000&&Fs!=12000&&Fs!=8000)||(channels!=1&&channels!=2)|| in opus_encoder_create()
488 st = (OpusEncoder *)opus_alloc(opus_encoder_get_size(channels)); in opus_encoder_create()
495 ret = opus_encoder_init(st, Fs, channels, application); in opus_encoder_create()
510 return 60*st->Fs/frame_size + st->Fs*st->channels; in user_bitrate_to_bitrate()
1026 if (st->channels==2 && st->force_channels!=1) in opus_encode_native()
1066 equiv_rate = st->bitrate_bps - (40*st->channels+20)*(st->Fs/frame_size - 50); in opus_encode_native()
1083 if (st->force_channels!=OPUS_AUTO && st->channels == 2) in opus_encode_native()
1089 if (st->channels == 2 && (rand()&0x1F)==0) in opus_encode_native()
1093 if (st->channels == 2) in opus_encode_native()
1103 st->stream_channels = st->channels; in opus_encode_native()
1243 if (st->channels==2 && st->force_channels!=1) in opus_encode_native()
1378 tmp_len = opus_encode_native(st, pcm+i*(st->channels*st->Fs/50), st->Fs/50, in opus_encode_native()
1426 ALLOC(pcm_buf, (total_buffer+frame_size)*st->channels, opus_val16); in opus_encode_native()
1427 for (i=0;i<total_buffer*st->channels;i++) in opus_encode_native()
1428 pcm_buf[i] = st->delay_buffer[(st->encoder_buffer-total_buffer)*st->channels+i]; in opus_encode_native()
1443 …hp_cutoff(pcm, cutoff_Hz, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channel… in opus_encode_native()
1445 …dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->F… in opus_encode_native()
1459 ALLOC(pcm_silk, st->channels*frame_size, opus_int16); in opus_encode_native()
1510 for (c=0;c<st->channels;c++) in opus_encode_native()
1523 masking_depth = mask_sum / end*st->channels; in opus_encode_native()
1536 st->silk_mode.nChannelsAPI = st->channels; in opus_encode_native()
1599 prefill_offset = st->channels*(st->encoder_buffer-st->delay_compensation-st->Fs/400); in opus_encode_native()
1601 … 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs); in opus_encode_native()
1607 for (i=0;i<st->encoder_buffer*st->channels;i++) in opus_encode_native()
1614 pcm_silk = pcm_buf+total_buffer*st->channels; in opus_encode_native()
1616 for (i=0;i<frame_size*st->channels;i++) in opus_encode_native()
1617 pcm_silk[i] = FLOAT2INT16(pcm_buf[total_buffer*st->channels + i]); in opus_encode_native()
1727 ALLOC(tmp_prefill, st->channels*st->Fs/400, opus_val16); in opus_encode_native()
1730 for (i=0;i<st->channels*st->Fs/400;i++) in opus_encode_native()
1731 … tmp_prefill[i] = st->delay_buffer[(st->encoder_buffer-total_buffer-st->Fs/400)*st->channels + i]; in opus_encode_native()
1734 for (i=0;i<st->channels*(st->encoder_buffer-(frame_size+total_buffer));i++) in opus_encode_native()
1735 st->delay_buffer[i] = st->delay_buffer[i+st->channels*frame_size]; in opus_encode_native()
1736 for (;i<st->encoder_buffer*st->channels;i++) in opus_encode_native()
1737 st->delay_buffer[i] = pcm_buf[(frame_size+total_buffer-st->encoder_buffer)*st->channels+i]; in opus_encode_native()
1743 …st->prev_HB_gain, HB_gain, celt_mode->overlap, frame_size, st->channels, celt_mode->window, st->Fs… in opus_encode_native()
1748 if( !st->energy_masking && st->channels == 2 ) { in opus_encode_native()
1762 frame_size, st->channels, celt_mode->window, st->Fs); in opus_encode_native()
1868 celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, dummy, 2, NULL); in opus_encode_native()
1870 …err = celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes,… in opus_encode_native()
1951 st->variable_duration, st->channels, st->Fs, st->bitrate_bps, in opus_encode_float()
1954 ALLOC(in, frame_size*st->channels, opus_int16); in opus_encode_float()
1956 for (i=0;i<frame_size*st->channels;i++) in opus_encode_float()
1958 …rame_size, data, max_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_float); in opus_encode_float()
1974 st->variable_duration, st->channels, st->Fs, st->bitrate_bps, in opus_encode()
1980 … frame_size, data, out_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_int); in opus_encode()
1998 st->variable_duration, st->channels, st->Fs, st->bitrate_bps, in opus_encode()
2001 ALLOC(in, frame_size*st->channels, float); in opus_encode()
2003 for (i=0;i<frame_size*st->channels;i++) in opus_encode()
2005 … frame_size, data, max_data_bytes, 16, pcm, analysis_frame_size, 0, -2, st->channels, downmix_int); in opus_encode()
2019 st->variable_duration, st->channels, st->Fs, st->bitrate_bps, in opus_encode_float()
2022 pcm, analysis_frame_size, 0, -2, st->channels, downmix_float); in opus_encode_float()
2072 else if (value > (opus_int32)300000*st->channels) in opus_encoder_ctl()
2073 value = (opus_int32)300000*st->channels; in opus_encoder_ctl()
2091 if((value<1 || value>st->channels) && value != OPUS_AUTO) in opus_encoder_ctl()
2429 st->stream_channels = st->channels; in opus_encoder_ctl()