diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-09-06 16:06:12 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-09-14 14:12:36 +0200 |
commit | de452e503734ebb0fdbce86e9d16693b3530fad3 (patch) | |
tree | 4a8055e1c5158b8d51c4f17b99c4befe9d45a19d /libavcodec/ppc | |
parent | ab3554e1a7c04a5ea30f9c905de92348478ef7c8 (diff) | |
download | ffmpeg-de452e503734ebb0fdbce86e9d16693b3530fad3.tar.gz |
pixblockdsp: Change type of stride parameters to ptrdiff_t
This avoids SIMD-optimized functions having to sign-extend their
line size argument manually to be able to do pointer arithmetic.
Also adjust parameter names to be "stride" everywhere.
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r-- | libavcodec/ppc/pixblockdsp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/ppc/pixblockdsp.c b/libavcodec/ppc/pixblockdsp.c index 00e79495c3..96e702452f 100644 --- a/libavcodec/ppc/pixblockdsp.c +++ b/libavcodec/ppc/pixblockdsp.c @@ -36,7 +36,7 @@ #if HAVE_ALTIVEC && HAVE_BIGENDIAN static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels, - int line_size) + ptrdiff_t stride) { int i; vec_u8 perm = vec_lvsl(0, pixels); @@ -56,12 +56,12 @@ static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels, // Save the data to the block, we assume the block is 16-byte aligned. vec_st(shorts, i * 16, (vec_s16 *)block); - pixels += line_size; + pixels += stride; } } static void diff_pixels_altivec(int16_t *restrict block, const uint8_t *s1, - const uint8_t *s2, int stride) + const uint8_t *s2, ptrdiff_t stride) { int i; vec_u8 perm1 = vec_lvsl(0, s1); @@ -135,7 +135,7 @@ static void diff_pixels_altivec(int16_t *restrict block, const uint8_t *s1, #if HAVE_VSX static void get_pixels_vsx(int16_t *restrict block, const uint8_t *pixels, - int line_size) + ptrdiff_t stride) { int i; for (i = 0; i < 8; i++) { @@ -143,12 +143,12 @@ static void get_pixels_vsx(int16_t *restrict block, const uint8_t *pixels, vec_vsx_st(shorts, i * 16, block); - pixels += line_size; + pixels += stride; } } static void diff_pixels_vsx(int16_t *restrict block, const uint8_t *s1, - const uint8_t *s2, int stride) + const uint8_t *s2, ptrdiff_t stride) { int i; vec_s16 shorts1, shorts2; |