[FFmpeg-devel] [PATCH] VP8/PPC: don't overread edges on fourtap MC.
Ronald S. Bultje
rsbultje
Wed Jan 26 21:54:32 CET 2011
Fix PPC VP8 H+V MC functions which do two-dimensional 4/6-tap filters to
not overread beyond their edges if the second filter is 4-tap, since
the outer preceding pixels aren't there anymore since
44002d8323023c35f51d523a7d305e45103ba7a1.
---
libavcodec/ppc/vp8dsp_altivec.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c
index 8096c4a..2e68a05 100644
--- a/libavcodec/ppc/vp8dsp_altivec.c
+++ b/libavcodec/ppc/vp8dsp_altivec.c
@@ -238,9 +238,9 @@ void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, int dst_strid
#define EPEL_HV(WIDTH, HTAPS, VTAPS) \
static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, int stride, uint8_t *src, int s, int h, int mx, int my) \
{ \
- DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \
- put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16, src-2*stride, stride, h+5, mx, my); \
- put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+2*16, 16, h, mx, my); \
+ DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+HTAPS-1)*16]; \
+ put_vp8_epel ## WIDTH ## _h ## HTAPS ## _altivec(tmp, 16, src-(2-HTAPS==4)*stride, stride, h+HTAPS-1, mx, my); \
+ put_vp8_epel ## WIDTH ## _v ## VTAPS ## _altivec(dst, stride, tmp+(2-HTAPS==4)*16, 16, h, mx, my); \
}
EPEL_FUNCS(16,6)
--
1.7.2.1
More information about the ffmpeg-devel
mailing list