Home
last modified time | relevance | path

Searched refs:num_samples (Results 1 – 25 of 112) sorted by relevance

12345

/external/webrtc/webrtc/common_audio/
Dwav_file.cc45 << (1.f * num_samples()) / (num_channels() * sample_rate()) << " s"; in FormatAsString()
67 size_t WavReader::ReadSamples(size_t num_samples, int16_t* samples) { in ReadSamples() argument
72 num_samples = std::min(num_samples, num_samples_remaining_); in ReadSamples()
74 fread(samples, sizeof(*samples), num_samples, file_handle_); in ReadSamples()
76 RTC_CHECK(read == num_samples || feof(file_handle_)); in ReadSamples()
82 size_t WavReader::ReadSamples(size_t num_samples, float* samples) { in ReadSamples() argument
85 for (size_t i = 0; i < num_samples; i += kChunksize) { in ReadSamples()
87 size_t chunk = std::min(kChunksize, num_samples - i); in ReadSamples()
121 void WavWriter::WriteSamples(const int16_t* samples, size_t num_samples) { in WriteSamples() argument
126 fwrite(samples, sizeof(*samples), num_samples, file_handle_); in WriteSamples()
[all …]
Dwav_header_unittest.cc98 size_t num_samples = 0; in TEST() local
123 &bytes_per_sample, &num_samples)); in TEST()
144 &bytes_per_sample, &num_samples)); in TEST()
165 &bytes_per_sample, &num_samples)); in TEST()
187 &bytes_per_sample, &num_samples)); in TEST()
210 &bytes_per_sample, &num_samples)); in TEST()
229 &bytes_per_sample, &num_samples)); in TEST()
241 &bytes_per_sample, &num_samples)); in TEST()
275 size_t num_samples = 0; in TEST() local
279 &bytes_per_sample, &num_samples)); in TEST()
[all …]
Dwav_file.h31 virtual size_t num_samples() const = 0;
50 void WriteSamples(const float* samples, size_t num_samples);
51 void WriteSamples(const int16_t* samples, size_t num_samples);
55 size_t num_samples() const override { return num_samples_; } in num_samples() function
78 size_t ReadSamples(size_t num_samples, float* samples);
79 size_t ReadSamples(size_t num_samples, int16_t* samples);
83 size_t num_samples() const override { return num_samples_; } in num_samples() function
109 size_t num_samples);
Dwav_header.cc66 size_t num_samples) { in CheckWavParameters() argument
104 if (num_samples > max_samples) in CheckWavParameters()
108 if (num_samples % num_channels != 0) in CheckWavParameters()
153 size_t num_samples) { in WriteWavHeader() argument
155 bytes_per_sample, num_samples)); in WriteWavHeader()
158 const size_t bytes_in_payload = bytes_per_sample * num_samples; in WriteWavHeader()
188 size_t* num_samples) { in ReadWavHeader() argument
217 *num_samples = bytes_in_payload / *bytes_per_sample; in ReadWavHeader()
239 *bytes_per_sample, *num_samples); in ReadWavHeader()
Dwav_file_unittest.cc34 EXPECT_EQ(0u, w.num_samples()); in TEST()
36 EXPECT_EQ(kNumSamples, w.num_samples()); in TEST()
82 EXPECT_EQ(kNumSamples, r.num_samples()); in TEST()
155 EXPECT_EQ(0u, w.num_samples()); in TEST()
157 EXPECT_EQ(kNumSamples, w.num_samples()); in TEST()
166 EXPECT_EQ(kNumSamples, r.num_samples()); in TEST()
Dwav_header.h39 size_t num_samples);
50 size_t num_samples);
60 size_t* num_samples);
/external/webrtc/webrtc/modules/audio_coding/neteq/
Dstatistics_calculator.cc143 void StatisticsCalculator::ExpandedVoiceSamples(size_t num_samples) { in ExpandedVoiceSamples() argument
144 expanded_speech_samples_ += num_samples; in ExpandedVoiceSamples()
147 void StatisticsCalculator::ExpandedNoiseSamples(size_t num_samples) { in ExpandedNoiseSamples() argument
148 expanded_noise_samples_ += num_samples; in ExpandedNoiseSamples()
151 void StatisticsCalculator::PreemptiveExpandedSamples(size_t num_samples) { in PreemptiveExpandedSamples() argument
152 preemptive_samples_ += num_samples; in PreemptiveExpandedSamples()
155 void StatisticsCalculator::AcceleratedSamples(size_t num_samples) { in AcceleratedSamples() argument
156 accelerate_samples_ += num_samples; in AcceleratedSamples()
159 void StatisticsCalculator::AddZeros(size_t num_samples) { in AddZeros() argument
160 added_zero_samples_ += num_samples; in AddZeros()
[all …]
Dstatistics_calculator.h42 void ExpandedVoiceSamples(size_t num_samples);
46 void ExpandedNoiseSamples(size_t num_samples);
50 void PreemptiveExpandedSamples(size_t num_samples);
53 void AcceleratedSamples(size_t num_samples);
56 void AddZeros(size_t num_samples);
62 void LostSamples(size_t num_samples);
67 void IncreaseCounter(size_t num_samples, int fs_hz);
73 void SecondaryDecodedSamples(int num_samples);
Ddtmf_tone_generator.cc152 int DtmfToneGenerator::Generate(size_t num_samples, in Generate() argument
162 output->AssertSize(num_samples); in Generate()
163 for (size_t i = 0; i < num_samples; ++i) { in Generate()
189 return static_cast<int>(num_samples); in Generate()
/external/mesa3d/src/mesa/drivers/dri/i965/
Dgen6_multisample_state.c35 unsigned num_samples) in gen6_emit_3dstate_multisample() argument
43 switch (num_samples) { in gen6_emit_3dstate_multisample()
118 unsigned num_samples, float coverage, in gen6_emit_3dstate_sample_mask() argument
125 if (num_samples > 1) { in gen6_emit_3dstate_sample_mask()
126 int coverage_int = (int) (num_samples * coverage + 0.5); in gen6_emit_3dstate_sample_mask()
129 coverage_bits ^= (1 << num_samples) - 1; in gen6_emit_3dstate_sample_mask()
146 unsigned num_samples = ctx->DrawBuffer->Visual.samples; in upload_multisample_state() local
157 gen6_emit_3dstate_multisample(brw, num_samples); in upload_multisample_state()
158 gen6_emit_3dstate_sample_mask(brw, num_samples, coverage, coverage_invert); in upload_multisample_state()
Dbrw_blorp_blit.cpp496 void encode_msaa(unsigned num_samples, intel_msaa_layout layout);
497 void decode_msaa(unsigned num_samples, intel_msaa_layout layout);
501 void manual_blend(unsigned num_samples);
1016 brw_blorp_blit_program::encode_msaa(unsigned num_samples, in encode_msaa() argument
1034 switch (num_samples) { in encode_msaa()
1103 brw_blorp_blit_program::decode_msaa(unsigned num_samples, in decode_msaa() argument
1122 switch (num_samples) { in decode_msaa()
1247 brw_blorp_blit_program::manual_blend(unsigned num_samples) in manual_blend() argument
1288 for (unsigned i = 0; i < num_samples; ++i) { in manual_blend()
1344 brw_imm_f(1.0/num_samples)); in manual_blend()
[all …]
Dintel_mipmap_tree.c84 GLuint num_samples, in intel_miptree_create_internal() argument
105 mt->num_samples = num_samples; in intel_miptree_create_internal()
138 num_samples > 1 ? INTEL_MSAA_LAYOUT_IMS : INTEL_MSAA_LAYOUT_NONE; in intel_miptree_create_internal()
148 num_samples, in intel_miptree_create_internal()
196 GLuint num_samples, in intel_miptree_create() argument
238 false, num_samples, msaa_layout); in intel_miptree_create()
349 uint32_t num_samples, in intel_miptree_create_for_dri2_buffer() argument
369 if (num_samples == 0) in intel_miptree_create_for_dri2_buffer()
376 num_samples); in intel_miptree_create_for_dri2_buffer()
399 uint32_t num_samples) in intel_miptree_create_for_renderbuffer() argument
[all …]
Dbrw_blorp.cpp42 num_samples(0) in brw_blorp_surface_info()
72 this->num_samples = mt->num_samples; in set()
150 num_samples(0), in brw_blorp_params()
/external/opencv3/modules/ml/src/
Dtestset.cpp59 void createConcentricSpheresTestSet( int num_samples, int num_features, int num_classes, in createConcentricSpheresTestSet() argument
62 if( num_samples < 1 ) in createConcentricSpheresTestSet()
73 _samples.create( num_samples, num_features, CV_32F ); in createConcentricSpheresTestSet()
74 _responses.create( 1, num_samples, CV_32S ); in createConcentricSpheresTestSet()
82 randMVNormal( mean, cov, num_samples, _samples ); in createConcentricSpheresTestSet()
99 num_classes = std::min( num_samples, num_classes ); in createConcentricSpheresTestSet()
100 for( i = 0, cur_class = 0; i < num_samples; ++cur_class ) in createConcentricSpheresTestSet()
102 int last_idx = num_samples * (cur_class + 1) / num_classes - 1; in createConcentricSpheresTestSet()
106 for( ; i < num_samples && dis[i].d <= max_dst; ++i ) in createConcentricSpheresTestSet()
/external/opencv/ml/src/
Dmltestset.cpp60 int num_samples, in cvCreateTestSet() argument
87 if( num_samples < 1 ) in cvCreateTestSet()
105 CV_CALL( *samples = cvCreateMat( num_samples, num_features, CV_32FC1 ) ); in cvCreateTestSet()
106 CV_CALL( *responses = cvCreateMat( 1, num_samples, CV_32SC1 ) ); in cvCreateTestSet()
133 num_classes = MIN( num_samples, num_classes ); in cvCreateTestSet()
136 for( i = 0, cur_class = 0; i < num_samples; ++cur_class ) in cvCreateTestSet()
141 last_idx = num_samples * (cur_class + 1) / num_classes - 1; in cvCreateTestSet()
145 for( ; elem.d <= max_dst && i < num_samples; ++i ) in cvCreateTestSet()
148 if( i < num_samples - 1 ) in cvCreateTestSet()
/external/webrtc/webrtc/modules/video_coding/utility/
Dmoving_average.h24 bool GetAverage(size_t num_samples, T* average);
44 bool MovingAverage<T>::GetAverage(size_t num_samples, T* avg) { in GetAverage() argument
45 if (num_samples > samples_.size()) in GetAverage()
49 while (num_samples < samples_.size()) { in GetAverage()
54 *avg = sum_ / static_cast<T>(num_samples); in GetAverage()
/external/webrtc/webrtc/modules/audio_coding/neteq/tools/
Daudio_sink.h30 virtual bool WriteArray(const int16_t* audio, size_t num_samples) = 0;
50 bool WriteArray(const int16_t* audio, size_t num_samples) override { in WriteArray() argument
51 return left_sink_->WriteArray(audio, num_samples) && in WriteArray()
52 right_sink_->WriteArray(audio, num_samples); in WriteArray()
Doutput_audio_file.h37 bool WriteArray(const int16_t* audio, size_t num_samples) override { in WriteArray() argument
39 return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples; in WriteArray()
/external/webrtc/webrtc/modules/utility/source/
Dfile_player_unittests.cc64 size_t num_samples; in PlayFileAndCheck() local
66 player_->Get10msAudioFromFile(out, num_samples, kSampleRateHz)); in PlayFileAndCheck()
67 checksum.Update(out, num_samples * sizeof(out[0])); in PlayFileAndCheck()
69 ASSERT_EQ(num_samples, in PlayFileAndCheck()
70 fwrite(out, sizeof(out[0]), num_samples, output_file_)); in PlayFileAndCheck()
/external/mesa3d/src/mesa/drivers/dri/intel/
Dintel_mipmap_tree.h217 GLuint num_samples; member
381 GLuint num_samples,
394 uint32_t num_samples,
409 uint32_t num_samples);
487 GLuint num_samples);
506 GLuint num_samples);
Dintel_mipmap_tree.c84 GLuint num_samples, in intel_miptree_create_internal() argument
105 mt->num_samples = num_samples; in intel_miptree_create_internal()
138 num_samples > 1 ? INTEL_MSAA_LAYOUT_IMS : INTEL_MSAA_LAYOUT_NONE; in intel_miptree_create_internal()
148 num_samples, in intel_miptree_create_internal()
196 GLuint num_samples, in intel_miptree_create() argument
238 false, num_samples, msaa_layout); in intel_miptree_create()
349 uint32_t num_samples, in intel_miptree_create_for_dri2_buffer() argument
369 if (num_samples == 0) in intel_miptree_create_for_dri2_buffer()
376 num_samples); in intel_miptree_create_for_dri2_buffer()
399 uint32_t num_samples) in intel_miptree_create_for_renderbuffer() argument
[all …]
/external/mesa3d/src/mesa/drivers/dri/i915/
Dintel_mipmap_tree.c84 GLuint num_samples, in intel_miptree_create_internal() argument
105 mt->num_samples = num_samples; in intel_miptree_create_internal()
138 num_samples > 1 ? INTEL_MSAA_LAYOUT_IMS : INTEL_MSAA_LAYOUT_NONE; in intel_miptree_create_internal()
148 num_samples, in intel_miptree_create_internal()
196 GLuint num_samples, in intel_miptree_create() argument
238 false, num_samples, msaa_layout); in intel_miptree_create()
349 uint32_t num_samples, in intel_miptree_create_for_dri2_buffer() argument
369 if (num_samples == 0) in intel_miptree_create_for_dri2_buffer()
376 num_samples); in intel_miptree_create_for_dri2_buffer()
399 uint32_t num_samples) in intel_miptree_create_for_renderbuffer() argument
[all …]
/external/webrtc/webrtc/video/
Dsend_statistics_proxy.cc404 ++num_samples; in Add()
408 if (num_samples < min_required_samples || num_samples == 0) in Avg()
410 return (sum + (num_samples / 2)) / num_samples; in Avg()
416 ++num_samples; in Add()
431 if (num_samples < min_required_samples || num_samples == 0) in Fraction()
433 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); in Fraction()
/external/webrtc/webrtc/modules/audio_processing/logging/
Daec_logging.h21 #define RTC_AEC_DEBUG_WAV_WRITE(file, data, num_samples) \ argument
23 rtc_WavWriteSamples(file, data, num_samples); \
73 #define RTC_AEC_DEBUG_WAV_WRITE(file, data, num_samples) \ argument
/external/webrtc/webrtc/modules/audio_processing/transient/
Dtransient_suppression_test.cc127 size_t num_samples, in WritePCM() argument
130 rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[num_channels * num_samples]); in WritePCM()
133 for (size_t j = 0; j < num_samples; ++j) { in WritePCM()
134 ibuf[i + j * num_channels] = FloatS16ToS16(buffer[i * num_samples + j]); in WritePCM()
137 fwrite(ibuf.get(), sizeof(ibuf[0]), num_channels * num_samples, f); in WritePCM()

12345