mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
avfilter: Deduplicate default audio inputs/outputs
Lots of audio filters use very simple inputs or outputs: An array with a single AVFilterPad whose name is "default" and whose type is AVMEDIA_TYPE_AUDIO; everything else is unset. Given that we never use pointer equality for inputs or outputs*, we can simply use a single AVFilterPad instead of dozens; this even saves .data.rel.ro (4784B here) as well as relocations. *: In fact, several filters (like the filters in af_biquads.c) already use the same inputs; furthermore, ff_filter_alloc() duplicates the input and output pads so that we do not even work with the pads directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
6b82f35041
commit
50ea7389ec
85 changed files with 114 additions and 710 deletions
|
|
@ -207,13 +207,6 @@ static const AVFilterPad rubberband_inputs[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static const AVFilterPad rubberband_outputs[] = {
|
||||
{
|
||||
.name = "default",
|
||||
.type = AVMEDIA_TYPE_AUDIO,
|
||||
},
|
||||
};
|
||||
|
||||
const AVFilter ff_af_rubberband = {
|
||||
.name = "rubberband",
|
||||
.description = NULL_IF_CONFIG_SMALL("Apply time-stretching and pitch-shifting."),
|
||||
|
|
@ -222,7 +215,7 @@ const AVFilter ff_af_rubberband = {
|
|||
.uninit = uninit,
|
||||
.activate = activate,
|
||||
FILTER_INPUTS(rubberband_inputs),
|
||||
FILTER_OUTPUTS(rubberband_outputs),
|
||||
FILTER_OUTPUTS(ff_audio_default_filterpad),
|
||||
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP),
|
||||
.process_command = process_command,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue