[FFmpeg-devel] [PATCH 06/18] postproc/postprocess: Don't generally include arch-specific headers

Sean McGovern gseanmcg at gmail.com
Fri Mar 29 16:54:17 EET 2024


Andreas:

On Thu, Mar 28, 2024 at 7:11 PM Andreas Rheinhardt
<andreas.rheinhardt at outlook.com> wrote:
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libpostproc/postprocess.c          | 3 ++-
>  libpostproc/postprocess_template.c | 5 ++++-
>  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"
> --
> 2.40.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

OK, looks good to me.

-- Sean McGovern


More information about the ffmpeg-devel mailing list