diff --git a/libavcodec/lossless_videodsp.c b/libavcodec/lossless_videodsp.c index 1de288b246..b5b96e6129 100644 --- a/libavcodec/lossless_videodsp.c +++ b/libavcodec/lossless_videodsp.c @@ -25,7 +25,7 @@ #define pb_7f (~0UL / 255 * 0x7f) #define pb_80 (~0UL / 255 * 0x80) -static void add_bytes_c(uint8_t *dst, uint8_t *src, intptr_t w) +static void add_bytes_c(uint8_t *dst, uint8_t *src, ptrdiff_t w) { long i; @@ -39,7 +39,7 @@ static void add_bytes_c(uint8_t *dst, uint8_t *src, intptr_t w) } static void add_median_pred_c(uint8_t *dst, const uint8_t *src1, - const uint8_t *diff, intptr_t w, + const uint8_t *diff, ptrdiff_t w, int *left, int *left_top) { int i; @@ -58,7 +58,7 @@ static void add_median_pred_c(uint8_t *dst, const uint8_t *src1, *left_top = lt; } -static int add_left_pred_c(uint8_t *dst, const uint8_t *src, intptr_t w, +static int add_left_pred_c(uint8_t *dst, const uint8_t *src, ptrdiff_t w, int acc) { int i; @@ -79,7 +79,7 @@ static int add_left_pred_c(uint8_t *dst, const uint8_t *src, intptr_t w, return acc; } -static int add_left_pred_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc){ +static int add_left_pred_int16_c(uint16_t *dst, const uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc){ int i; for(i=0; i +#include + #include "avcodec.h" #include "libavutil/cpu.h" typedef struct LLVidDSPContext { void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */, - intptr_t w); + ptrdiff_t w); void (*add_median_pred)(uint8_t *dst, const uint8_t *top, - const uint8_t *diff, intptr_t w, + const uint8_t *diff, ptrdiff_t w, int *left, int *left_top); int (*add_left_pred)(uint8_t *dst, const uint8_t *src, - intptr_t w, int left); + ptrdiff_t w, int left); int (*add_left_pred_int16)(uint16_t *dst, const uint16_t *src, - unsigned mask, int w, unsigned left); + unsigned mask, ptrdiff_t w, unsigned left); } LLVidDSPContext; void ff_llviddsp_init(LLVidDSPContext *llviddsp); diff --git a/libavcodec/ppc/lossless_videodsp_altivec.c b/libavcodec/ppc/lossless_videodsp_altivec.c index c388dc33af..16dd99f8d7 100644 --- a/libavcodec/ppc/lossless_videodsp_altivec.c +++ b/libavcodec/ppc/lossless_videodsp_altivec.c @@ -33,7 +33,7 @@ #include "libavcodec/lossless_videodsp.h" #if HAVE_ALTIVEC -static void add_bytes_altivec(uint8_t *dst, uint8_t *src, intptr_t w) +static void add_bytes_altivec(uint8_t *dst, uint8_t *src, ptrdiff_t w) { register int i; register vector unsigned char vdst, vsrc; diff --git a/libavcodec/x86/lossless_videodsp_init.c b/libavcodec/x86/lossless_videodsp_init.c index 8d583447dc..21bbd12bd2 100644 --- a/libavcodec/x86/lossless_videodsp_init.c +++ b/libavcodec/x86/lossless_videodsp_init.c @@ -23,27 +23,27 @@ #include "../lossless_videodsp.h" #include "libavutil/x86/cpu.h" -void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, intptr_t w); -void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, intptr_t w); +void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t w); +void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, ptrdiff_t w); void ff_add_median_pred_mmxext(uint8_t *dst, const uint8_t *top, - const uint8_t *diff, intptr_t w, + const uint8_t *diff, ptrdiff_t w, int *left, int *left_top); void ff_add_median_pred_sse2(uint8_t *dst, const uint8_t *top, - const uint8_t *diff, intptr_t w, + const uint8_t *diff, ptrdiff_t w, int *left, int *left_top); int ff_add_left_pred_ssse3(uint8_t *dst, const uint8_t *src, - intptr_t w, int left); + ptrdiff_t w, int left); int ff_add_left_pred_unaligned_ssse3(uint8_t *dst, const uint8_t *src, - intptr_t w, int left); + ptrdiff_t w, int left); -int ff_add_left_pred_int16_ssse3(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc); -int ff_add_left_pred_int16_sse4(uint16_t *dst, const uint16_t *src, unsigned mask, int w, unsigned acc); +int ff_add_left_pred_int16_ssse3(uint16_t *dst, const uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc); +int ff_add_left_pred_int16_sse4(uint16_t *dst, const uint16_t *src, unsigned mask, ptrdiff_t w, unsigned acc); #if HAVE_INLINE_ASM && HAVE_7REGS && ARCH_X86_32 static void add_median_pred_cmov(uint8_t *dst, const uint8_t *top, - const uint8_t *diff, intptr_t w, + const uint8_t *diff, ptrdiff_t w, int *left, int *left_top) { x86_reg w2 = -w; diff --git a/tests/checkasm/llviddsp.c b/tests/checkasm/llviddsp.c index e42873bd20..b1f3b83b43 100644 --- a/tests/checkasm/llviddsp.c +++ b/tests/checkasm/llviddsp.c @@ -41,7 +41,7 @@ static void check_add_bytes(LLVidDSPContext c, int width) uint8_t *src1 = av_mallocz(width); uint8_t *dst0 = av_mallocz(width); uint8_t *dst1 = av_mallocz(width); - declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, int w); + declare_func_emms(AV_CPU_FLAG_MMX, void, uint8_t *dst, uint8_t *src, ptrdiff_t w); if (!src0 || !src1 || !dst0 || !dst1) fail();