Home
last modified time | relevance | path

Searched refs:nsamples (Results 1 – 25 of 52) sorted by relevance

123

/third_party/ltp/lib/
Dtst_timer_test.c185 unsigned int nsamples) in compute_threshold() argument
191 return (400 + 2 * monotonic_resolution + slack_per_scall) * nsamples in compute_threshold()
192 + 3000/nsamples; in compute_threshold()
200 static unsigned int compute_discard(unsigned int nsamples) in compute_discard() argument
202 if (nsamples == 1) in compute_discard()
205 return MAX(1u, nsamples / 20); in compute_discard()
254 void do_timer_test(long long usec, unsigned int nsamples) in do_timer_test() argument
257 unsigned int discard = compute_discard(nsamples); in do_timer_test()
258 unsigned int keep_samples = nsamples - discard; in do_timer_test()
265 scall, usec, nsamples, 1.00 * threshold / (keep_samples)); in do_timer_test()
[all …]
/third_party/pulseaudio/src/tests/
Dcpu-sconv-test.c48 int i, nsamples; in run_conv_test_float_to_s16() local
54 nsamples = SAMPLES - (8 - align); in run_conv_test_float_to_s16()
56 for (i = 0; i < nsamples; i++) { in run_conv_test_float_to_s16()
61 orig_func(nsamples, floats, samples_ref); in run_conv_test_float_to_s16()
62 func(nsamples, floats, samples); in run_conv_test_float_to_s16()
64 for (i = 0; i < nsamples; i++) { in run_conv_test_float_to_s16()
77 func(nsamples, floats, samples); in run_conv_test_float_to_s16()
81 orig_func(nsamples, floats, samples_ref); in run_conv_test_float_to_s16()
100 int i, nsamples; in run_conv_test_s16_to_float() local
106 nsamples = SAMPLES - (8 - align); in run_conv_test_s16_to_float()
[all …]
Dcpu-remap-test.c51 unsigned i, nsamples; in run_remap_test_float() local
60 nsamples = SAMPLES - (8 - align); in run_remap_test_float()
62 for (i = 0; i < nsamples * n_ic; i++) in run_remap_test_float()
66 remap_orig->do_remap(remap_orig, out_ref, in, nsamples); in run_remap_test_float()
67 remap_func->do_remap(remap_func, out, in, nsamples); in run_remap_test_float()
69 for (i = 0; i < nsamples * n_oc; i++) { in run_remap_test_float()
83 remap_func->do_remap(remap_func, out, in, nsamples); in run_remap_test_float()
87 remap_orig->do_remap(remap_orig, out_ref, in, nsamples); in run_remap_test_float()
106 unsigned i, nsamples; in run_remap_test_s16() local
115 nsamples = SAMPLES - (8 - align); in run_remap_test_s16()
[all …]
Dcpu-mix-test.c64 int nsamples; in run_mix_test() local
77 nsamples = channels * (SAMPLES - (8 - align)); in run_mix_test()
81 pa_random(samples0, nsamples * sizeof(int16_t)); in run_mix_test()
82 c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false); in run_mix_test()
86 pa_random(samples1, nsamples * sizeof(int16_t)); in run_mix_test()
87 c1.memblock = pa_memblock_new_fixed(pool, samples1, nsamples * sizeof(int16_t), false); in run_mix_test()
107 orig_func(m, 2, channels, samples_ref, nsamples * sizeof(int16_t)); in run_mix_test()
111 func(m, 2, channels, samples, nsamples * sizeof(int16_t)); in run_mix_test()
114 for (i = 0; i < nsamples; i++) { in run_mix_test()
131 func(m, 2, channels, samples, nsamples * sizeof(int16_t)); in run_mix_test()
[all …]
Dcpu-volume-test.c52 int i, padding, nsamples, size; in run_volume_test() local
58 nsamples = SAMPLES - (8 - align); in run_volume_test()
59 if (nsamples % channels) in run_volume_test()
60 nsamples -= nsamples % channels; in run_volume_test()
61 size = nsamples * sizeof(int16_t); in run_volume_test()
76 for (i = 0; i < nsamples; i++) { in run_volume_test()
/third_party/alsa-utils/bat/
Danalyze.c239 if (length < 2 * na->nsamples) in calculate_noise_one_period()
243 for (i = 0, tmp = 0.0, shift = -1; i < na->nsamples; i++) { in calculate_noise_one_period()
261 for (i = 0; i < na->nsamples; i++) in calculate_noise_one_period()
267 for (i = 0, tmp = 0.0; i < na->nsamples; i++) in calculate_noise_one_period()
269 rms = sqrtf(tmp / na->nsamples); in calculate_noise_one_period()
273 for (i = 0; i < na->nsamples; i++) in calculate_noise_one_period()
278 for (i = 0, tmp = 0.0, residual = 0.0; i < na->nsamples; i++) { in calculate_noise_one_period()
283 tmp = na->rms_tgt / sqrtf(residual / na->nsamples); in calculate_noise_one_period()
297 int nsamples = (int) ceilf(bat->rate / freq); in calculate_noise() local
300 int nsamples_per_section = nsamples * 2; in calculate_noise()
[all …]
Dsignal.c115 int i, nsamples, max; in adjust_waveform() local
138 nsamples = channels * frames; in adjust_waveform()
140 for (i = 0; i < nsamples; i++) in adjust_waveform()
149 int c, nsamples; in generate_sine_wave() local
153 nsamples = bat->channels * frames; in generate_sine_wave()
154 sinus_f = (float *) malloc(nsamples * sizeof(float)); in generate_sine_wave()
189 float freq, int nsamples) in generate_sine_wave_raw_mono() argument
197 sin_generator_vfill(&sg, buf, nsamples); in generate_sine_wave_raw_mono()
200 err = adjust_waveform(bat, buf, nsamples, 1); in generate_sine_wave_raw_mono()
/third_party/gstreamer/gstplugins_bad/gst-libs/gst/audio/
Dgstplanaraudioadapter.c347 gsize nsamples, GstMapFlags flags) in gst_planar_audio_adapter_get_buffer() argument
355 g_return_val_if_fail (nsamples > 0, NULL); in gst_planar_audio_adapter_get_buffer()
358 nsamples); in gst_planar_audio_adapter_get_buffer()
363 if (G_UNLIKELY (nsamples > adapter->samples)) in gst_planar_audio_adapter_get_buffer()
371 if (skip == 0 && hsamples == nsamples) { in gst_planar_audio_adapter_get_buffer()
374 " as head buffer", nsamples); in gst_planar_audio_adapter_get_buffer()
378 } else if (hsamples >= nsamples + skip && !(flags & GST_MAP_WRITE)) { in gst_planar_audio_adapter_get_buffer()
385 " via copy region", nsamples); in gst_planar_audio_adapter_get_buffer()
388 gst_audio_buffer_truncate (buffer, adapter->info.bpf, skip, nsamples); in gst_planar_audio_adapter_get_buffer()
398 " via memory concatenation", nsamples); in gst_planar_audio_adapter_get_buffer()
[all …]
Dgstplanaraudioadapter.h79 gsize nsamples, GstMapFlags flags);
83 gsize nsamples, GstMapFlags flags);
/third_party/ffmpeg/libavfilter/
Daf_firequalizer.c213 OverlapIndex *av_restrict idx, float *av_restrict data, int nsamples) in fast_convolute() argument
215 if (nsamples <= s->nsamples_max) { in fast_convolute()
222 memcpy(buf + center, data, nsamples * sizeof(*data)); in fast_convolute()
223 memset(buf + center + nsamples, 0, (s->rdft_len - nsamples - center) * sizeof(*data)); in fast_convolute()
236 memcpy(data, buf, nsamples * sizeof(*data)); in fast_convolute()
238 idx->overlap_idx = nsamples; in fast_convolute()
240 while (nsamples > s->nsamples_max * 2) { in fast_convolute()
243 nsamples -= s->nsamples_max; in fast_convolute()
245 fast_convolute(s, kernel_buf, conv_buf, idx, data, nsamples/2); in fast_convolute()
246 fast_convolute(s, kernel_buf, conv_buf, idx, data + nsamples/2, nsamples - nsamples/2); in fast_convolute()
[all …]
Daf_atempo.c66 int nsamples; member
202 atempo->frag[0].nsamples = 0; in yae_clear()
206 atempo->frag[1].nsamples = 0; in yae_clear()
349 frag->nsamples * atempo->channels * sizeof(scalar_type); \
444 int nsamples = FFMIN(read_size, src_samples); in yae_load_data() local
448 nsamples = FFMIN(nsamples, atempo->ring); in yae_load_data()
449 na = FFMIN(nsamples, atempo->ring - atempo->tail); in yae_load_data()
450 nb = FFMIN(nsamples - na, atempo->ring); in yae_load_data()
507 uint32_t nsamples; in yae_load_frag() local
521 nsamples = in yae_load_frag()
[all …]
/third_party/gstreamer/gstplugins_bad/ext/soundtouch/
Dgstbpmdetect.cc205 gint nsamples; in gst_bpm_detect_transform_ip() local
227nsamples = info.size / (GST_AUDIO_INFO_BPF (&filter->info) * GST_AUDIO_INFO_CHANNELS (&filter->inf… in gst_bpm_detect_transform_ip()
235 while (nsamples > 0) { in gst_bpm_detect_transform_ip()
236 bpm_detect->priv->detect->inputSamples (inbuf, MIN (nsamples, 2048)); in gst_bpm_detect_transform_ip()
237 nsamples -= 2048; in gst_bpm_detect_transform_ip()
246 while (nsamples > 0) { in gst_bpm_detect_transform_ip()
247 memcpy (intmp, inbuf, sizeof (soundtouch::SAMPLETYPE) * 2 * MIN (nsamples, 2048)); in gst_bpm_detect_transform_ip()
248 bpm_detect->priv->detect->inputSamples (intmp, MIN (nsamples, 2048)); in gst_bpm_detect_transform_ip()
249 nsamples -= 2048; in gst_bpm_detect_transform_ip()
/third_party/gstreamer/gstplugins_bad/ext/chromaprint/
Dgstchromaprint.c131 chromaprint->nsamples = 0; in gst_chromaprint_reset()
198 guint nsamples; in gst_chromaprint_transform_ip() local
213 nsamples = map_info.size / (channels * 2); in gst_chromaprint_transform_ip()
215 if (nsamples == 0) in gst_chromaprint_transform_ip()
218 if (chromaprint->nsamples == 0) { in gst_chromaprint_transform_ip()
221 chromaprint->nsamples += nsamples; in gst_chromaprint_transform_ip()
222 chromaprint->duration = chromaprint->nsamples / rate; in gst_chromaprint_transform_ip()
/third_party/ffmpeg/libavcodec/
Ddcadec.c80 int *coeff_l, int nsamples, int ch_mask) in ff_dca_downmix_to_stereo_fixed() argument
89 dcadsp->dmix_scale(samples[DCA_SPEAKER_L], coeff_l[pos ], nsamples); in ff_dca_downmix_to_stereo_fixed()
90 dcadsp->dmix_scale(samples[DCA_SPEAKER_R], coeff_r[pos + 1], nsamples); in ff_dca_downmix_to_stereo_fixed()
99 *coeff_l, nsamples); in ff_dca_downmix_to_stereo_fixed()
103 *coeff_r, nsamples); in ff_dca_downmix_to_stereo_fixed()
111 int *coeff_l, int nsamples, int ch_mask) in ff_dca_downmix_to_stereo_float() argument
122 coeff_l[pos ] * scale, nsamples); in ff_dca_downmix_to_stereo_float()
124 coeff_r[pos + 1] * scale, nsamples); in ff_dca_downmix_to_stereo_float()
133 *coeff_l * scale, nsamples); in ff_dca_downmix_to_stereo_float()
137 *coeff_r * scale, nsamples); in ff_dca_downmix_to_stereo_float()
Dsbcdsp.c166 int nsamples, int nchannels) in sbc_enc_process_input_4s() argument
171 if (position < nsamples) { in sbc_enc_process_input_4s()
179 for (; nsamples >= 8; nsamples -= 8, pcm += 16 * nchannels) { in sbc_enc_process_input_4s()
199 int nsamples, int nchannels) in sbc_enc_process_input_8s() argument
204 if (position < nsamples) { in sbc_enc_process_input_8s()
213 nsamples -= 8; in sbc_enc_process_input_8s()
229 for (; nsamples >= 16; nsamples -= 16, pcm += 32 * nchannels) { in sbc_enc_process_input_8s()
252 if (nsamples == 8) { in sbc_enc_process_input_8s()
Ddca_xll.c390 int i, j, nsamples = nchsamples * c->nchannels * c->nfreqbands; in chs_alloc_msb_band_data() local
394 av_fast_malloc(&c->sample_buffer[0], &c->sample_size[0], nsamples * sizeof(int32_t)); in chs_alloc_msb_band_data()
411 int i, j, nsamples = 0; in chs_alloc_lsb_band_data() local
417 nsamples += s->nframesamples * c->nchannels; in chs_alloc_lsb_band_data()
418 if (!nsamples) in chs_alloc_lsb_band_data()
422 av_fast_malloc(&c->sample_buffer[1], &c->sample_size[1], nsamples * sizeof(int32_t)); in chs_alloc_lsb_band_data()
602 int i, offset, nsamples; in chs_clear_band_data() local
606 nsamples = s->nframesamples; in chs_clear_band_data()
609 nsamples = s->nsegsamples; in chs_clear_band_data()
613 memset(b->msb_sample_buffer[i] + offset, 0, nsamples * sizeof(int32_t)); in chs_clear_band_data()
[all …]
Ddca_core.c628 int nsamples = s->nsubsubframes[sf] * DCA_SUBBAND_SAMPLES; in parse_subframe_audio() local
629 if (*sub_pos + nsamples > s->npcmblocks) { in parse_subframe_audio()
649 *sub_pos, nsamples); in parse_subframe_audio()
740 *sub_pos, nsamples); in parse_subframe_audio()
749 s->nsubbands[src_ch], *sub_pos, nsamples); in parse_subframe_audio()
1164 int nsamples = s->nsubsubframes[sf] * DCA_SUBBAND_SAMPLES; in parse_x96_subframe_audio() local
1165 if (*sub_pos + nsamples > s->npcmblocks) { in parse_x96_subframe_audio()
1183 memset(samples, 0, nsamples * sizeof(int32_t)); in parse_x96_subframe_audio()
1184 else for (n = 0; n < nsamples; n++) in parse_x96_subframe_audio()
1195 for (n = 0; n < FFMIN(nsamples - ssf * 16, 16); n++) in parse_x96_subframe_audio()
[all …]
Dsbcdsp.h64 int nsamples, int nchannels);
67 int nsamples, int nchannels);
Ddcadec.h71 int *coeff_l, int nsamples, int ch_mask);
73 int *coeff_l, int nsamples, int ch_mask);
/third_party/libdrm/radeon/
Dradeon_surface.c179 if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D && in surf_minify()
191 surflevel->pitch_bytes = surflevel->nblk_x * bpe * surf->nsamples; in surf_minify()
337 xalign = surf_man->hw_info.group_bytes / (tilew * surf->bpe * surf->nsamples); in r6_surface_init_1d()
372 (tilew * surf->bpe * surf->nsamples); in r6_surface_init_2d()
384 surf->nsamples * surf->bpe * 64, in r6_surface_init_2d()
385 xalign * yalign * surf->nsamples * surf->bpe); in r6_surface_init_2d()
411 if (surf->nsamples > 1) { in r6_surface_init()
435 if (surf->nsamples > 1) { in r6_surface_init()
588 if (surf->nsamples == 1 && surflevel->mode == RADEON_SURF_MODE_2D && in eg_surf_minify()
605 surflevel->pitch_bytes = surflevel->nblk_x * bpe * surf->nsamples; in eg_surf_minify()
[all …]
/third_party/gstreamer/gstplugins_base/tests/check/elements/
Dopus.c181 const unsigned int nsamples = 4096; in GST_START_TEST() local
192 inbuffer = gst_buffer_new_and_alloc (nsamples * 2); in GST_START_TEST()
193 gst_buffer_memset (inbuffer, 0, 0, nsamples * 2); in GST_START_TEST()
218 check_buffers ((nsamples + 959) / 960); in GST_START_TEST()
229 const unsigned int nsamples = 4096; in GST_START_TEST() local
280 inbuffer = gst_buffer_new_and_alloc (nsamples * 2); in GST_START_TEST()
281 gst_buffer_memset (inbuffer, 0, 0, nsamples * 2); in GST_START_TEST()
/third_party/gstreamer/gstplugins_bad/tests/check/libs/
Dplanaraudioadapter.c25 generate_buffer (GstAudioInfo * info, gsize nsamples, in generate_buffer() argument
37 buf_sz = info->channels * (nsamples + dummy_start + dummy_end) * bps; in generate_buffer()
45 dummy_start * bps + c * (nsamples + dummy_start + dummy_end) * bps; in generate_buffer()
51 gst_buffer_memset (buf, offsets[c], c | 0xF0, nsamples * bps); in generate_buffer()
53 gst_buffer_memset (buf, offsets[c] + nsamples * bps, 0xEF, dummy_end * bps); in generate_buffer()
55 gst_buffer_add_audio_meta (buf, info, nsamples, offsets); in generate_buffer()
/third_party/gstreamer/gstplugins_base/gst/volume/
Dgstvolume.c750 guint nsamples = map.size / (width * channels); in volume_transform_ip() local
755 if (self->mutes_count < nsamples && mute_cb) { in volume_transform_ip()
756 self->mutes = g_realloc (self->mutes, sizeof (gboolean) * nsamples); in volume_transform_ip()
757 self->mutes_count = nsamples; in volume_transform_ip()
760 if (self->volumes_count < nsamples) { in volume_transform_ip()
761 self->volumes = g_realloc (self->volumes, sizeof (gdouble) * nsamples); in volume_transform_ip()
762 self->volumes_count = nsamples; in volume_transform_ip()
768 nsamples, (gpointer) self->volumes); in volume_transform_ip()
772 volume_orc_memset_f64 (self->volumes, self->current_volume, nsamples); in volume_transform_ip()
777 nsamples, (gpointer) self->mutes); in volume_transform_ip()
[all …]
/third_party/gstreamer/gstplugins_bad/gst/mxf/
Dmxfd10.c102 guint i, j, nsamples; in mxf_d10_sound_handle_essence_element() local
128 nsamples = ((map.size - 4) / 4) / 8; in mxf_d10_sound_handle_essence_element()
130 *outbuf = gst_buffer_new_and_alloc (nsamples * data->width * data->channels); in mxf_d10_sound_handle_essence_element()
140 for (i = 0; i < nsamples; i++) { in mxf_d10_sound_handle_essence_element()
/third_party/ffmpeg/libavcodec/arm/
Dsbcdsp_init_arm.c50 int nsamples, int nchannels);
53 int nsamples, int nchannels);

123