From fd172185580c1ccdcfb90bbfdb59fa806fad3117 Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Fri, 21 Jun 2019 07:52:31 +1000 Subject: vp4: prevent unaligned memory access in loop filter VP4 applies a loop filter during motion compensation, causing the block offset will often by unaligned. This produces a bus error on some platforms, namely ARMv7 NEON. This patch adds a unaligned version of the loop filter function pointer to VP3DSPContext. Reported-by: Mike Melanson Signed-off-by: Michael Niedermayer --- libavcodec/x86/vp3dsp_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/x86') diff --git a/libavcodec/x86/vp3dsp_init.c b/libavcodec/x86/vp3dsp_init.c index 1ba9576431..ba47e1c6cd 100644 --- a/libavcodec/x86/vp3dsp_init.c +++ b/libavcodec/x86/vp3dsp_init.c @@ -59,8 +59,8 @@ av_cold void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags) c->idct_dc_add = ff_vp3_idct_dc_add_mmxext; if (!(flags & AV_CODEC_FLAG_BITEXACT)) { - c->v_loop_filter = ff_vp3_v_loop_filter_mmxext; - c->h_loop_filter = ff_vp3_h_loop_filter_mmxext; + c->v_loop_filter = c->v_loop_filter_unaligned = ff_vp3_v_loop_filter_mmxext; + c->h_loop_filter = c->v_loop_filter_unaligned = ff_vp3_h_loop_filter_mmxext; } } -- cgit v1.2.3