forked from FFmpeg/FFmpeg
avfilter/af_anlmdn: Store format in filter, remove query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
d8a5b90a08
commit
06ff6dad44
1 changed files with 1 additions and 18 deletions
|
@ -93,23 +93,6 @@ static const AVOption anlmdn_options[] = {
|
||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(anlmdn);
|
AVFILTER_DEFINE_CLASS(anlmdn);
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVSampleFormat sample_fmts[] = {
|
|
||||||
AV_SAMPLE_FMT_FLTP,
|
|
||||||
AV_SAMPLE_FMT_NONE
|
|
||||||
};
|
|
||||||
int ret = ff_set_common_formats_from_list(ctx, sample_fmts);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = ff_set_common_all_channel_counts(ctx);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return ff_set_common_all_samplerates(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
static float compute_distance_ssd_c(const float *f1, const float *f2, ptrdiff_t K)
|
static float compute_distance_ssd_c(const float *f1, const float *f2, ptrdiff_t K)
|
||||||
{
|
{
|
||||||
float distance = 0.;
|
float distance = 0.;
|
||||||
|
@ -407,7 +390,7 @@ const AVFilter ff_af_anlmdn = {
|
||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
FILTER_INPUTS(inputs),
|
FILTER_INPUTS(inputs),
|
||||||
FILTER_OUTPUTS(outputs),
|
FILTER_OUTPUTS(outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP),
|
||||||
.process_command = process_command,
|
.process_command = process_command,
|
||||||
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
|
||||||
AVFILTER_FLAG_SLICE_THREADS,
|
AVFILTER_FLAG_SLICE_THREADS,
|
||||||
|
|
Loading…
Add table
Reference in a new issue