aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sparc
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-01-29 22:13:55 +0100
committerDiego Biurrun <diego@biurrun.de>2013-02-05 12:59:12 +0100
commit25841dfe806a13de526ae09c11149ab1f83555a8 (patch)
treeb440e39d40a14e963bd3c36f41a370cb448c6006 /libavcodec/sparc
parente66240f22e240b0f0d970d1b138db80ceb517097 (diff)
downloadffmpeg-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/sparc')
-rw-r--r--libavcodec/sparc/dsputil_vis.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/libavcodec/sparc/dsputil_vis.c b/libavcodec/sparc/dsputil_vis.c
index 0822a5816b..1381d09c15 100644
--- a/libavcodec/sparc/dsputil_vis.c
+++ b/libavcodec/sparc/dsputil_vis.c
@@ -120,7 +120,7 @@ DECLARE_ALIGNED(8, static const int16_t, constants256_1024)[] =
#define TMP32 58
static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
do { /* 5 cycles */
@@ -141,7 +141,7 @@ static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
do { /* 4 cycles */
@@ -160,7 +160,7 @@ static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * ref,
static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
int stride_8 = stride + 8;
@@ -320,7 +320,7 @@ static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
@@ -412,7 +412,7 @@ static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -604,7 +604,7 @@ static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -727,7 +727,7 @@ static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -817,7 +817,7 @@ static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -982,7 +982,7 @@ static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
vis_ld64(ref[0], TMP0);
@@ -1136,7 +1136,7 @@ static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
vis_ld64(ref[0], TMP0);
@@ -1226,7 +1226,7 @@ static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
int stride_8 = stride + 8;
int stride_16 = stride + 16;
@@ -1354,7 +1354,7 @@ static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
int stride_8 = stride + 8;
@@ -1433,7 +1433,7 @@ static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -1597,7 +1597,7 @@ static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -1701,7 +1701,7 @@ static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -1897,7 +1897,7 @@ static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -2040,7 +2040,7 @@ static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * ref,
*/
static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
do { /* 5 cycles */
@@ -2061,7 +2061,7 @@ static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
do { /* 4 cycles */
@@ -2080,7 +2080,7 @@ static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * ref,
static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
int stride_8 = stride + 8;
@@ -2240,7 +2240,7 @@ static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -2432,7 +2432,7 @@ static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -2555,7 +2555,7 @@ static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -2645,7 +2645,7 @@ static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
vis_ld64(ref[0], TMP0);
@@ -2799,7 +2799,7 @@ static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
ref = vis_alignaddr(ref);
vis_ld64(ref[0], TMP0);
@@ -2889,7 +2889,7 @@ static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
int stride_8 = stride + 8;
int stride_16 = stride + 16;
@@ -3017,7 +3017,7 @@ static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -3181,7 +3181,7 @@ static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;
@@ -3285,7 +3285,7 @@ static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * ref,
}
static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
- const int stride, int height)
+ const ptrdiff_t line_size, int height)
{
unsigned long off = (unsigned long) ref & 0x7;
unsigned long off_plus_1 = off + 1;