valgrind is not fond of the pointer math in hScale_altivec_real(),
so add an extra 16-byte padding to the end of the conversion buffer.
This fixes lavfi-pixfmts_scale on AltiVec-enabled builds.
---
libswscale/utils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 862b273..3e1c1e9 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -742,6 +742,8 @@ SwsContext *sws_alloc_context(void)
return c;
}
+#define SWS_ALLOC_PADDING 16
+
int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
{
int i;
@@ -871,7 +873,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
SwsFilter *dstFilter)
if (c->dstBpc == 16)
dst_stride <<= 1;
FF_ALLOC_OR_GOTO(c, c->formatConvBuffer,
- FFALIGN(srcW, 16) * 2 * FFALIGN(c->srcBpc, 8) >> 3,
+ (FFALIGN(srcW, 16) * 2 * FFALIGN(c->srcBpc, 8) >> 3) +
SWS_ALLOC_PADDING,
fail);
if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2 && c->srcBpc == 8 &&
c->dstBpc <= 10) {
c->canMMX2BeUsed= (dstW >=srcW && (dstW&31)==0 && (srcW&15)==0) ? 1 :
0;
--
1.7.8.rc1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel