[vlc-devel] [PATCH 1/1] picture: increase alignment for AVX2 on x86 to 32 byte

Ilkka Ollakka ileoo at videolan.org
Sun Nov 27 17:12:29 CET 2016


On Sun, Nov 27, 2016 at 04:29:15PM +0100, Janne Grunau wrote:
> Required for direct rendering with AVX2 enabled libavcodec and AVX2
> optimizations for the blend deinterlacer.
> ---
>  configure.ac       | 8 ++++++++
>  src/misc/picture.c | 4 ++--
>  2 files changed, 10 insertions(+), 2 deletions(-)

> diff --git a/configure.ac b/configure.ac
> index 1e1f2f25b1..129668ea80 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1565,6 +1565,14 @@ AS_IF([test "${enable_altivec}" = "yes"], [
>  AC_SUBST(ALTIVEC_CFLAGS)
>  AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])

> +dnl Alignment for SIMD functions
> +dnl AVX2 on x86 needs 32 byte alignment, everything else needs 16 byte alignment
> +case "$host_cpu" in
> +    i?86|x86_64) simd_align=32 ;;
> +    *)           simd_align=16 ;;
> +esac
> +AC_DEFINE([SIMD_ALIGNMENT], [32], [required alignment for SIMD])

Shouldn't this be AC_DEFINE([SIMD_ALIGNMENT], [${simd_align}].. or
similar? Just looking that you first define simd_align, but don't use
it.

-- 
Ilkka Ollakka
Thank God a million billion times you live in Texas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20161127/af434f30/attachment.sig>


More information about the vlc-devel mailing list