diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-01-29 22:13:55 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-02-05 12:59:12 +0100 |
commit | 25841dfe806a13de526ae09c11149ab1f83555a8 (patch) | |
tree | b440e39d40a14e963bd3c36f41a370cb448c6006 /libavcodec/alpha | |
parent | e66240f22e240b0f0d970d1b138db80ceb517097 (diff) | |
download | ffmpeg-25841dfe806a13de526ae09c11149ab1f83555a8.tar.gz |
Use ptrdiff_t instead of int for {avg, put}_pixels line_size parameter.
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.
Diffstat (limited to 'libavcodec/alpha')
-rw-r--r-- | libavcodec/alpha/dsputil_alpha.c | 10 | ||||
-rw-r--r-- | libavcodec/alpha/dsputil_alpha.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c index 696167471e..d02ebdb3cc 100644 --- a/libavcodec/alpha/dsputil_alpha.c +++ b/libavcodec/alpha/dsputil_alpha.c @@ -32,7 +32,7 @@ void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels, /* These functions were the base for the optimized assembler routines, and remain here for documentation purposes. */ static void put_pixels_clamped_mvi(const int16_t *block, uint8_t *pixels, - int line_size) + ptrdiff_t line_size) { int i = 8; uint64_t clampmask = zap(-1, 0xaa); /* 0x00ff00ff00ff00ff */ @@ -56,7 +56,7 @@ static void put_pixels_clamped_mvi(const int16_t *block, uint8_t *pixels, } void add_pixels_clamped_mvi(const int16_t *block, uint8_t *pixels, - int line_size) + ptrdiff_t line_size) { int h = 8; /* Keep this function a leaf function by generating the constants @@ -212,7 +212,7 @@ static inline uint64_t avg4(uint64_t l1, uint64_t l2, uint64_t l3, uint64_t l4) #define MAKE_OP(OPNAME, SUFF, OPKIND, STORE) \ static void OPNAME ## _pixels ## SUFF ## _axp \ (uint8_t *restrict block, const uint8_t *restrict pixels, \ - int line_size, int h) \ + ptrdiff_t line_size, int h) \ { \ if ((size_t) pixels & 0x7) { \ OPKIND(uldq, STORE); \ @@ -223,7 +223,7 @@ static void OPNAME ## _pixels ## SUFF ## _axp \ \ static void OPNAME ## _pixels16 ## SUFF ## _axp \ (uint8_t *restrict block, const uint8_t *restrict pixels, \ - int line_size, int h) \ + ptrdiff_t line_size, int h) \ { \ OPNAME ## _pixels ## SUFF ## _axp(block, pixels, line_size, h); \ OPNAME ## _pixels ## SUFF ## _axp(block + 8, pixels + 8, line_size, h); \ @@ -262,7 +262,7 @@ PIXOP(put_no_rnd, STORE); PIXOP(avg_no_rnd, STORE); static void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels, - int line_size, int h) + ptrdiff_t line_size, int h) { put_pixels_axp_asm(block, pixels, line_size, h); put_pixels_axp_asm(block + 8, pixels + 8, line_size, h); diff --git a/libavcodec/alpha/dsputil_alpha.h b/libavcodec/alpha/dsputil_alpha.h index 6cd2dea4e5..6eee97fe63 100644 --- a/libavcodec/alpha/dsputil_alpha.h +++ b/libavcodec/alpha/dsputil_alpha.h @@ -26,7 +26,7 @@ void ff_simple_idct_put_axp(uint8_t *dest, int line_size, int16_t *block); void ff_simple_idct_add_axp(uint8_t *dest, int line_size, int16_t *block); void put_pixels_axp_asm(uint8_t *block, const uint8_t *pixels, - int line_size, int h); + ptrdiff_t line_size, int h); void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels, int line_size); void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels, |