• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavfilter/

Lines Matching refs:pan

103     PanContext *const pan = ctx->priv;
104 char *arg, *arg0, *tokenizer, *args = av_strdup(pan->args);
109 if (!pan->args) {
111 "pan filter needs a channel layout and a set "
118 ret = ff_parse_channel_layout(&pan->out_channel_layout,
119 &pan->nb_output_channels, arg, ctx);
133 if (!((pan->out_channel_layout >> out_ch_id) & 1)) {
143 out_ch_id = av_get_channel_layout_nb_channels(pan->out_channel_layout & (((int64_t)1 << out_ch_id) - 1));
145 if (out_ch_id < 0 || out_ch_id >= pan->nb_output_channels) {
155 pan->need_renorm |= (int64_t)1 << out_ch_id;
181 pan->gain[out_ch_id][in_ch_id] = gain;
193 pan->need_renumber = !!nb_in_channels[1];
201 static int are_gains_pure(const PanContext *pan)
209 double gain = pan->gain[i][j];
225 PanContext *pan = ctx->priv;
231 pan->pure_gains = are_gains_pure(pan);
247 pan->out_channel_layout ? pan->out_channel_layout :
248 FF_COUNT2LAYOUT(pan->nb_output_channels));
256 PanContext *pan = ctx->priv;
261 if (pan->need_renumber) {
265 for (k = 0; k < pan->nb_output_channels; k++)
266 pan->gain[k][j] = pan->gain[k][i];
275 pan->nb_output_channels > SWR_CH_MAX) {
283 pan->swr = swr_alloc_set_opts(pan->swr,
284 pan->out_channel_layout, link->format, link->sample_rate,
287 if (!pan->swr)
290 av_opt_set_int(pan->swr, "ich", link->channels, 0);
291 if (!pan->out_channel_layout)
292 av_opt_set_int(pan->swr, "och", pan->nb_output_channels, 0);
295 if (pan->pure_gains) {
298 for (i = 0; i < pan->nb_output_channels; i++) {
301 if (pan->gain[i][j]) {
306 pan->channel_map[i] = ch_id;
309 av_opt_set_int(pan->swr, "icl", pan->out_channel_layout, 0);
310 av_opt_set_int(pan->swr, "uch", pan->nb_output_channels, 0);
311 swr_set_channel_mapping(pan->swr, pan->channel_map);
314 for (i = 0; i < pan->nb_output_channels; i++) {
315 if (!((pan->need_renorm >> i) & 1))
319 t += pan->gain[i][j];
328 pan->gain[i][j] /= t;
330 av_opt_set_int(pan->swr, "icl", link->channel_layout, 0);
331 av_opt_set_int(pan->swr, "ocl", pan->out_channel_layout, 0);
332 swr_set_matrix(pan->swr, pan->gain[0], pan->gain[1] - pan->gain[0]);
335 r = swr_init(pan->swr);
340 for (i = 0; i < pan->nb_output_channels; i++) {
344 j ? " + " : "", pan->gain[i][j], j);
350 if (pan->pure_gains) {
352 for (i = 0; i < pan->nb_output_channels; i++)
353 if (pan->channel_map[i] < 0)
356 av_log(ctx, AV_LOG_INFO, " %d", pan->channel_map[i]);
369 PanContext *pan = inlink->dst->priv;
373 swr_convert(pan->swr, outsamples->extended_data, n,
386 PanContext *pan = ctx->priv;
387 swr_free(&pan->swr);
397 AVFILTER_DEFINE_CLASS(pan);
418 .name = "pan",