mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-09 15:45:27 +01:00
avcodec/vp3: Optimize alignment check away when possible
Check only on arches that need said check. (Btw: I do not see how h_loop_filter benefits from alignment at all and why h_loop_filter_unaligned exists.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -2031,7 +2031,7 @@ static int vp4_mc_loop_filter(Vp3DecodeContext *s, int plane, int motion_x, int
|
||||
plane_height);
|
||||
|
||||
#define safe_loop_filter(name, ptr, stride, bounding_values) \
|
||||
if ((uintptr_t)(ptr) & 7) \
|
||||
if (VP3_LOOP_FILTER_NO_UNALIGNED_SUPPORT && (uintptr_t)(ptr) & 7) \
|
||||
s->vp3dsp.name##_unaligned(ptr, stride, bounding_values); \
|
||||
else \
|
||||
s->vp3dsp.name(ptr, stride, bounding_values);
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// If this is one, {v,h}_loop_filter expect src to be aligned on eight bytes;
|
||||
// otherwise they don't have any alignment requirements for src.
|
||||
#define VP3_LOOP_FILTER_NO_UNALIGNED_SUPPORT (ARCH_ARM || ARCH_MIPS)
|
||||
|
||||
typedef struct VP3DSPContext {
|
||||
/**
|
||||
* Copy 8xH pixels from source to destination buffer using a bilinear
|
||||
|
||||
Reference in New Issue
Block a user