aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-28 16:08:36 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-30 05:04:27 +0100
commit7d9d400695552d98408107c11bf488ea9a161c57 (patch)
treee19fa80bf53cd8b9e59143cc16e2fe189b47a516
parentf63a87629e5229119d22c95533f14ec89b97e623 (diff)
downloadffmpeg-7d9d400695552d98408107c11bf488ea9a161c57.tar.gz
postproc/postprocess: Don't generally include arch-specific headers
Reviewed-by: Sean McGovern <gseanmcg@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libpostproc/postprocess.c3
-rw-r--r--libpostproc/postprocess_template.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index 0586e458b4..8f4de8b1e1 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -88,7 +88,6 @@ try to unroll inner for(x=0 ... loop to avoid these damn if(x ... checks
#include "postprocess.h"
#include "postprocess_internal.h"
#include "libavutil/avstring.h"
-#include "libavutil/ppc/util_altivec.h"
#define GET_MODE_BUFFER_SIZE 500
#define OPTIONS_ARRAY_SIZE 10
@@ -499,6 +498,8 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
#include "postprocess_template.c"
#if HAVE_ALTIVEC
+#include "libavutil/ppc/util_altivec.h"
+
# define TEMPLATE_PP_ALTIVEC 1
# include "postprocess_altivec_template.c"
# include "postprocess_template.c"
diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c
index ade1d6ce2b..d56b45d3b4 100644
--- a/libpostproc/postprocess_template.c
+++ b/libpostproc/postprocess_template.c
@@ -22,9 +22,12 @@
* @file
* mmx/mmx2/sse2 postprocess code.
*/
+#include "config.h"
#include "libavutil/mem_internal.h"
+#if ARCH_X86
#include "libavutil/x86/asm.h"
+#endif
/* A single TEMPLATE_PP_* should be defined (to 1) when this template is
* included. The following macros will define its dependencies to 1 as well
@@ -830,7 +833,7 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext
#if !TEMPLATE_PP_ALTIVEC
static inline void RENAME(dering)(uint8_t src[], int stride, PPContext *c)
{
-#if HAVE_7REGS && TEMPLATE_PP_MMXEXT
+#if TEMPLATE_PP_MMXEXT && HAVE_7REGS
DECLARE_ALIGNED(8, uint64_t, tmp)[3];
__asm__ volatile(
"pxor %%mm6, %%mm6 \n\t"