aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer2014-09-24 19:51:02 -0300
committerJames Almer2014-09-24 21:43:19 -0300
commitc99a8828148949430608c3866e671a599a5805ba (patch)
tree0dfd6f0da4a1b38da0ad5f3665833d8ac05c3d75
parent6441d522e9fe496b62baa667f063db2bc614cef1 (diff)
avcodec/idctdsp: change {put,add}_pixels_clamped to ptrdiff_t line_size
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/alpha/idctdsp_alpha.c8
-rw-r--r--libavcodec/alpha/idctdsp_alpha.h4
-rw-r--r--libavcodec/alpha/idctdsp_alpha_asm.S4
-rw-r--r--libavcodec/arm/idctdsp_arm.S2
-rw-r--r--libavcodec/arm/idctdsp_init_arm.c2
-rw-r--r--libavcodec/arm/idctdsp_init_armv6.c2
-rw-r--r--libavcodec/arm/idctdsp_init_neon.c6
-rw-r--r--libavcodec/idctdsp.c10
-rw-r--r--libavcodec/idctdsp.h10
-rw-r--r--libavcodec/x86/idctdsp.asm2
-rw-r--r--libavcodec/x86/idctdsp.h8
-rw-r--r--libavcodec/x86/idctdsp_mmx.c5
12 files changed, 32 insertions, 31 deletions
diff --git a/libavcodec/alpha/idctdsp_alpha.c b/libavcodec/alpha/idctdsp_alpha.c
index 1050697fdd..1923ebbc5f 100644
--- a/libavcodec/alpha/idctdsp_alpha.c
+++ b/libavcodec/alpha/idctdsp_alpha.c
@@ -24,14 +24,14 @@
#include "asm.h"
void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
#if 0
/* These functions were the base for the optimized assembler routines,
diff --git a/libavcodec/alpha/idctdsp_alpha.h b/libavcodec/alpha/idctdsp_alpha.h
index e52cd80047..bf984950f2 100644
--- a/libavcodec/alpha/idctdsp_alpha.h
+++ b/libavcodec/alpha/idctdsp_alpha.h
@@ -23,9 +23,9 @@
#include <stdint.h>
extern void (*put_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
extern void (*add_pixels_clamped_axp_p)(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void ff_simple_idct_axp(int16_t *block);
void ff_simple_idct_put_axp(uint8_t *dest, int line_size, int16_t *block);
diff --git a/libavcodec/alpha/idctdsp_alpha_asm.S b/libavcodec/alpha/idctdsp_alpha_asm.S
index e3a8364a48..f545df9e4f 100644
--- a/libavcodec/alpha/idctdsp_alpha_asm.S
+++ b/libavcodec/alpha/idctdsp_alpha_asm.S
@@ -33,7 +33,7 @@
/************************************************************************
* void put_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
- * int line_size)
+ * ptrdiff_t line_size)
*/
.align 6
.globl put_pixels_clamped_mvi_asm
@@ -83,7 +83,7 @@ put_pixels_clamped_mvi_asm:
/************************************************************************
* void add_pixels_clamped_mvi_asm(const int16_t *block, uint8_t *pixels,
- * int line_size)
+ * ptrdiff_t line_size)
*/
.align 6
.globl add_pixels_clamped_mvi_asm
diff --git a/libavcodec/arm/idctdsp_arm.S b/libavcodec/arm/idctdsp_arm.S
index e8333c4b70..057eff9be8 100644
--- a/libavcodec/arm/idctdsp_arm.S
+++ b/libavcodec/arm/idctdsp_arm.S
@@ -22,7 +22,7 @@
#include "config.h"
#include "libavutil/arm/asm.S"
-@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, int stride)
+@ void ff_add_pixels_clamped_arm(int16_t *block, uint8_t *dest, ptrdiff_t stride)
function ff_add_pixels_clamped_arm, export=1, align=5
push {r4-r10}
mov r10, #8
diff --git a/libavcodec/arm/idctdsp_init_arm.c b/libavcodec/arm/idctdsp_init_arm.c
index 2d846dc5bd..da5da068be 100644
--- a/libavcodec/arm/idctdsp_init_arm.c
+++ b/libavcodec/arm/idctdsp_init_arm.c
@@ -30,7 +30,7 @@
#include "idctdsp_arm.h"
void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
- int line_size);
+ ptrdiff_t line_size);
/* XXX: those functions should be suppressed ASAP when all IDCTs are
* converted */
diff --git a/libavcodec/arm/idctdsp_init_armv6.c b/libavcodec/arm/idctdsp_init_armv6.c
index 648f1fdfc1..a3470a83df 100644
--- a/libavcodec/arm/idctdsp_init_armv6.c
+++ b/libavcodec/arm/idctdsp_init_armv6.c
@@ -27,7 +27,7 @@
#include "idctdsp_arm.h"
void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
diff --git a/libavcodec/arm/idctdsp_init_neon.c b/libavcodec/arm/idctdsp_init_neon.c
index 80c391c520..b70c5b0d44 100644
--- a/libavcodec/arm/idctdsp_init_neon.c
+++ b/libavcodec/arm/idctdsp_init_neon.c
@@ -27,9 +27,9 @@
#include "idct.h"
#include "idctdsp_arm.h"
-void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int);
-void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int);
-void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, int);
+void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
+void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
+void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, ptrdiff_t);
av_cold void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
index 75695ef437..b4972211de 100644
--- a/libavcodec/idctdsp.c
+++ b/libavcodec/idctdsp.c
@@ -80,11 +80,11 @@ av_cold void ff_init_scantable_permutation(uint8_t *idct_permutation,
}
}
-void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
-void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
+void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
+void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
static void put_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
- int line_size)
+ ptrdiff_t line_size)
{
int i;
@@ -138,7 +138,7 @@ static void put_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pix
static void put_signed_pixels_clamped_c(const int16_t *block,
uint8_t *av_restrict pixels,
- int line_size)
+ ptrdiff_t line_size)
{
int i, j;
@@ -158,7 +158,7 @@ static void put_signed_pixels_clamped_c(const int16_t *block,
}
static void add_pixels_clamped_c(const int16_t *block, uint8_t *av_restrict pixels,
- int line_size)
+ ptrdiff_t line_size)
{
int i;
diff --git a/libavcodec/idctdsp.h b/libavcodec/idctdsp.h
index 8d60656932..538b71669c 100644
--- a/libavcodec/idctdsp.h
+++ b/libavcodec/idctdsp.h
@@ -52,13 +52,13 @@ typedef struct IDCTDSPContext {
/* pixel ops : interface with DCT */
void (*put_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
- int line_size);
+ ptrdiff_t line_size);
void (*put_signed_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
- int line_size);
+ ptrdiff_t line_size);
void (*add_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
- int line_size);
+ ptrdiff_t line_size);
void (*idct)(int16_t *block /* align 16 */);
@@ -95,8 +95,8 @@ typedef struct IDCTDSPContext {
enum idct_permutation_type perm_type;
} IDCTDSPContext;
-extern void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
-extern void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
+extern void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
+extern void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, ptrdiff_t line_size);
void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx);
diff --git a/libavcodec/x86/idctdsp.asm b/libavcodec/x86/idctdsp.asm
index 44a1a6ef85..c3f37c4910 100644
--- a/libavcodec/x86/idctdsp.asm
+++ b/libavcodec/x86/idctdsp.asm
@@ -31,7 +31,7 @@ SECTION_TEXT
;--------------------------------------------------------------------------
;void ff_put_signed_pixels_clamped(const int16_t *block, uint8_t *pixels,
-; int line_size)
+; ptrdiff_t line_size)
;--------------------------------------------------------------------------
%macro PUT_SIGNED_PIXELS_CLAMPED_HALF 1
diff --git a/libavcodec/x86/idctdsp.h b/libavcodec/x86/idctdsp.h
index 9b7177a58c..252e704338 100644
--- a/libavcodec/x86/idctdsp.h
+++ b/libavcodec/x86/idctdsp.h
@@ -22,12 +22,12 @@
#include <stdint.h>
void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
void ff_put_signed_pixels_clamped_sse2(const int16_t *block, uint8_t *pixels,
- int line_size);
+ ptrdiff_t line_size);
#endif /* AVCODEC_X86_IDCTDSP_H */
diff --git a/libavcodec/x86/idctdsp_mmx.c b/libavcodec/x86/idctdsp_mmx.c
index a72b9416b1..0ce9a92390 100644
--- a/libavcodec/x86/idctdsp_mmx.c
+++ b/libavcodec/x86/idctdsp_mmx.c
@@ -25,13 +25,14 @@
#include "config.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
+#include "libavcodec/idctdsp.h"
#include "idctdsp.h"
#include "inline_asm.h"
#if HAVE_INLINE_ASM
void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
- int line_size)
+ ptrdiff_t line_size)
{
const int16_t *p;
uint8_t *pix;
@@ -89,7 +90,7 @@ void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
}
void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
- int line_size)
+ ptrdiff_t line_size)
{
const int16_t *p;
uint8_t *pix;