From 9fa056ba75c089b5120366ab7c5ce8cc4c5bd67a Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Tue, 2 Dec 2014 14:31:49 +0100 Subject: pngdsp x86: use unaligned access For test images manually generated to contain only up prediction, timing results: 8380x3032 255x185 before: 138635 1992 after: 139232 1996 Actually jumping to the proper version depending on the alignment: 8380x3032: 138767 A 0.5% speed improvement for gigantic images is not worth the code duplication. Fixes ticket #4148 Signed-off-by: Christophe Gisquet Tested-by: Benoit Fouet Signed-off-by: Michael Niedermayer --- libavcodec/pngdsp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/pngdsp.h') diff --git a/libavcodec/pngdsp.h b/libavcodec/pngdsp.h index 1475b0cbe9..fbc1a508e7 100644 --- a/libavcodec/pngdsp.h +++ b/libavcodec/pngdsp.h @@ -25,9 +25,9 @@ #include typedef struct PNGDSPContext { - void (*add_bytes_l2)(uint8_t *dst /* align 16 */, + void (*add_bytes_l2)(uint8_t *dst, uint8_t *src1 /* align 16 */, - uint8_t *src2 /* align 16 */, int w); + uint8_t *src2, int w); /* this might write to dst[w] */ void (*add_paeth_prediction)(uint8_t *dst, uint8_t *src, -- cgit v1.2.1