Home
last modified time | relevance | path

Searched refs:nb_channels (Results 1 – 25 of 61) sorted by relevance

123

/third_party/ffmpeg/libavutil/
Dsamplefmt.c119 int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, in av_samples_get_buffer_size() argument
127 if (!sample_size || nb_samples <= 0 || nb_channels <= 0) in av_samples_get_buffer_size()
139 if (nb_channels > INT_MAX / align || in av_samples_get_buffer_size()
140 (int64_t)nb_channels * nb_samples > (INT_MAX - (align * nb_channels)) / sample_size) in av_samples_get_buffer_size()
144 FFALIGN(nb_samples * sample_size * nb_channels, align); in av_samples_get_buffer_size()
148 return planar ? line_size * nb_channels : line_size; in av_samples_get_buffer_size()
152 const uint8_t *buf, int nb_channels, int nb_samples, in av_samples_fill_arrays() argument
158 buf_size = av_samples_get_buffer_size(&line_size, nb_channels, nb_samples, in av_samples_fill_arrays()
164 for (ch = 1; planar && ch < nb_channels; ch++) in av_samples_fill_arrays()
173 int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, in av_samples_alloc() argument
[all …]
Dchannel_layout.c81 int nb_channels; member
161 int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, int* nb_channels) in av_get_extended_channel_layout() argument
169 *nb_channels = av_get_channel_layout_nb_channels(layout); in av_get_extended_channel_layout()
176 *nb_channels = nb; in av_get_extended_channel_layout()
184 int nb_channels, uint64_t channel_layout) in av_bprint_channel_layout() argument
188 if (nb_channels <= 0) in av_bprint_channel_layout()
189 nb_channels = av_get_channel_layout_nb_channels(channel_layout); in av_bprint_channel_layout()
192 if (nb_channels == channel_layout_map[i].nb_channels && in av_bprint_channel_layout()
198 av_bprintf(bp, "%d channels", nb_channels); in av_bprint_channel_layout()
218 int nb_channels, uint64_t channel_layout) in av_get_channel_layout_string() argument
[all …]
Dsamplefmt.h160 int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
204 int nb_channels, int nb_samples,
226 int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
238 int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
253 int src_offset, int nb_samples, int nb_channels,
266 int nb_channels, enum AVSampleFormat sample_fmt);
Dchannel_layout.h162 int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, int* nb_channels);
171 void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout…
177 void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);
187 int64_t av_get_default_channel_layout(int nb_channels);
/third_party/ffmpeg/tests/
Daudiogen.c144 int nb_channels = 2; in main() local
164 nb_channels = atoi(argv[3]); in main()
165 if (nb_channels < 1 || nb_channels > MAX_CHANNELS) { in main()
166 fprintf(stderr, "invalid number of channels: %d\n", nb_channels); in main()
181 put_wav_header(sample_rate, nb_channels, 6 * sample_rate); in main()
187 for (j = 0; j < nb_channels; j++) in main()
196 for (j = 0; j < nb_channels; j++) in main()
205 for (j = 0; j < nb_channels; j++) in main()
212 for (j = 0; j < nb_channels; j++) in main()
217 for (j = 0; j < nb_channels; j++) { in main()
[all …]
/third_party/gstreamer/gst_libav/ext/libav/
Dgstavutils.c98 uint8_t nb_channels; /* number of channels (including alpha) */ member
115 pix_fmt_info[AV_PIX_FMT_YUV420P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
123 pix_fmt_info[AV_PIX_FMT_YUV422P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
131 pix_fmt_info[AV_PIX_FMT_YUV444P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
139 pix_fmt_info[AV_PIX_FMT_YUYV422].nb_channels = 1; in gst_ffmpeg_init_pix_fmt_info()
147 pix_fmt_info[AV_PIX_FMT_YUV410P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
155 pix_fmt_info[AV_PIX_FMT_YUV411P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
164 pix_fmt_info[AV_PIX_FMT_YUVJ420P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
172 pix_fmt_info[AV_PIX_FMT_YUVJ422P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
180 pix_fmt_info[AV_PIX_FMT_YUVJ444P].nb_channels = 3; in gst_ffmpeg_init_pix_fmt_info()
[all …]
/third_party/ffmpeg/libavfilter/
Daeval.c62 int nb_channels; ///< number of output channels member
127 if (!av_dynarray2_add((void **)&eval->expr, &eval->nb_channels, \ in parse_channel_expressions()
132 eval->expr[eval->nb_channels-1] = NULL; \ in parse_channel_expressions()
133 ret = av_expr_parse(&eval->expr[eval->nb_channels - 1], expr_, \ in parse_channel_expressions()
141 for (i = 0; i < eval->nb_channels; i++) { in parse_channel_expressions()
146 eval->nb_channels = 0; in parse_channel_expressions()
154 if (expected_nb_channels > eval->nb_channels) in parse_channel_expressions()
155 for (i = eval->nb_channels; i < expected_nb_channels; i++) in parse_channel_expressions()
158 if (expected_nb_channels > 0 && eval->nb_channels != expected_nb_channels) { in parse_channel_expressions()
162 eval->nb_channels, expected_nb_channels); in parse_channel_expressions()
[all …]
Daf_astats.c94 int nb_channels; member
186 for (c = 0; c < s->nb_channels; c++) { in reset_stats()
230 s->nb_channels = outlink->channels; in config_output()
232 for (int i = 0; i < s->nb_channels; i++) { in config_output()
427 for (c = 0; c < s->nb_channels; c++) { in set_metadata()
512 … set_meta(metadata, 0, "Overall.DC_offset", "%f", max_sigma_x / (nb_samples / s->nb_channels)); in set_metadata()
522 … set_meta(metadata, 0, "Overall.Mean_difference", "%f", diff1_sum / (nb_samples - s->nb_channels)); in set_metadata()
524 …a(metadata, 0, "Overall.RMS_difference", "%f", sqrt(diff1_sum_x2 / (nb_samples - s->nb_channels))); in set_metadata()
536 …(metadata, 0, "Overall.Peak_count", "%f", (float)(min_count + max_count) / (double)s->nb_channels); in set_metadata()
540 …t_meta(metadata, 0, "Overall.Noise_floor_count", "%f", noise_floor_count / (double)s->nb_channels); in set_metadata()
[all …]
Daf_join.c54 int nb_channels; member
173 s->nb_channels = av_get_channel_layout_nb_channels(s->channel_layout); in join_init()
174 s->channels = av_mallocz_array(s->nb_channels, sizeof(*s->channels)); in join_init()
175 s->buffers = av_mallocz_array(s->nb_channels, sizeof(*s->buffers)); in join_init()
180 for (i = 0; i < s->nb_channels; i++) { in join_init()
293 for (i = 0; i < s->nb_channels; i++) { in join_config_output()
319 for (i = 0; i < s->nb_channels; i++) { in join_config_output()
327 for (i = 0; i < s->nb_channels; i++) { in join_config_output()
346 for (i = 0; i < s->nb_channels; i++) { in join_config_output()
387 if (s->nb_channels > FF_ARRAY_ELEMS(frame->data)) { in try_push_frame()
[all …]
Df_ebur128.c122 int nb_channels; ///< number of channels in the input member
409 const int nb_channels = av_get_channel_layout_nb_channels(outlink->channel_layout); in config_audio_output() local
416 ebur128->nb_channels = nb_channels; in config_audio_output()
417 ebur128->ch_weighting = av_calloc(nb_channels, sizeof(*ebur128->ch_weighting)); in config_audio_output()
421 for (i = 0; i < nb_channels; i++) { in config_audio_output()
446 ebur128->swr_buf = av_malloc_array(nb_channels, 19200 * sizeof(double)); in config_audio_output()
447 ebur128->true_peaks = av_calloc(nb_channels, sizeof(*ebur128->true_peaks)); in config_audio_output()
448 … ebur128->true_peaks_per_frame = av_calloc(nb_channels, sizeof(*ebur128->true_peaks_per_frame)); in config_audio_output()
469 ebur128->sample_peaks = av_calloc(nb_channels, sizeof(*ebur128->sample_peaks)); in config_audio_output()
585 const int nb_channels = ebur128->nb_channels; in filter_frame() local
[all …]
Daf_drmeter.c41 int nb_channels; member
93 s->nb_channels = outlink->channels; in config_output()
131 const int channels = s->nb_channels; in filter_frame()
165 for (ch = 0; ch < s->nb_channels; ch++) { in print_stats()
199 av_log(ctx, AV_LOG_INFO, "Overall DR: %.1f\n", dr / s->nb_channels); in print_stats()
206 if (s->nb_channels) in uninit()
Davf_showwaves.c418 int nb_channels = inlink->channels; in config_output() local
430 if (!(showwaves->buf_idy = av_mallocz_array(nb_channels, sizeof(*showwaves->buf_idy)))) { in config_output()
512 showwaves->fg = av_malloc_array(nb_channels, 4 * sizeof(*showwaves->fg)); in config_output()
522 x = 255 / ((showwaves->split_channels ? 1 : nb_channels) * showwaves->n); in config_output()
529 for (ch = 0; ch < nb_channels; ch++) { in config_output()
541 for (ch = 0; ch < nb_channels; ch++) in config_output()
554 int nb_channels = inlink->channels; in push_frame() local
560 for (i = 0; i < nb_channels; i++) in push_frame()
575 const int nb_channels = inlink->channels; in push_single_pic() local
576 const int ch_height = showwaves->split_channels ? outlink->h / nb_channels : outlink->h; in push_single_pic()
[all …]
Davf_showfreqs.c63 int nb_channels; member
192 for (i = 0; i < s->nb_channels; i++) { in config_output()
198 s->nb_channels = inlink->channels; in config_output()
200 s->fft_data = av_calloc(s->nb_channels, sizeof(*s->fft_data)); in config_output()
203 s->avg_data = av_calloc(s->nb_channels, sizeof(*s->avg_data)); in config_output()
206 for (i = 0; i < s->nb_channels; i++) { in config_output()
315 end = (outlink->h / s->nb_channels) * (ch + 1); in plot_freq()
316 y = (outlink->h / s->nb_channels) * ch + a * (outlink->h / s->nb_channels) - 1; in plot_freq()
384 for (ch = 0; ch < s->nb_channels; ch++) { in plot_freqs()
398 for (ch = 0; ch < s->nb_channels; ch++) { in plot_freqs()
[all …]
Daf_channelsplit.c61 int nb_channels; in init() local
73 nb_channels = av_get_channel_layout_nb_channels(s->channel_layout); in init()
77 … if ((ret = av_get_extended_channel_layout(s->channels_str, &channel_layout, &nb_channels)) < 0) in init()
81 for (i = 0; i < nb_channels; i++) { in init()
/third_party/ffmpeg/libavcodec/
Dqdmc.c54 int nb_channels; member
248 avctx->channels = s->nb_channels = bytestream2_get_be32u(&b); in qdmc_decode_init()
249 if (s->nb_channels <= 0 || s->nb_channels > 2) { in qdmc_decode_init()
359 for (ch = 0; ch < s->nb_channels; ch++) { in read_noise_data()
448 if (s->nb_channels > 1) in read_wave_data()
547 if (s->nb_channels == 1) in add_wave()
579 if (s->nb_channels == 1) in add_wave0()
624 s->buffer_ptr = &s->buffer[s->nb_channels * s->buffer_offset]; in decode_frame()
637 for (ch = 0; ch < s->nb_channels; ch++) in decode_frame()
642 for (ch = 0; ch < s->nb_channels; ch++) { in decode_frame()
[all …]
Dmpegaudioenc_template.c49 int nb_channels; member
90 s->nb_channels = channels; in MPA_encode_init()
136 table = ff_mpa_l2_select_table(bitrate, s->nb_channels, freq, s->lsf); in MPA_encode_init()
145 for(i=0;i<s->nb_channels;i++) in MPA_encode_init()
520 memcpy(smr, smr1, s->nb_channels * sizeof(short) * SBLIMIT); in compute_bit_allocation()
521 memset(subband_status, SB_NOTALLOCATED, s->nb_channels * SBLIMIT); in compute_bit_allocation()
522 memset(bit_alloc, 0, s->nb_channels * SBLIMIT); in compute_bit_allocation()
540 current_frame_size += incr * s->nb_channels; in compute_bit_allocation()
548 for(ch=0;ch<s->nb_channels;ch++) { in compute_bit_allocation()
624 put_bits(p, 2, s->nb_channels == 2 ? MPA_STEREO : MPA_MONO); in encode_frame()
[all …]
Dwmaprodec.c228 int8_t nb_channels; ///< number of channels in stream (XMA1/2) member
268 PRINT("num channels", s->nb_channels); in dump_context()
350 s->nb_channels = 1; in decode_init()
352 s->nb_channels = 2; in decode_init()
357 …s->nb_channels = edata_ptr[32 + ((edata_ptr[0]==3)?0:8) + 4*num_stream + 0]; /* nth stream config … in decode_init()
362 s->nb_channels = edata_ptr[8 + 20*num_stream + 17]; /* nth stream config */ in decode_init()
367 s->nb_channels = avctx->channels; in decode_init()
434 if (s->nb_channels <= 0) { in decode_init()
436 s->nb_channels); in decode_init()
438 } else if (avctx->codec_id != AV_CODEC_ID_WMAPRO && s->nb_channels > XMA_MAX_CHANNELS_STREAM) { in decode_init()
[all …]
Dqdm2.c132 int nb_channels; ///< number of channels member
322 for (ch = 0; ch < q->nb_channels; ch++) in average_quantized_coeffs()
351 if (!q->nb_channels) in build_sb_samples_from_noise()
354 for (ch = 0; ch < q->nb_channels; ch++) { in build_sb_samples_from_noise()
448 for (ch = 0; ch < q->nb_channels; ch++) in fill_tone_level_array()
465 for (ch = 0; ch < q->nb_channels; ch++) in fill_tone_level_array()
477 for (ch = 0; ch < q->nb_channels; ch++) in fill_tone_level_array()
491 for (ch = 0; ch < q->nb_channels; ch++) in fill_tone_level_array()
503 for (ch = 0; ch < q->nb_channels; ch++) in fill_tone_level_array()
535 int nb_channels, in fill_coding_method_array() argument
[all …]
Dmpegaudiodecheader.c75 s->nb_channels = 1; in avpriv_mpegaudio_decode_header()
77 s->nb_channels = 2; in avpriv_mpegaudio_decode_header()
106 if (s->nb_channels == 2) { in avpriv_mpegaudio_decode_header()
151 *channels = s->nb_channels; in ff_mpa_decode_header()
Dmpegaudiodec_template.c397 ret = handle_crc(s, (s->nb_channels == 1) ? 8*16 : 8*32); in mp_decode_layer1()
408 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer1()
417 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer1()
432 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer1()
472 table = ff_mpa_l2_select_table(s->bit_rate / 1000, s->nb_channels, in mp_decode_layer2()
492 for (ch = 0; ch < s->nb_channels; ch++) in mp_decode_layer2()
506 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer2()
518 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer2()
554 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer2()
641 for (ch = 0; ch < s->nb_channels; ch++) { in mp_decode_layer2()
[all …]
Dmpegaudio.c31 int ff_mpa_l2_select_table(int bitrate, int nb_channels, int freq, int lsf) in ff_mpa_l2_select_table() argument
35 ch_bitrate = bitrate / nb_channels; in ff_mpa_l2_select_table()
/third_party/ffmpeg/libavformat/
Dacedec.c47 int ret, codec, rate, nb_channels; in ace_read_header() local
60 nb_channels = avio_rb32(pb); in ace_read_header()
61 if (nb_channels <= 0 || nb_channels > 8) in ace_read_header()
77 par->channels = nb_channels; in ace_read_header()
79 par->block_align = (codec == 4 ? 0x60 : codec == 5 ? 0x98 : 0xC0) * nb_channels; in ace_read_header()
Doggparsecelt.c46 uint32_t version, sample_rate, nb_channels; in celt_header() local
60 nb_channels = AV_RL32(p + 40); in celt_header()
67 st->codecpar->channels = nb_channels; in celt_header()
/third_party/gstreamer/gstplugins_good/gst/rtp/
Dgstrtpceltdepay.c123 gint clock_rate, nb_channels = 0, frame_size = 0; in gst_rtp_celt_depay_setcaps() local
140 nb_channels = atoi (params); in gst_rtp_celt_depay_setcaps()
141 if (!nb_channels) in gst_rtp_celt_depay_setcaps()
142 nb_channels = DEFAULT_CHANNELS; in gst_rtp_celt_depay_setcaps()
151 clock_rate, nb_channels, frame_size); in gst_rtp_celt_depay_setcaps()
167 GST_WRITE_UINT32_LE (ptr, nb_channels); /* channels */ in gst_rtp_celt_depay_setcaps()
Dgstrtpspeexdepay.c123 gint clock_rate, nb_channels; in gst_rtp_speex_depay_setcaps() local
140 nb_channels = 1; in gst_rtp_speex_depay_setcaps()
142 nb_channels = atoi (params); in gst_rtp_speex_depay_setcaps()
163 GST_WRITE_UINT32_LE (data, nb_channels); /* nb_channels */ in gst_rtp_speex_depay_setcaps()

123