On Thu, Dec 01, 2016 at 09:59:20PM +0100, Alexandra Hájková wrote:
> From: Alexandra Hajkova <alexan...@khirnov.net>
> 
> ---
>  libavcodec/hevcdsp.c              |   2 +
>  libavcodec/hevcdsp.h              |   1 +
>  libavcodec/ppc/Makefile           |   1 +
>  libavcodec/ppc/hevcdsp.c          | 110 
> ++++++++++++++++++++++++++++++++++++++
>  libavcodec/ppc/hevcdsp_template.c |  48 +++++++++++++++++
>  5 files changed, 162 insertions(+)
>  create mode 100644 libavcodec/ppc/hevcdsp.c
>  create mode 100644 libavcodec/ppc/hevcdsp_template.c

We're getting close ..

> --- /dev/null
> +++ b/libavcodec/ppc/hevcdsp.c
> +#if HAVE_ALTIVEC_H
> +#include "libavutil/ppc/cpu.h"
> +#include "libavutil/ppc/types_altivec.h"
> +#include "libavutil/ppc/util_altivec.h"
> +#endif

These headers do not in any way depend on HAVE_ALTIVEC_H.
You can #include them directly.

> +#if HAVE_ALTIVEC
> +#define FUNCDECL(a, depth) a ## _ ## depth ## _altivec
> +#define FUNC(a, b) FUNCDECL(a, b)

Move these macros down to where they are used ..

> +#define BIT_DEPTH 8
> +#include "libavcodec/ppc/hevcdsp_template.c"
> +#undef BIT_DEPTH
> +
> +#define BIT_DEPTH 10
> +#include "libavcodec/ppc/hevcdsp_template.c"
> +#undef BIT_DEPTH
> +#endif /* HAVE_ALTIVEC */

.. just above this block.

Also, you don't need the "libavcodec/ppc/" prefix for an inclusion in
the same directory.

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to