Lines Matching refs:channels
155 static void channel_pos(int channels, int pos[8]) in channel_pos() argument
158 if (channels==4) in channel_pos()
164 } else if (channels==3||channels==5||channels==6) in channel_pos()
172 } else if (channels==7) in channel_pos()
181 } else if (channels==8) in channel_pos()
234 … int len, int overlap, int channels, int rate, opus_copy_channel_in_func copy_channel_in, int arch in surround_analysis() argument
263 channel_pos(channels, pos); in surround_analysis()
269 for (c=0;c<channels;c++) in surround_analysis()
272 (*copy_channel_in)(x, 1, pcm, channels, c, len); in surround_analysis()
333 channel_offset = HALF16(celt_log2(QCONST32(2.f,14)/(channels-1))); in surround_analysis()
344 for (c=0;c<channels;c++) in surround_analysis()
385 opus_int32 opus_multistream_surround_encoder_get_size(int channels, int mapping_family) in opus_multistream_surround_encoder_get_size() argument
393 if (channels==1) in opus_multistream_surround_encoder_get_size()
397 } else if (channels==2) in opus_multistream_surround_encoder_get_size()
403 } else if (mapping_family==1 && channels<=8 && channels>=1) in opus_multistream_surround_encoder_get_size()
405 nb_streams=vorbis_mappings[channels-1].nb_streams; in opus_multistream_surround_encoder_get_size()
406 nb_coupled_streams=vorbis_mappings[channels-1].nb_coupled_streams; in opus_multistream_surround_encoder_get_size()
409 nb_streams=channels; in opus_multistream_surround_encoder_get_size()
414 nb_streams=channels; in opus_multistream_surround_encoder_get_size()
420 if (channels>2) in opus_multistream_surround_encoder_get_size()
422 size += channels*(120*sizeof(opus_val32) + sizeof(opus_val32)); in opus_multistream_surround_encoder_get_size()
430 int channels, in opus_multistream_encoder_init_impl() argument
443 if ((channels>255) || (channels<1) || (coupled_streams>streams) || in opus_multistream_encoder_init_impl()
448 st->layout.nb_channels = channels; in opus_multistream_encoder_init_impl()
483 OPUS_CLEAR(ms_get_preemph_mem(st), channels); in opus_multistream_encoder_init_impl()
484 OPUS_CLEAR(ms_get_window_mem(st), channels*120); in opus_multistream_encoder_init_impl()
493 int channels, in opus_multistream_encoder_init() argument
500 return opus_multistream_encoder_init_impl(st, Fs, channels, streams, in opus_multistream_encoder_init()
508 int channels, in opus_multistream_surround_encoder_init() argument
518 if ((channels>255) || (channels<1)) in opus_multistream_surround_encoder_init()
523 if (channels==1) in opus_multistream_surround_encoder_init()
528 } else if (channels==2) in opus_multistream_surround_encoder_init()
536 } else if (mapping_family==1 && channels<=8 && channels>=1) in opus_multistream_surround_encoder_init()
539 *streams=vorbis_mappings[channels-1].nb_streams; in opus_multistream_surround_encoder_init()
540 *coupled_streams=vorbis_mappings[channels-1].nb_coupled_streams; in opus_multistream_surround_encoder_init()
541 for (i=0;i<channels;i++) in opus_multistream_surround_encoder_init()
542 mapping[i] = vorbis_mappings[channels-1].mapping[i]; in opus_multistream_surround_encoder_init()
543 if (channels>=6) in opus_multistream_surround_encoder_init()
548 *streams=channels; in opus_multistream_surround_encoder_init()
550 for(i=0;i<channels;i++) in opus_multistream_surround_encoder_init()
556 *streams=channels; in opus_multistream_surround_encoder_init()
558 for(i=0;i<channels;i++) in opus_multistream_surround_encoder_init()
564 if (channels>2 && mapping_family==1) { in opus_multistream_surround_encoder_init()
575 return opus_multistream_encoder_init_impl(st, Fs, channels, *streams, in opus_multistream_surround_encoder_init()
582 int channels, in opus_multistream_encoder_create() argument
592 if ((channels>255) || (channels<1) || (coupled_streams>streams) || in opus_multistream_encoder_create()
606 …ret = opus_multistream_encoder_init(st, Fs, channels, streams, coupled_streams, mapping, applicati… in opus_multistream_encoder_create()
619 int channels, in opus_multistream_surround_encoder_create() argument
631 if ((channels>255) || (channels<1)) in opus_multistream_surround_encoder_create()
637 size = opus_multistream_surround_encoder_get_size(channels, mapping_family); in opus_multistream_surround_encoder_create()
651 …ret = opus_multistream_surround_encoder_init(st, Fs, channels, mapping_family, streams, coupled_st… in opus_multistream_surround_encoder_create()
864 int channels; in opus_multistream_encode_native() local
866 channels = st->layout.nb_streams + st->layout.nb_coupled_streams; in opus_multistream_encode_native()
870 st->variable_duration, channels, Fs, st->bitrate_bps, in opus_multistream_encode_native()