diff mbox series

[FFmpeg-devel] libavfilter: Fix implicit declarations of av_cpu_max_align

Message ID 20210804123103.2399414-1-martin@martin.st
State Accepted
Commit 6d2365882f281f9452b31b91edb2e6a2d4f5ff08
Headers show
Series [FFmpeg-devel] libavfilter: Fix implicit declarations of av_cpu_max_align | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Martin Storsjö Aug. 4, 2021, 12:31 p.m. UTC
---
 libavfilter/af_afftfilt.c       | 1 +
 libavfilter/avf_showspectrum.c  | 1 +
 libavfilter/vaf_spectrumsynth.c | 1 +
 3 files changed, 3 insertions(+)

Comments

Andreas Rheinhardt Aug. 4, 2021, 1:30 p.m. UTC | #1
Martin Storsjö:
> ---
>  libavfilter/af_afftfilt.c       | 1 +
>  libavfilter/avf_showspectrum.c  | 1 +
>  libavfilter/vaf_spectrumsynth.c | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
> index 3e69c636c8..877ccc5be0 100644
> --- a/libavfilter/af_afftfilt.c
> +++ b/libavfilter/af_afftfilt.c
> @@ -22,6 +22,7 @@
>  #include "libavutil/avstring.h"
>  #include "libavfilter/internal.h"
>  #include "libavutil/common.h"
> +#include "libavutil/cpu.h"
>  #include "libavutil/opt.h"
>  #include "libavutil/eval.h"
>  #include "libavutil/tx.h"
> diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
> index 9f3ade36f4..52bad5b2ad 100644
> --- a/libavfilter/avf_showspectrum.c
> +++ b/libavfilter/avf_showspectrum.c
> @@ -33,6 +33,7 @@
>  #include "libavutil/avassert.h"
>  #include "libavutil/avstring.h"
>  #include "libavutil/channel_layout.h"
> +#include "libavutil/cpu.h"
>  #include "libavutil/opt.h"
>  #include "libavutil/parseutils.h"
>  #include "libavutil/xga_font_data.h"
> diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c
> index cf76f4e4c7..d44d01cd33 100644
> --- a/libavfilter/vaf_spectrumsynth.c
> +++ b/libavfilter/vaf_spectrumsynth.c
> @@ -27,6 +27,7 @@
>  #include "libavutil/tx.h"
>  #include "libavutil/avassert.h"
>  #include "libavutil/channel_layout.h"
> +#include "libavutil/cpu.h"
>  #include "libavutil/ffmath.h"
>  #include "libavutil/opt.h"
>  #include "libavutil/parseutils.h"
> 
LGTM.
Btw: I am working on a branch
https://github.com/mkver/FFmpeg/commits/headers3 which includes a patch
https://github.com/mkver/FFmpeg/commit/c76d83e6f1c09dc8787760cb11ea0eac90d2ff59
which makes emms_c.h no longer include cpu.h if it is not needed. This
will remove cpu.h inclusions on x64 and therefore avoid a repeat of this
situation (unless there is a dev whose main system is 32bit x86).

- Andreas

PS: It is not good to put av_cpu_max_align() inside macros which
evaluate its argument multiple times. (In case we would some day at a
function that allows to force the maximum alignment, the result could
even be inconsistent.)
diff mbox series

Patch

diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
index 3e69c636c8..877ccc5be0 100644
--- a/libavfilter/af_afftfilt.c
+++ b/libavfilter/af_afftfilt.c
@@ -22,6 +22,7 @@ 
 #include "libavutil/avstring.h"
 #include "libavfilter/internal.h"
 #include "libavutil/common.h"
+#include "libavutil/cpu.h"
 #include "libavutil/opt.h"
 #include "libavutil/eval.h"
 #include "libavutil/tx.h"
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 9f3ade36f4..52bad5b2ad 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -33,6 +33,7 @@ 
 #include "libavutil/avassert.h"
 #include "libavutil/avstring.h"
 #include "libavutil/channel_layout.h"
+#include "libavutil/cpu.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
 #include "libavutil/xga_font_data.h"
diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c
index cf76f4e4c7..d44d01cd33 100644
--- a/libavfilter/vaf_spectrumsynth.c
+++ b/libavfilter/vaf_spectrumsynth.c
@@ -27,6 +27,7 @@ 
 #include "libavutil/tx.h"
 #include "libavutil/avassert.h"
 #include "libavutil/channel_layout.h"
+#include "libavutil/cpu.h"
 #include "libavutil/ffmath.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"