From face578d56c2d1375e40d5e2a28acc122132bc55 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 20 Sep 2013 08:01:19 -0400 Subject: Rewrite emu_edge functions to have separate src/dst_stride arguments. This allows supporting files for which the image stride is smaller than the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file or a 16x16 VP8 file with -fflags +emu_edge. --- libavcodec/x86/dsputil_mmx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libavcodec/x86/dsputil_mmx.c') diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 421a6c2090..9cbf58a09c 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -405,8 +405,9 @@ void ff_draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, } } -typedef void emulated_edge_mc_func(uint8_t *dst, const uint8_t *src, - ptrdiff_t linesize, int block_w, int block_h, +typedef void emulated_edge_mc_func(uint8_t *dst, ptrdiff_t dst_stride, + const uint8_t *src, ptrdiff_t src_linesize, + int block_w, int block_h, int src_x, int src_y, int w, int h); static av_always_inline void gmc(uint8_t *dst, uint8_t *src, @@ -454,7 +455,7 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src, src += ix + iy * stride; if (need_emu) { - emu_edge_fn(edge_buf, src, stride, w + 1, h + 1, ix, iy, width, height); + emu_edge_fn(edge_buf, stride, src, stride, w + 1, h + 1, ix, iy, width, height); src = edge_buf; } -- cgit v1.2.3