|
|
@ -78,9 +78,11 @@ typedef struct AudioIIRContext { |
|
|
|
int (*iir_channel)(AVFilterContext *ctx, void *arg, int ch, int nb_jobs); |
|
|
|
int (*iir_channel)(AVFilterContext *ctx, void *arg, int ch, int nb_jobs); |
|
|
|
} AudioIIRContext; |
|
|
|
} AudioIIRContext; |
|
|
|
|
|
|
|
|
|
|
|
static int query_formats(AVFilterContext *ctx) |
|
|
|
static int query_formats(const AVFilterContext *ctx, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_in, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_out) |
|
|
|
{ |
|
|
|
{ |
|
|
|
AudioIIRContext *s = ctx->priv; |
|
|
|
const AudioIIRContext *s = ctx->priv; |
|
|
|
AVFilterFormats *formats; |
|
|
|
AVFilterFormats *formats; |
|
|
|
enum AVSampleFormat sample_fmts[] = { |
|
|
|
enum AVSampleFormat sample_fmts[] = { |
|
|
|
AV_SAMPLE_FMT_DBLP, |
|
|
|
AV_SAMPLE_FMT_DBLP, |
|
|
@ -93,23 +95,17 @@ static int query_formats(AVFilterContext *ctx) |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
|
|
if (s->response) { |
|
|
|
if (s->response) { |
|
|
|
AVFilterLink *videolink = ctx->outputs[1]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formats = ff_make_format_list(pix_fmts); |
|
|
|
formats = ff_make_format_list(pix_fmts); |
|
|
|
if ((ret = ff_formats_ref(formats, &videolink->incfg.formats)) < 0) |
|
|
|
if ((ret = ff_formats_ref(formats, &cfg_out[1]->formats)) < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ret = ff_set_common_all_channel_counts(ctx); |
|
|
|
|
|
|
|
if (ret < 0) |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sample_fmts[0] = s->sample_format; |
|
|
|
sample_fmts[0] = s->sample_format; |
|
|
|
ret = ff_set_common_formats_from_list(ctx, sample_fmts); |
|
|
|
ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, sample_fmts); |
|
|
|
if (ret < 0) |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
return ff_set_common_all_samplerates(ctx); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define IIR_CH(name, type, min, max, need_clipping) \ |
|
|
|
#define IIR_CH(name, type, min, max, need_clipping) \ |
|
|
@ -1572,7 +1568,7 @@ const AVFilter ff_af_aiir = { |
|
|
|
.init = init, |
|
|
|
.init = init, |
|
|
|
.uninit = uninit, |
|
|
|
.uninit = uninit, |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | |
|
|
|
.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | |
|
|
|
AVFILTER_FLAG_SLICE_THREADS, |
|
|
|
AVFILTER_FLAG_SLICE_THREADS, |
|
|
|
}; |
|
|
|
}; |
|
|
|