Home
last modified time | relevance | path

Searched refs:num_channels (Results 1 – 25 of 178) sorted by relevance

12345678

/external/webrtc/webrtc/common_audio/include/
Daudio_util.h74 int num_channels, in CopyAudioIfNeeded() argument
76 for (int i = 0; i < num_channels; ++i) { in CopyAudioIfNeeded()
90 size_t num_channels, in Deinterleave() argument
92 for (size_t i = 0; i < num_channels; ++i) { in Deinterleave()
97 interleaved_idx += num_channels; in Deinterleave()
108 size_t num_channels, in Interleave() argument
110 for (size_t i = 0; i < num_channels; ++i) { in Interleave()
115 interleaved_idx += num_channels; in Interleave()
126 int num_channels, in UpmixMonoToInterleaved() argument
130 for (int j = 0; j < num_channels; ++j) { in UpmixMonoToInterleaved()
[all …]
/external/webrtc/webrtc/common_audio/
Dwav_header.cc62 bool CheckWavParameters(size_t num_channels, in CheckWavParameters() argument
70 if (num_channels == 0 || sample_rate <= 0 || bytes_per_sample == 0) in CheckWavParameters()
74 if (num_channels > std::numeric_limits<uint16_t>::max()) in CheckWavParameters()
79 if (static_cast<uint64_t>(sample_rate) * num_channels * bytes_per_sample > in CheckWavParameters()
108 if (num_samples % num_channels != 0) in CheckWavParameters()
138 static inline uint32_t ByteRate(size_t num_channels, int sample_rate, in ByteRate() argument
140 return static_cast<uint32_t>(num_channels * sample_rate * bytes_per_sample); in ByteRate()
143 static inline uint16_t BlockAlign(size_t num_channels, in BlockAlign() argument
145 return static_cast<uint16_t>(num_channels * bytes_per_sample); in BlockAlign()
149 size_t num_channels, in WriteWavHeader() argument
[all …]
Daudio_ring_buffer_unittest.cc27 const size_t num_channels = input.num_channels(); in ReadAndWriteTest() local
29 AudioRingBuffer buf(num_channels, buffer_frames); in ReadAndWriteTest()
30 rtc::scoped_ptr<float* []> slice(new float* [num_channels]); in ReadAndWriteTest()
37 buf.Write(input.Slice(slice.get(), input_pos), num_channels, in ReadAndWriteTest()
44 buf.Read(output->Slice(slice.get(), output_pos), num_channels, in ReadAndWriteTest()
52 buf.Write(input.Slice(slice.get(), input_pos), num_channels, in ReadAndWriteTest()
56 buf.Read(output->Slice(slice.get(), output_pos), num_channels, in ReadAndWriteTest()
64 const size_t num_channels = ::testing::get<3>(GetParam()); in TEST_P() local
67 ChannelBuffer<float> input(kFrames, static_cast<int>(num_channels)); in TEST_P()
68 for (size_t i = 0; i < num_channels; ++i) in TEST_P()
[all …]
Dwav_header_unittest.cc94 size_t num_channels = 0; in TEST() local
122 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
143 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
164 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
186 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
209 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
228 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
240 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
271 size_t num_channels = 0; in TEST() local
278 ReadWavHeader(&r, &num_channels, &sample_rate, &format, in TEST()
[all …]
Dchannel_buffer.h43 size_t num_channels,
45 : data_(new T[num_frames * num_channels]()), in data_() argument
46 channels_(new T*[num_channels * num_bands]), in data_()
47 bands_(new T*[num_channels * num_bands]), in data_()
50 num_channels_(num_channels), in data_()
118 size_t num_channels() const { return num_channels_; } in num_channels() function
145 IFChannelBuffer(size_t num_frames, size_t num_channels, size_t num_bands = 1);
154 size_t num_channels() const { return ibuf_.num_channels(); } in num_channels() function
Dblocker.cc25 size_t num_channels, in AddFrames() argument
28 for (size_t i = 0; i < num_channels; ++i) { in AddFrames()
40 size_t num_channels, in CopyFrames() argument
43 for (size_t i = 0; i < num_channels; ++i) { in CopyFrames()
54 size_t num_channels, in MoveFrames() argument
57 for (size_t i = 0; i < num_channels; ++i) { in MoveFrames()
67 size_t num_channels) { in ZeroOut() argument
68 for (size_t i = 0; i < num_channels; ++i) { in ZeroOut()
78 size_t num_channels, in ApplyWindow() argument
80 for (size_t i = 0; i < num_channels; ++i) { in ApplyWindow()
Dchannel_buffer.cc16 size_t num_channels, in IFChannelBuffer() argument
19 ibuf_(num_frames, num_channels, num_bands), in IFChannelBuffer()
21 fbuf_(num_frames, num_channels, num_bands) {} in IFChannelBuffer()
50 for (size_t i = 0; i < ibuf_.num_channels(); ++i) { in RefreshF()
64 for (size_t i = 0; i < ibuf_.num_channels(); ++i) { in RefreshI()
Dwav_file.h30 virtual size_t num_channels() const = 0;
42 WavWriter(const std::string& filename, int sample_rate, size_t num_channels);
54 size_t num_channels() const override { return num_channels_; } in num_channels() function
82 size_t num_channels() const override { return num_channels_; } in num_channels() function
105 size_t num_channels);
Dwav_file.cc43 s << "Sample rate: " << sample_rate() << " Hz, Channels: " << num_channels() in FormatAsString()
45 << (1.f * num_samples()) / (num_channels() * sample_rate()) << " s"; in FormatAsString()
102 size_t num_channels) in WavWriter() argument
104 num_channels_(num_channels), in WavWriter()
156 size_t num_channels) { in rtc_WavOpen() argument
158 new webrtc::WavWriter(filename, sample_rate, num_channels)); in rtc_WavOpen()
176 return reinterpret_cast<const webrtc::WavWriter*>(wf)->num_channels(); in rtc_WavNumChannels()
Daudio_converter_unittest.cc29 const size_t num_channels = data.size(); in CreateBuffer() local
30 ScopedBuffer sb(new ChannelBuffer<float>(frames, num_channels)); in CreateBuffer()
31 for (size_t i = 0; i < num_channels; ++i) in CreateBuffer()
39 EXPECT_EQ(ref.num_channels(), test.num_channels()); in VerifyParams()
60 for (size_t i = 0; i < ref.num_channels(); ++i) { in ComputeSNR()
69 const size_t length = ref.num_channels() * (ref.num_frames() - delay); in ComputeSNR()
/external/autotest/server/site_tests/brillo_PlaybackAudioTest/
Dbrillo_PlaybackAudioTest.py70 num_channels, play_file_path=None): argument
83 num_channels=num_channels)
95 num_channels): argument
111 num_channels=num_channels)
117 self.host, num_channels, sample_rate, sample_width,
128 num_channels=num_channels,
159 for num_channels in num_channels_arr:
163 logging.info('Number of channels: %d', num_channels)
170 num_channels=num_channels)
174 num_channels))
/external/autotest/server/site_tests/brillo_RecordingAudioTest/
Dbrillo_RecordingAudioTest.py41 sample_rate, num_channels, rec_file): argument
61 (duration_secs, num_channels, sample_rate, sample_width,
67 (duration_secs, num_channels, sample_rate, rec_file))
70 (num_channels, duration_secs, sample_rate, sample_width,
77 sample_rate, num_channels, duration_secs): argument
97 num_channels=num_channels,
103 num_channels=num_channels,
152 for num_channels in num_channels_arr:
158 logging.info('Number of channels: %d', num_channels)
165 num_channels=num_channels,
[all …]
/external/webrtc/webrtc/modules/audio_processing/transient/
Dtransient_suppression_test.cc56 DEFINE_int32(num_channels, 1, "Number of channels.");
79 int num_channels, in ReadBuffers() argument
88 if (num_channels > 1) { in ReadBuffers()
89 tmpbuf.reset(new int16_t[num_channels * audio_buffer_size]); in ReadBuffers()
94 num_channels * audio_buffer_size, in ReadBuffers()
95 in_file) != num_channels * audio_buffer_size) { in ReadBuffers()
99 if (num_channels > 1) { in ReadBuffers()
100 for (int i = 0; i < num_channels; ++i) { in ReadBuffers()
103 read_ptr[i + j * num_channels]; in ReadBuffers()
128 int num_channels, in WritePCM() argument
[all …]
/external/webrtc/webrtc/modules/audio_processing/
Dsplitting_filter.cc19 SplittingFilter::SplittingFilter(size_t num_channels, in SplittingFilter() argument
25 two_bands_states_.resize(num_channels); in SplittingFilter()
27 for (size_t i = 0; i < num_channels; ++i) { in SplittingFilter()
36 RTC_DCHECK_EQ(data->num_channels(), bands->num_channels()); in Analysis()
49 RTC_DCHECK_EQ(data->num_channels(), bands->num_channels()); in Synthesis()
61 RTC_DCHECK_EQ(two_bands_states_.size(), data->num_channels()); in TwoBandsAnalysis()
74 RTC_DCHECK_EQ(two_bands_states_.size(), data->num_channels()); in TwoBandsSynthesis()
87 RTC_DCHECK_EQ(three_band_filter_banks_.size(), data->num_channels()); in ThreeBandsAnalysis()
97 RTC_DCHECK_EQ(three_band_filter_banks_.size(), data->num_channels()); in ThreeBandsSynthesis()
/external/webrtc/webrtc/modules/audio_processing/test/
Dtest_utils.cc40 RTC_CHECK_EQ(file_->num_channels(), buffer->num_channels()); in Read()
48 Deinterleave(&interleaved_[0], buffer->num_frames(), buffer->num_channels(), in Read()
57 RTC_CHECK_EQ(file_->num_channels(), buffer.num_channels()); in Write()
59 Interleave(buffer.channels(), buffer.num_frames(), buffer.num_channels(), in Write()
79 size_t num_channels, in WriteFloatData() argument
82 size_t length = num_channels * samples_per_channel; in WriteFloatData()
84 Interleave(data, samples_per_channel, num_channels, buffer.get()); in WriteFloatData()
119 AudioProcessing::ChannelLayout LayoutFromChannels(size_t num_channels) { in LayoutFromChannels() argument
120 switch (num_channels) { in LayoutFromChannels()
/external/autotest/server/brillo/
Daudio_utils.py67 def check_wav_file(filename, num_channels=None, sample_rate=None, argument
84 if num_channels is not None and chk_file.getnchannels() != num_channels:
86 num_channels, chk_file.getnchannels())
106 def generate_sine_file(host, num_channels, sample_rate, sample_width, argument
129 'vol 0.9' % (num_channels, byte_format,
174 def _compare_frames(reference_file_frames, rec_file_frames, num_channels, argument
199 for channel in range(num_channels):
200 reference_data = reference_file_frames[channel::num_channels]
201 rec_data = rec_file_frames[channel::num_channels]
256 num_channels = reference_file.getnchannels()
/external/autotest/server/brillo/feedback/
Dclosed_loop_audio_client.py152 num_channels=_DEFAULT_NUM_CHANNELS, argument
161 self.num_channels = num_channels
170 (num_channels, duration_secs, sample_rate, sample_width,
191 num_channels=self.num_channels,
226 num_channels=self.num_channels,
276 num_channels=_DEFAULT_NUM_CHANNELS, argument
293 self.num_channels = num_channels
303 self.client.host, self.num_channels,
325 captured_audio_file, num_channels=self.num_channels,
/external/webrtc/webrtc/modules/audio_processing/beamformer/
Dnonlinear_beamformer_test.cc48 const size_t num_mics = in_file.num_channels(); in main()
57 FLAGS_i.c_str(), in_file.num_channels(), in_file.sample_rate()); in main()
59 FLAGS_o.c_str(), out_file.num_channels(), out_file.sample_rate()); in main()
63 in_file.num_channels()); in main()
66 out_file.num_channels()); in main()
73 in_buf.num_channels(), in_buf.channels()); in main()
78 out_buf.num_channels(), &interleaved[0]); in main()
/external/webrtc/webrtc/modules/audio_coding/codecs/g711/
Daudio_decoder_pcm.h21 explicit AudioDecoderPcmU(size_t num_channels) : num_channels_(num_channels) { in AudioDecoderPcmU() argument
22 RTC_DCHECK_GE(num_channels, 1u); in AudioDecoderPcmU()
42 explicit AudioDecoderPcmA(size_t num_channels) : num_channels_(num_channels) { in AudioDecoderPcmA() argument
43 RTC_DCHECK_GE(num_channels, 1u); in AudioDecoderPcmA()
/external/webrtc/webrtc/modules/audio_coding/neteq/
Dneteq_impl_unittest.cc469 size_t num_channels; in TEST_F() local
474 kMaxOutputSize, output, &samples_per_channel, &num_channels, &type)); in TEST_F()
476 EXPECT_EQ(1u, num_channels); in TEST_F()
548 size_t num_channels; in TEST_F() local
553 kMaxOutputSize, output, &samples_per_channel, &num_channels, &type)); in TEST_F()
555 EXPECT_EQ(1u, num_channels); in TEST_F()
584 kMaxOutputSize, output, &samples_per_channel, &num_channels, &type)); in TEST_F()
586 EXPECT_EQ(1u, num_channels); in TEST_F()
625 size_t num_channels; in TEST_F() local
629 &num_channels, &type)); in TEST_F()
[all …]
Dneteq_unittest.cc428 size_t num_channels; in Process() local
430 &num_channels, &type)); in Process()
611 size_t num_channels; in TEST_F() local
614 &num_channels, &type)); in TEST_F()
656 size_t num_channels; in TEST_F() local
659 &num_channels, &type)); in TEST_F()
687 size_t num_channels; in TEST_F() local
690 &num_channels, &type)); in TEST_F()
712 size_t num_channels; in LongCngWithClockDrift() local
731 &num_channels, &type)); in LongCngWithClockDrift()
[all …]
Dneteq_stereo_unittest.cc30 size_t num_channels; member
50 : num_channels_(GetParam().num_channels), in NetEqStereoTest()
217 size_t num_channels; in RunTest() local
220 &samples_per_channel, &num_channels, in RunTest()
222 EXPECT_EQ(1u, num_channels); in RunTest()
228 &samples_per_channel, &num_channels, in RunTest()
230 EXPECT_EQ(num_channels_, num_channels); in RunTest()
389 p.num_channels = 2; in GetTestParameters()
393 p.num_channels = 5; in GetTestParameters()
404 ", num_channels = " << p.num_channels << in PrintTo()
/external/webrtc/webrtc/modules/audio_coding/codecs/opus/
Daudio_encoder_opus.cc29 config.num_channels = codec_inst.channels; in CreateConfig()
32 config.application = config.num_channels == 1 ? AudioEncoderOpus::kVoip in CreateConfig()
82 if (num_channels != 1 && num_channels != 2) in IsOk()
118 return config_.num_channels; in NumChannels()
150 rtc::CheckedDivExact(input_buffer_.size(), config_.num_channels), in EncodeInternal()
220 return rtc::CheckedDivExact(kSampleRateHz, 100) * config_.num_channels; in SamplesPer10msFrame()
233 RTC_CHECK_EQ(0, WebRtcOpus_EncoderCreate(&inst_, config.num_channels, in RecreateEncoderInstance()
/external/webrtc/webrtc/common_audio/resampler/
Dpush_resampler.cc35 size_t num_channels) { in InitializeIfNeeded() argument
38 num_channels == num_channels_) in InitializeIfNeeded()
43 num_channels <= 0 || num_channels > 2) in InitializeIfNeeded()
48 num_channels_ = num_channels; in InitializeIfNeeded()
/external/webp/src/utils/
Drescaler_utils.c25 int num_channels, rescaler_t* const work) { in WebPRescalerInit() argument
38 wrk->num_channels = num_channels; in WebPRescalerInit()
71 wrk->frow = work + num_channels * dst_width; in WebPRescalerInit()
72 memset(work, 0, 2 * dst_width * num_channels * sizeof(*work)); in WebPRescalerInit()
125 for (x = 0; x < wrk->num_channels * wrk->dst_width; ++x) { in WebPRescalerImport()

12345678