Sean McGovern <[email protected]> writes:

> valgrind is not fond of the pointer math in hScale_altivec_real(),
> so add an extra AltiVec-sized padding to the end of the conversion buffer.
>
> This fixes lavfi-pixfmts_scale on AltiVec-enabled builds.
> ---
>  libswscale/utils.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/libswscale/utils.c b/libswscale/utils.c
> index 862b273..58032b1 100644
> --- a/libswscale/utils.c
> +++ b/libswscale/utils.c
> @@ -742,6 +742,12 @@ SwsContext *sws_alloc_context(void)
>      return c;
>  }
>  
> +#if HAVE_ALTIVEC
> +#define SWS_ALLOC_PADDING 16
> +#else
> +#define SWS_ALLOC_PADDING 0
> +#endif

Just pad it unconditionally.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to