aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/x86/hpeldsp.asm
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/x86/hpeldsp.asm
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/x86/hpeldsp.asm')
-rw-r--r--libavcodec/x86/hpeldsp.asm39
1 files changed, 13 insertions, 26 deletions
diff --git a/libavcodec/x86/hpeldsp.asm b/libavcodec/x86/hpeldsp.asm
index 920ae67630..d38186c857 100644
--- a/libavcodec/x86/hpeldsp.asm
+++ b/libavcodec/x86/hpeldsp.asm
@@ -25,10 +25,9 @@ cextern pb_1
SECTION_TEXT
-; put_pixels8_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_pixels8_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_PIXELS8_X2 0
cglobal put_pixels8_x2, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*2]
.loop:
mova m0, [r1]
@@ -58,10 +57,9 @@ INIT_MMX 3dnow
PUT_PIXELS8_X2
-; put_pixels16_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_pixels16_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_PIXELS_16 0
cglobal put_pixels16_x2, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*2]
.loop:
mova m0, [r1]
@@ -103,11 +101,10 @@ INIT_MMX 3dnow
PUT_PIXELS_16
-; put_no_rnd_pixels8_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_no_rnd_pixels8_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_NO_RND_PIXELS8_X2 0
cglobal put_no_rnd_pixels8_x2, 4,5
mova m6, [pb_1]
- movsxdifnidn r2, r2d
lea r4, [r2*2]
.loop:
mova m0, [r1]
@@ -145,10 +142,9 @@ INIT_MMX 3dnow
PUT_NO_RND_PIXELS8_X2
-; put_no_rnd_pixels8_x2_exact(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_no_rnd_pixels8_x2_exact(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_NO_RND_PIXELS8_X2_EXACT 0
cglobal put_no_rnd_pixels8_x2_exact, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*3]
pcmpeqb m6, m6
.loop:
@@ -193,10 +189,9 @@ INIT_MMX 3dnow
PUT_NO_RND_PIXELS8_X2_EXACT
-; put_pixels8_y2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_pixels8_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_PIXELS8_Y2 0
cglobal put_pixels8_y2, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*2]
mova m0, [r1]
sub r0, r2
@@ -228,11 +223,10 @@ INIT_MMX 3dnow
PUT_PIXELS8_Y2
-; put_no_rnd_pixels8_y2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_no_rnd_pixels8_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_NO_RND_PIXELS8_Y2 0
cglobal put_no_rnd_pixels8_y2, 4,5
mova m6, [pb_1]
- movsxdifnidn r2, r2d
lea r4, [r2+r2]
mova m0, [r1]
sub r0, r2
@@ -266,10 +260,9 @@ INIT_MMX 3dnow
PUT_NO_RND_PIXELS8_Y2
-; put_no_rnd_pixels8_y2_exact(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; put_no_rnd_pixels8_y2_exact(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro PUT_NO_RND_PIXELS8_Y2_EXACT 0
cglobal put_no_rnd_pixels8_y2_exact, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*3]
mova m0, [r1]
pcmpeqb m6, m6
@@ -309,10 +302,9 @@ INIT_MMX 3dnow
PUT_NO_RND_PIXELS8_Y2_EXACT
-; avg_pixels8(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; avg_pixels8(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro AVG_PIXELS8 0
cglobal avg_pixels8, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*2]
.loop:
mova m0, [r0]
@@ -340,10 +332,9 @@ INIT_MMX 3dnow
AVG_PIXELS8
-; avg_pixels8_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; avg_pixels8_x2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro AVG_PIXELS8_X2 0
cglobal avg_pixels8_x2, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*2]
.loop:
mova m0, [r1]
@@ -377,10 +368,9 @@ INIT_MMX 3dnow
AVG_PIXELS8_X2
-; avg_pixels8_y2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; avg_pixels8_y2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro AVG_PIXELS8_Y2 0
cglobal avg_pixels8_y2, 4,5
- movsxdifnidn r2, r2d
lea r4, [r2*2]
mova m0, [r1]
sub r0, r2
@@ -420,11 +410,10 @@ INIT_MMX 3dnow
AVG_PIXELS8_Y2
-; avg_pixels8_xy2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; avg_pixels8_xy2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
%macro AVG_PIXELS8_XY2 0
cglobal avg_pixels8_xy2, 4,5
mova m6, [pb_1]
- movsxdifnidn r2, r2d
lea r4, [r2*2]
mova m0, [r1]
pavgb m0, [r1+1]
@@ -465,9 +454,8 @@ INIT_MMX 3dnow
AVG_PIXELS8_XY2
INIT_XMM sse2
-; void put_pixels16_sse2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; void put_pixels16_sse2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
cglobal put_pixels16, 4,5,4
- movsxdifnidn r2, r2d
lea r4, [r2*3]
.loop:
movu m0, [r1]
@@ -484,9 +472,8 @@ cglobal put_pixels16, 4,5,4
jnz .loop
REP_RET
-; void avg_pixels16_sse2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
+; void avg_pixels16_sse2(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
cglobal avg_pixels16, 4,5,4
- movsxdifnidn r2, r2d
lea r4, [r2*3]
.loop:
movu m0, [r1]