Home
last modified time | relevance | path

Searched refs:sample_rate (Results 1 – 25 of 889) sorted by relevance

12345678910>>...36

/third_party/ffmpeg/tests/
Daudiogen.c117 static void put_wav_header(int sample_rate, int channels, int nb_samples) in put_wav_header() argument
128 put32(sample_rate); in put_wav_header()
129 put32(block_align * sample_rate); in put_wav_header()
143 int sample_rate = 44100; in main() local
156 sample_rate = atoi(argv[2]); in main()
157 if (sample_rate <= 0) { in main()
158 fprintf(stderr, "invalid sample rate: %d\n", sample_rate); in main()
181 put_wav_header(sample_rate, nb_channels, 6 * sample_rate); in main()
185 for (i = 0; i < 1 * sample_rate; i++) { in main()
189 a += (1000 * FRAC_ONE) / sample_rate; in main()
[all …]
/third_party/mindspore/mindspore/dataset/audio/
Dtransforms.py67 def __init__(self, sample_rate, central_freq, Q=0.707): argument
68 self.sample_rate = sample_rate
73 return cde.AllpassBiquadOperation(self.sample_rate, self.central_freq, self.Q)
150 def __init__(self, sample_rate, central_freq, Q=0.707, noise=False): argument
151 self.sample_rate = sample_rate
157 return cde.BandBiquadOperation(self.sample_rate, self.central_freq, self.Q, self.noise)
181 def __init__(self, sample_rate, central_freq, Q=0.707, const_skirt_gain=False): argument
182 self.sample_rate = sample_rate
188 …return cde.BandpassBiquadOperation(self.sample_rate, self.central_freq, self.Q, self.const_skirt_g…
210 def __init__(self, sample_rate, central_freq, Q=0.707): argument
[all …]
Dvalidators.py53 def check_biquad_sample_rate(sample_rate): argument
55 type_check(sample_rate, (int,), "sample_rate")
56 check_int32_not_zero(sample_rate, "sample_rate")
92 [sample_rate, central_freq, Q, noise], _ = parse_user_args(
94 check_biquad_sample_rate(sample_rate)
114 [sample_rate, cutoff_freq, Q], _ = parse_user_args(method, *args, **kwargs)
115 check_biquad_sample_rate(sample_rate)
128 [sample_rate, central_freq, Q], _ = parse_user_args(
130 check_biquad_sample_rate(sample_rate)
143 [sample_rate, central_freq, Q, const_skirt_gain], _ = parse_user_args(
[all …]
/third_party/ffmpeg/libavformat/
Dvpcc.c73 int64_t sample_rate; in get_vp9_level() local
77 sample_rate = 0; in get_vp9_level()
79 sample_rate = ((int64_t)picture_size * frame_rate->num) / frame_rate->den; in get_vp9_level()
83 } else if (sample_rate <= 829440 && picture_size <= 36864) { in get_vp9_level()
85 } else if (sample_rate <= 2764800 && picture_size <= 73728) { in get_vp9_level()
87 } else if (sample_rate <= 4608000 && picture_size <= 122880) { in get_vp9_level()
89 } else if (sample_rate <= 9216000 && picture_size <= 245760) { in get_vp9_level()
91 } else if (sample_rate <= 20736000 && picture_size <= 552960) { in get_vp9_level()
93 } else if (sample_rate <= 36864000 && picture_size <= 983040) { in get_vp9_level()
95 } else if (sample_rate <= 83558400 && picture_size <= 2228224) { in get_vp9_level()
[all …]
Dvoc_packet.c34 int sample_rate = 0; in ff_voc_get_packet() local
70 if (!par->sample_rate) { in ff_voc_get_packet()
71 par->sample_rate = 1000000 / (256 - avio_r8(pb)); in ff_voc_get_packet()
72 if (sample_rate) in ff_voc_get_packet()
73 par->sample_rate = sample_rate; in ff_voc_get_packet()
74 avpriv_set_pts_info(st, 64, 1, par->sample_rate); in ff_voc_get_packet()
89 sample_rate = avio_rl16(pb); in ff_voc_get_packet()
92 sample_rate = 256000000 / (channels * (65536 - sample_rate)); in ff_voc_get_packet()
102 if (!par->sample_rate) { in ff_voc_get_packet()
103 par->sample_rate = avio_rl32(pb); in ff_voc_get_packet()
[all …]
Dsoxdec.c51 double sample_rate, sample_rate_frac; in sox_read_header() local
64 sample_rate = av_int2double(avio_rl64(pb)); in sox_read_header()
71 sample_rate = av_int2double(avio_rb64(pb)); in sox_read_header()
81 if (sample_rate <= 0 || sample_rate > INT_MAX) { in sox_read_header()
82 av_log(s, AV_LOG_ERROR, "invalid sample rate (%f)\n", sample_rate); in sox_read_header()
86 sample_rate_frac = sample_rate - floor(sample_rate); in sox_read_header()
114 st->codecpar->sample_rate = sample_rate; in sox_read_header()
116 st->codecpar->bit_rate = (int64_t)st->codecpar->sample_rate * in sox_read_header()
122 avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); in sox_read_header()
Didcin.c96 unsigned int number, sample_rate; in idcin_probe() local
127 sample_rate = AV_RL32(&p->buf[8]); in idcin_probe()
128 if (sample_rate && (sample_rate < 8000 || sample_rate > 48000)) in idcin_probe()
133 if (number > 2 || sample_rate && !number) in idcin_probe()
138 if (number > 2 || sample_rate && !number) in idcin_probe()
158 unsigned int sample_rate, bytes_per_sample, channels; in idcin_read_header() local
164 sample_rate = avio_rl32(pb); in idcin_read_header()
175 if (sample_rate > 0) { in idcin_read_header()
176 if (sample_rate < 14 || sample_rate > INT_MAX) { in idcin_read_header()
177 av_log(s, AV_LOG_ERROR, "invalid sample rate: %u\n", sample_rate); in idcin_read_header()
[all …]
Dpp_bnk.c34 uint32_t sample_rate; /*< Sample rate of the contained tracks. */ member
43 uint32_t sample_rate; /*< Sample rate. */ member
70 hdr->sample_rate = AV_RL32(buf + 4); in pp_bnk_parse_header()
80 trk->sample_rate = AV_RL32(buf + 8); in pp_bnk_parse_track()
87 uint32_t sample_rate = AV_RL32(p->buf + 4); in pp_bnk_probe() local
94 if ((sample_rate != 5512) && (sample_rate != 11025) && in pp_bnk_probe()
95 (sample_rate != 22050) && (sample_rate != 44100)) in pp_bnk_probe()
99 if (AV_RL32(p->buf + 28) != sample_rate) in pp_bnk_probe()
127 if (hdr.sample_rate == 0 || hdr.sample_rate > INT_MAX) in pp_bnk_read_header()
160 if (e.sample_rate != hdr.sample_rate) { in pp_bnk_read_header()
[all …]
Dmusx.c72 st->codecpar->sample_rate = 32000; in musx_read_header()
81 st->codecpar->sample_rate = 44100; in musx_read_header()
91 st->codecpar->sample_rate = avio_rl32(s->pb); in musx_read_header()
110 st->codecpar->sample_rate = avio_rl32(s->pb); in musx_read_header()
116 st->codecpar->sample_rate = 32000; in musx_read_header()
122 st->codecpar->sample_rate = 32768; in musx_read_header()
128 st->codecpar->sample_rate = 32000; in musx_read_header()
144 st->codecpar->sample_rate = 32000; in musx_read_header()
150 st->codecpar->sample_rate = 32000; in musx_read_header()
156 st->codecpar->sample_rate = 44100; in musx_read_header()
[all …]
Dpvfdec.c38 int bps, channels, sample_rate; in pvf_read_header() local
44 &sample_rate, in pvf_read_header()
49 bps <= 0 || bps > INT_MAX / FF_SANE_NB_CHANNELS || sample_rate <= 0) in pvf_read_header()
58 st->codecpar->sample_rate = sample_rate; in pvf_read_header()
63 avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); in pvf_read_header()
Depafdec.c42 int le, sample_rate, codec, channels; in epaf_read_header() local
54 sample_rate = avio_rl32(s->pb); in epaf_read_header()
58 sample_rate = avio_rb32(s->pb); in epaf_read_header()
63 if (channels <= 0 || channels > FF_SANE_NB_CHANNELS || sample_rate <= 0) in epaf_read_header()
72 st->codecpar->sample_rate = sample_rate; in epaf_read_header()
89 avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); in epaf_read_header()
Dircamdec.c55 uint32_t magic, sample_rate, channels, tag; in ircam_read_header() local
69 sample_rate = lrintf(av_int2float(avio_rl32(s->pb))); in ircam_read_header()
74 sample_rate = lrintf(av_int2float(avio_rb32(s->pb))); in ircam_read_header()
82 if (!channels || !sample_rate) in ircam_read_header()
93 st->codecpar->sample_rate = sample_rate; in ircam_read_header()
103 avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); in ircam_read_header()
Dalp.c38 uint32_t sample_rate; /*< Sample rate, only if header_size >= 12. */ member
100 hdr->sample_rate = 22050; in alp_read_header()
104 hdr->sample_rate = avio_rl32(s->pb); in alp_read_header()
107 if (hdr->sample_rate > 44100) { in alp_read_header()
119 par->sample_rate = hdr->sample_rate; in alp_read_header()
133 par->sample_rate * in alp_read_header()
136 avpriv_set_pts_info(st, 64, 1, par->sample_rate); in alp_read_header()
209 if (par->sample_rate > 44100) { in alp_write_init()
214 if (alp->type == ALP_TYPE_TUN && par->sample_rate != 22050) { in alp_write_init()
232 avio_wl32(s->pb, par->sample_rate); in alp_write_header()
Doggparsecelt.c46 uint32_t version, sample_rate, nb_channels; in celt_header() local
59 sample_rate = AV_RL32(p + 36); in celt_header()
66 st->codecpar->sample_rate = sample_rate; in celt_header()
68 if (sample_rate) in celt_header()
69 avpriv_set_pts_info(st, 64, 1, sample_rate); in celt_header()
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/
Daudio.cc48 Data(int32_t sample_rate, float central_freq, float Q) in Data()
49 : sample_rate_(sample_rate), central_freq_(central_freq), Q_(Q) {} in Data()
55 AllpassBiquad::AllpassBiquad(int32_t sample_rate, float central_freq, float Q) in AllpassBiquad() argument
56 : data_(std::make_shared<Data>(sample_rate, central_freq, Q)) {} in AllpassBiquad()
85 Data(int32_t sample_rate, float central_freq, float Q, bool noise) in Data()
86 : sample_rate_(sample_rate), central_freq_(central_freq), Q_(Q), noise_(noise) {} in Data()
93 BandBiquad::BandBiquad(int32_t sample_rate, float central_freq, float Q, bool noise) in BandBiquad() argument
94 : data_(std::make_shared<Data>(sample_rate, central_freq, Q, noise)) {} in BandBiquad()
102 Data(int32_t sample_rate, float central_freq, float Q, bool const_skirt_gain) in Data()
103 …: sample_rate_(sample_rate), central_freq_(central_freq), Q_(Q), const_skirt_gain_(const_skirt_gai… in Data()
[all …]
/third_party/ffmpeg/libavcodec/
Dmpegaudiodecheader.c38 int sample_rate, frame_size, mpeg25, padding; in avpriv_mpegaudio_decode_header() local
59 sample_rate = avpriv_mpa_freq_tab[sample_rate_index] >> (s->lsf + mpeg25); in avpriv_mpegaudio_decode_header()
63 s->sample_rate = sample_rate; in avpriv_mpegaudio_decode_header()
84 frame_size = (frame_size * 12000) / sample_rate; in avpriv_mpegaudio_decode_header()
88 frame_size = (frame_size * 144000) / sample_rate; in avpriv_mpegaudio_decode_header()
93 frame_size = (frame_size * 144000) / (sample_rate << s->lsf); in avpriv_mpegaudio_decode_header()
105 s->layer, s->sample_rate, s->bit_rate); in avpriv_mpegaudio_decode_header()
122 int ff_mpa_decode_header(uint32_t head, int *sample_rate, int *channels, int *frame_size, int *bit_… in ff_mpa_decode_header() argument
150 *sample_rate = s->sample_rate; in ff_mpa_decode_header()
Dwma_common.c32 av_cold int ff_wma_get_frame_len_bits(int sample_rate, int version, in ff_wma_get_frame_len_bits() argument
37 if (sample_rate <= 16000) in ff_wma_get_frame_len_bits()
39 else if (sample_rate <= 22050 || (sample_rate <= 32000 && version == 1)) in ff_wma_get_frame_len_bits()
41 else if (sample_rate <= 48000 || version < 3) in ff_wma_get_frame_len_bits()
43 else if (sample_rate <= 96000) in ff_wma_get_frame_len_bits()
Dadx.c26 void ff_adx_calculate_coeffs(int cutoff, int sample_rate, int bits, int *coeff) in ff_adx_calculate_coeffs() argument
30 a = M_SQRT2 - cos(2.0 * M_PI * cutoff / sample_rate); in ff_adx_calculate_coeffs()
66 avctx->sample_rate = AV_RB32(buf + 8); in ff_adx_decode_header()
67 if (avctx->sample_rate < 1 || in ff_adx_decode_header()
68 avctx->sample_rate > INT_MAX / (avctx->channels * BLOCK_SIZE * 8)) in ff_adx_decode_header()
72 avctx->bit_rate = avctx->sample_rate * avctx->channels * BLOCK_SIZE * 8 / BLOCK_SAMPLES; in ff_adx_decode_header()
77 ff_adx_calculate_coeffs(cutoff, avctx->sample_rate, COEFF_BITS, coeff); in ff_adx_decode_header()
Ddca_parser.c194 int buf_size, int *duration, int *sample_rate, in dca_parse_params() argument
229 *sample_rate = ff_dca_sampling_freqs[pc1->sr_code]; in dca_parse_params()
254 *sample_rate = asset->max_sample_rate; in dca_parse_params()
255 *duration = (1 + (*sample_rate > 96000)) << nsamples_log2; in dca_parse_params()
270 *sample_rate = avpriv_dca_sample_rates[h.sr_code]; in dca_parse_params()
312 int next, duration, sample_rate; in dca_parse() local
334 if (!dca_parse_params(pc1, buf, buf_size, &duration, &sample_rate, &avctx->profile)) { in dca_parse()
335 if (!avctx->sample_rate) in dca_parse()
336 avctx->sample_rate = sample_rate; in dca_parse()
337 s->duration = av_rescale(duration, avctx->sample_rate, sample_rate); in dca_parse()
/third_party/ffmpeg/libavfilter/
Daf_asetrate.c27 int sample_rate; member
42 OPT_INT("sample_rate", sample_rate, 44100, 1, INT_MAX, "set the sample rate",),
43 OPT_INT("r", sample_rate, 44100, 1, INT_MAX, "set the sample rate",),
52 int sample_rates[] = { sr->sample_rate, -1 }; in query_formats()
64 int inrate = inlink->sample_rate; in config_props()
68 outlink->time_base.den = outlink->sample_rate; in config_props()
72 if (av_q2d(intb) > 1.0 / FFMAX(inrate, outlink->sample_rate)) in config_props()
84 frame->sample_rate = outlink->sample_rate; in filter_frame()
86 frame->pts = av_rescale(frame->pts, inlink->sample_rate, in filter_frame()
87 outlink->sample_rate); in filter_frame()
Daf_aresample.c148 … outlink->channel_layout, outlink->format, outlink->sample_rate, in config_output()
149 inlink->channel_layout, inlink->format, inlink->sample_rate, in config_output()
167 av_assert0(outlink->sample_rate == out_rate); in config_output()
171 aresample->ratio = (double)outlink->sample_rate / inlink->sample_rate; in config_output()
177 … inlink ->channels, inchl_buf, av_get_sample_fmt_name(inlink->format), inlink->sample_rate, in config_output()
178 … outlink->channels, outchl_buf, av_get_sample_fmt_name(outlink->format), outlink->sample_rate); in config_output()
192 delay = swr_get_delay(aresample->swr, outlink->sample_rate); in filter_frame()
207 outsamplesref->sample_rate = outlink->sample_rate; in filter_frame()
210 …nsamplesref->pts, inlink->time_base.num * (int64_t)outlink->sample_rate * inlink->sample_rate, inl… in filter_frame()
213 outsamplesref->pts = ROUNDED_DIV(outpts, inlink->sample_rate); in filter_frame()
[all …]
/third_party/ffmpeg/libavdevice/
Dalsa_enc.c54 unsigned int sample_rate; in audio_write_header() local
64 sample_rate = st->codecpar->sample_rate; in audio_write_header()
66 res = ff_alsa_open(s1, SND_PCM_STREAM_PLAYBACK, &sample_rate, in audio_write_header()
68 if (sample_rate != st->codecpar->sample_rate) { in audio_write_header()
71 st->codecpar->sample_rate, sample_rate); in audio_write_header()
74 avpriv_set_pts_info(st, 64, 1, sample_rate); in audio_write_header()
/third_party/ffmpeg/libavresample/tests/
Davresample.c83 int channels, int sample_rate, int nb_samples) in audiogen() argument
97 for (i = 0; i < 1 * sample_rate && k < nb_samples; i++, k++) { in audiogen()
101 a += M_PI * 1000.0 * 2.0 / sample_rate; in audiogen()
106 for (i = 0; i < 1 * sample_rate && k < nb_samples; i++, k++) { in audiogen()
110 f = 100.0 + (((10000.0 - 100.0) * i) / sample_rate); in audiogen()
111 a += M_PI * f * 2.0 / sample_rate; in audiogen()
115 for (i = 0; i < sample_rate / 2 && k < nb_samples; i++, k++) { in audiogen()
122 for (i = 0; i < sample_rate / 2 && k < nb_samples; i++, k++) { in audiogen()
134 for (i = 0; i < 1 * sample_rate && k < nb_samples; i++, k++) { in audiogen()
138 f = tabf1[ch] + (((tabf2[ch] - tabf1[ch]) * i) / sample_rate); in audiogen()
[all …]
/third_party/mindspore/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/audio/kernels/ir/
Dbindings.cc54 .def(py::init([](int32_t sample_rate, float central_freq, float Q) { in __anonb7c3dee10102() argument
55 …auto allpass_biquad = std::make_shared<audio::AllpassBiquadOperation>(sample_rate, central_freq, Q… in __anonb7c3dee10102()
93 .def(py::init([](int32_t sample_rate, float central_freq, float Q, bool noise) { in __anonb7c3dee10802() argument
94 …auto band_biquad = std::make_shared<audio::BandBiquadOperation>(sample_rate, central_freq, Q, nois… in __anonb7c3dee10802()
104 .def(py::init([](int32_t sample_rate, float central_freq, float Q, bool const_skirt_gain) { in __anonb7c3dee10a02() argument
106 … std::make_shared<audio::BandpassBiquadOperation>(sample_rate, central_freq, Q, const_skirt_gain); in __anonb7c3dee10a02()
115 .def(py::init([](int32_t sample_rate, float central_freq, float Q) { in __anonb7c3dee10c02() argument
117 … std::make_shared<audio::BandrejectBiquadOperation>(sample_rate, central_freq, Q); in __anonb7c3dee10c02()
127 .def(py::init([](int32_t sample_rate, float gain, float central_freq, float Q) { in __anonb7c3dee10e02() argument
128 …auto bass_biquad = std::make_shared<audio::BassBiquadOperation>(sample_rate, gain, central_freq, Q… in __anonb7c3dee10e02()
[all …]
/third_party/gstreamer/gstplugins_good/gst/audioparsers/
Dgstaacparse.c106 aacparse, GstBitReader * br, gint * object_type, gint * sample_rate,
226 gst_codec_utils_aac_get_index_from_sample_rate (aacparse->sample_rate); in gst_aac_parse_set_src_caps()
236 if (aacparse->sample_rate > 0) in gst_aac_parse_set_src_caps()
237 gst_structure_set (s, "rate", G_TYPE_INT, aacparse->sample_rate, NULL); in gst_aac_parse_set_src_caps()
292 aacparse->sample_rate); in gst_aac_parse_set_src_caps()
337 &aacparse->object_type, &aacparse->sample_rate, &aacparse->channels, in gst_aac_parse_sink_setcaps()
345 "samples=%d", aacparse->object_type, aacparse->sample_rate, in gst_aac_parse_sink_setcaps()
360 gst_structure_get_int (structure, "rate", &aacparse->sample_rate); in gst_aac_parse_sink_setcaps()
370 aacparse->sample_rate = 0; in gst_aac_parse_sink_setcaps()
535 gint * sample_rate) in gst_aac_parse_get_audio_sample_rate() argument
[all …]

12345678910>>...36